Advertisement
logicmoo

?- help(term_expansion/2).

Sep 18th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 1.29 KB | None | 0 0
  1. ?- help(term_expansion/2).
  2. term_expansion(+Term1, -Term2)
  3.     Dynamic  and  multifile  predicate,  normally  not defined.     When
  4.     defined  by the user all terms  read during consulting are given  to
  5.     this predicate.   If the predicate succeeds Prolog will assert Term2
  6.     in  the database rather than the read term (Term1).  Term2  may be a
  7.     term  of the form ?- Goal.  or :- Goal.   Goal is then treated as  a
  8.     directive.   If Term2  is a list, all  terms of the list are  stored
  9.     in  the database or  called (for directives).   If  Term2 is of  the
  10.     form  below, the system will assert Clause and record  the indicated
  11.     source location with it:
  12.  
  13.          '$source_location'(<File>, <Line>):<Clause>
  14.  
  15.     When compiling a  module (see chapter 6 and the directive module/2),
  16.     expand_term/2  will first try  term_expansion/2 in the module  being
  17.     compiled  to  allow  for term  expansion  rules  that are  local  to
  18.     a  module.     If  there  is  no  local  definition,  or  the  local
  19.     definition  fails  to translate  the  term,  expand_term/2 will  try
  20.     term_expansion/2  in module user.    For compatibility with  SICStus
  21.     and  Quintus Prolog,  this feature  should not  be used.   See  also
  22.     expand_term/2, goal_expansion/2 and expand_goal/2.
  23.  
  24. true.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement