fix frozen/2.
This commit is contained in:
parent
6f88083d38
commit
4573afa70b
@ -446,10 +446,26 @@ prolog:'$wait'(Na/Ar) :-
|
|||||||
'$$compile'((S :- var(A), !, freeze(A, S)), (S :- var(A), !, freeze(A, S)), 5, M), fail.
|
'$$compile'((S :- var(A), !, freeze(A, S)), (S :- var(A), !, freeze(A, S)), 5, M), fail.
|
||||||
prolog:'$wait'(_).
|
prolog:'$wait'(_).
|
||||||
|
|
||||||
frozen(V, G) :- nonvar(V), !,
|
prolog:frozen(V, LG) :-
|
||||||
'$do_error'(uninstantiation_error(V),frozen(V,G)).
|
var(V), !,
|
||||||
frozen(V, LG) :-
|
'$attributes':attvars_residuals([V], Gs, []),
|
||||||
'$attributes':get_conj_from_attvars([V], LG).
|
simplify_frozen( Gs, SGs ),
|
||||||
|
list_to_conj( SGs, LG ).
|
||||||
|
prolog:frozen(V, G) :-
|
||||||
|
'$do_error'(uninstantiation_error(V),frozen(V,G)).
|
||||||
|
|
||||||
|
simplify_frozen( [prolog:freeze(_, G)|Gs], [G|NGs] ) :-
|
||||||
|
simplify_frozen( Gs,NGs ).
|
||||||
|
simplify_frozen( [prolog:when(_, G)|Gs], [G|NGs] ) :-
|
||||||
|
simplify_frozen( Gs,NGs ).
|
||||||
|
simplify_frozen( [prolog:dif(_, _)|Gs], NGs ) :-
|
||||||
|
simplify_frozen( Gs,NGs ).
|
||||||
|
simplify_frozen( [], [] ).
|
||||||
|
|
||||||
|
list_to_conj([], true).
|
||||||
|
list_to_conj([El], El).
|
||||||
|
list_to_conj([E,E1|Els], (E,C) ) :-
|
||||||
|
list_to_conj([E1|Els], C).
|
||||||
|
|
||||||
%internal_freeze(V,G) :-
|
%internal_freeze(V,G) :-
|
||||||
% attributes:get_att(V, 0, Gs), write(G+Gs),nl,fail.
|
% attributes:get_att(V, 0, Gs), write(G+Gs),nl,fail.
|
||||||
|
Reference in New Issue
Block a user