call(Goal)
, but limits the number of
inferences
for each solution of Goal.78This
predicate was realised after discussion with Ulrich Neumerkel and Markus
Triska.. Execution may terminate as follows:
inference_limit_exceeded
into its execution. After termination of Goal,
Result is unified with the atom
inference_limit_exceeded
.
Otherwise,!
.true
.An inference is defined as a call or redo on a predicate. Please note that some primitive built-in predicates are compiled to virtual machine instructions for which inferences are not counted. The execution of predicates defined in other languages (e.g., C, C++) count as a single inference. This includes potentially expensive built-in predicates such as sort/2.
Calls to this predicate may be nested. An inner call that sets the limit below the current is honoured. An inner call that would terminate after the current limit does not change the effective limit. See also call_with_depth_limit/3 and call_with_time_limit/2.