Merge pull request #2534 from hurufu/document_non_counted_backtracking
Document non counted backtracking
This commit is contained in:
@@ -223,6 +223,7 @@ run_cleaners_without_handling(Cp) :-
|
|||||||
%% call_with_inference_limit(Goal, Limit, Result).
|
%% call_with_inference_limit(Goal, Limit, Result).
|
||||||
%
|
%
|
||||||
% Similar to `call(Goal)` but it limits the number of inferences for each solution of Goal.
|
% Similar to `call(Goal)` but it limits the number of inferences for each solution of Goal.
|
||||||
|
% Calls to it may be nested, but only the last limit will be in power.
|
||||||
call_with_inference_limit(G, L, R) :-
|
call_with_inference_limit(G, L, R) :-
|
||||||
( integer(L) ->
|
( integer(L) ->
|
||||||
( L < 0 ->
|
( L < 0 ->
|
||||||
|
|||||||
@@ -5,9 +5,16 @@
|
|||||||
|
|
||||||
:- op(1199, fx, meta_predicate).
|
:- op(1199, fx, meta_predicate).
|
||||||
|
|
||||||
/* this is an implementation specific declarative operator used to implement call_with_inference_limit/3
|
% Implementation specific declarative operator used to implement
|
||||||
and setup_call_cleanup/3. switches to the default trust_me and retry_me_else. Indexing choice
|
% call_with_inference_limit/3 and setup_call_cleanup/3. Compiler switches
|
||||||
instructions are unchanged. */
|
% to the default trust_me, retry_me_else and some other instructions for all
|
||||||
|
% predicates that are marked with it. Indexing choice instructions are unchanged.
|
||||||
|
%
|
||||||
|
% Implementation details:
|
||||||
|
% Default instructions are not subject to inference counting, so their
|
||||||
|
% execution will not be considered if they happen to be called by
|
||||||
|
% call_with_inference_limit/3.
|
||||||
|
%
|
||||||
:- op(700, fx, non_counted_backtracking).
|
:- op(700, fx, non_counted_backtracking).
|
||||||
|
|
||||||
% arithmetic operators.
|
% arithmetic operators.
|
||||||
|
|||||||
Reference in New Issue
Block a user