%   File   : XREF.DEF
%   Authors: Dave Bowen, Chris Mellish
%   Updated: 15 September 1984
%   Purpose: System definitions for use with XREF.PL.
 
%   These are the predicates which are part of the basic Prolog system.
 
system([_|_]).
system(abolish(_,_)).
system(asserta(_)).
system(assertz(_)).
system(retract(_)).
system(clause(_,_)).
system(true).
system(name(_,_)).
system(op(_,_,_)).
system(var(_)).
system(atom(_)).
system(!).
system(functor(_,_,_)).
system(call(_)).
system(expand_term(_,_)).
system(debug).
system(debugging).
system(display(_)).
system(get(_)).
system(get0(_)).
system(leash(_)).
system(nl).
system(nodebug).
system(print(_)).
system(put(_)).
system(skip(_)).
system(tab(_)).
system(trace).
system(write(_)).
system(writeq(_)).
system(abort).
system(arg(_,_,_)).
system(assert(_)).
system(atomic(_)).
system(break).
system(consult(_)).
system(fail).
system(halt).
system(integer(_)).
system(listing).
system(listing(_)).
system(nonvar(_)).
system(phrase(_,_)).
system(read(_)).
system(reconsult(_)).
system(repeat).
system(see(_)).
system(seeing(_)).
system(seen).
system(tell(_)).
system(telling(_)).
system(told).
system(not(_)).
system((_->_)).
system(spy _).
system(nospy _).
system(_=_).
system(_ is _).
system(_==_).
system(_\==_).
system(_=.._).
system(_<_).
system(_>_).
system(_=<_).
system(_>=_).
system(_@<_).
system(_@=<_).
system(_@>=_).
system(_@>_).
system(_^_).
system(_=\=_).
system(_=:=_).
 
applies(call(Goal), Goal).
applies(phrase(Nonterminal, List), Nonterminal+2).
applies(bagof(Vars,Test,Bag), Test).
applies(setof(Vars,Test,Set), Test).
applies((P->Q), (P,Q)).
applies(not(G), G).
