implement new disjunction compilation
This commit is contained in:
@@ -218,13 +218,13 @@ fail :- '$fail'.
|
||||
%% \+(Goal)
|
||||
%
|
||||
% True iff Goal fails
|
||||
\+ G :- call(G), !, false.
|
||||
\+ G :- call(G), !, '$fail'.
|
||||
\+ _.
|
||||
|
||||
%% \=(?X, ?Y)
|
||||
%
|
||||
% True iff X and Y can't be unified
|
||||
X \= X :- !, false.
|
||||
X \= X :- !, '$fail'.
|
||||
_ \= _.
|
||||
|
||||
|
||||
|
||||
@@ -513,10 +513,12 @@ portray_clause(Stream, Term) :-
|
||||
phrase_to_stream(portray_clause_(Term), Stream),
|
||||
flush_output(Stream).
|
||||
|
||||
% called once.
|
||||
portray_clause_(Term) -->
|
||||
{ unique_variable_names(Term, VNs) },
|
||||
portray_(Term, VNs), ".\n".
|
||||
|
||||
% mysteriously called twice, the second time with the truncated B3.
|
||||
unique_variable_names(Term, VNs) :-
|
||||
term_variables(Term, Vs),
|
||||
foldl(var_name, Vs, VNs, 0, _).
|
||||
|
||||
Reference in New Issue
Block a user