move some stuff early

This commit is contained in:
Vitor Santos Costa 2016-07-31 10:38:36 -05:00
parent a2ab31757f
commit 915316b712

View File

@ -255,42 +255,6 @@ prolog :-
%%% current ....
/** @pred recordaifnot(+ _K_, _T_,- _R_)
If a term equal to _T_ up to variable renaming is stored under key
_K_ fail. Otherwise, make term _T_ the first record under key
_K_ and unify _R_ with its reference.
*/
recordaifnot(K,T,R) :-
recorded(K,T,R), % force non-det binding to R.
'$still_variant'(R,T),
!,
fail.
recordaifnot(K,T,R) :-
recorda(K,T,R).
/** @pred recordzifnot(+ _K_, _T_,- _R_)
If a term equal to _T_ up to variable renaming is stored under key
_K_ fail. Otherwise, make term _T_ the first record under key
_K_ and unify _R_ with its reference.
This predicate is YAP specific.
*/
recordzifnot(K,T,R) :-
recorded(K,T,R),
'$still_variant'(R,T),
!,
fail.
recordzifnot(K,T,R) :-
recordz(K,T,R).
/** @pred callable( _T_) is iso
@ -400,3 +364,14 @@ variable in _Subsumer_.
*/
subsumes_term(A,B) :-
\+ \+ terms:subsumes(A,B).
term_string( T, S, Opts) :-
var( T ),
!,
memory_file:open_mem_read_stream( S, Stream ),
read_term( Stream, T, Opts ),
close( Stream ).
term_string( T, S, _Opts) :-
format(string(S), '~q.~n', [T]).