eam.yap includes first version of eamconsult
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1587 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
2da7e891dc
commit
5179cb7d2b
33
pl/eam.yap
Normal file
33
pl/eam.yap
Normal file
@ -0,0 +1,33 @@
|
||||
/*************************************************************************
|
||||
* *
|
||||
* YAP Prolog *
|
||||
* *
|
||||
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
||||
* BEAM extends the YAP Prolog system to support the EAM *
|
||||
* *
|
||||
* Copyright Ricardo Lopes and Universidade do Porto 2000-2006 *
|
||||
* *
|
||||
**************************************************************************
|
||||
* *
|
||||
* File: eam.yap *
|
||||
* Last rev: 6/4/2006 *
|
||||
* mods: *
|
||||
* comments: Some utility predicates needed by BEAM *
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
'$_eamtrans'((A,B),(C,D)):- !, '$_eamtrans'(A,C),'$_eamtrans'(B,D).
|
||||
'$_eamtrans'((X is Y) ,(skip_while_var(Vars), X is Y )):- !, '$variables_in_term'(Y,[],Vars).
|
||||
'$_eamtrans'((X =\= Y),(skip_while_var(Vars), X =\= Y )):- !, '$variables_in_term'(X + Y,[],Vars).
|
||||
'$_eamtrans'((X =\= Y),(skip_while_var(Vars), X =:= Y )):- !, '$variables_in_term'(X + Y,[],Vars).
|
||||
'$_eamtrans'((X >= Y) ,(skip_while_var(Vars), X >= Y )):- !, '$variables_in_term'(X + Y,[],Vars).
|
||||
'$_eamtrans'((X > Y) ,(skip_while_var(Vars), X > Y )):- !, '$variables_in_term'(X + Y,[],Vars).
|
||||
'$_eamtrans'((X < Y) ,(skip_while_var(Vars), X < Y )):- !, '$variables_in_term'(X + Y,[],Vars).
|
||||
'$_eamtrans'((X =< Y) ,(skip_while_var(Vars), X =< Y )):- !, '$variables_in_term'(X + Y,[],Vars).
|
||||
'$_eamtrans'(B,B).
|
||||
|
||||
eamconsult(File):- eam, eam, %fails if eam is disable
|
||||
assert((term_expansion((A :- B),(A :- C)):- '$_eamtrans'(B,C))),
|
||||
eam, ( consult(File) ; true), eam,
|
||||
retract((term_expansion((A :- B),(A :- C)):- '$_eamtrans'(B,C))).
|
||||
|
@ -71,6 +71,7 @@ otherwise.
|
||||
'strict_iso.yap',
|
||||
'tabling.yap',
|
||||
'threads.yap',
|
||||
'eam.yap',
|
||||
'yapor.yap'].
|
||||
|
||||
:- thread_local([idb:'$debug'/0,idb:'$trace'/0,idb:'$spy_skip'/0,idb:'$spy_stop'/0]).
|
||||
|
Reference in New Issue
Block a user