/*
* XREF.DEF
*
* This file contains the predicates that have special meanings to xref.
* This is the version for Cprolog1.5. Whether a predicate is system is 
* determined using the Cprolog1.5 primitive 'system/1'
*
* updated 31/1/85
*
* Jan Wielemaker
*/

%	predicates that invoce another predicate

applies(call(Goal), Goal).
applies(nobt(Goal), Goal).
applies(not(G), G).
applies(phrase(Nonterminal, List), Nonterminal+2).
applies(bagof(Vars,Test,Bag), Test).
applies(setof(Vars,Test,Set), Test).
applies(findall(Vars,Test,Bag), Test).
applies(for(N,Goal), Goal).
applies(forall(Cond, Act), [Cond,Act]).
applies((P->Q), (P,Q)).
applies(X^P, P).
applies(\+G, G).

%	These predicates 'apply' other predicates

applies( maplist( Goal,_,_ ),Goal+2 ).
applies( sublist( Goal,_,_ ),Goal+1 ).
applies( checklist( Goal,_ ),Goal+1 ).

%	These predicates are called by the system

called( term_expansion(_,_),'<system>',0,'' ).

%	system facts

known( current_editor(_),'<database>' ).
