Advertisement
logicmoo

Untitled

Jan 11th, 2018
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.42 KB | None | 0 0
  1.  
  2. :- meta_predicate(call_engine(?,0,-,-)).
  3. call_engine(Templ,Goal,Engine,Det):-
  4.   call_engine_start(Templ,Goal,Engine),
  5.   call_engine_next(Engine,Templ,Det).
  6.  
  7. :- meta_predicate(call_engine_start(?,0,-)).
  8. call_engine_start(Templ,Goal,Engine):-
  9.    engine_create(Templ-TF0,(Goal,deterministic(TF0)),Engine).
  10.  
  11. call_engine_next(Engine,Templ,Det):-
  12.    repeat,
  13.     engine_next(Engine,Templ-Det),
  14.      (Det==true->!;true).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement