fix bad replace; protect against undef red.

This commit is contained in:
Vítor Santos Costa 2015-11-05 16:00:54 +00:00
parent 9db87d1da4
commit 00245ff0fc

View File

@ -243,7 +243,7 @@ reset_completion :-
propagate_evidence(_,_) :- propagate_evidence(_,_) :-
\+ current_predicate(user:known/3), \+ current_predicate(user:known/3),
!, !,
throw(error(SYSTEM_ERROR_INTERNAL,'The predicate user:known/3 is not defined. If you really have empty interpretations declare the user:known/3 as dynamic and come back.')). throw(error(system,'The predicate user:known/3 is not defined. If you really have empty interpretations declare the user:known/3 as dynamic and come back.')).
propagate_evidence(InterpretationID,Query_Type) :- propagate_evidence(InterpretationID,Query_Type) :-
@ -291,7 +291,7 @@ propagate_evidence(InterpretationID,Query_Type) :-
% iterate over all evidence atoms % iterate over all evidence atoms
forall(user:known(InterpretationID,Atom,Value), forall(user:known(InterpretationID,Atom,Value),
( (
grounder_compute_reachable_atoms(Atom,InterpretationID,Success), catch( rounder_compute_reachable_atoms(Atom,InterpretationID,Success), _, fail),
( (
(Success==true; Value==false) (Success==true; Value==false)
-> ->