Finally, using “as max_answers(Count)
” or
the Prolog flag
max_answers_for_subgoal,
the number of answers in a table is restrained. In addition to the
tripwire actions this restraint supports the action bounded_rationality
193The
action complete_soundly
is supported as a synonym for XSB
compatibility. If the restraint is reached in the bounded
rationality mode the system takes the following actions:
max_answers
restraint on some table was violated.The program and subsequent query below illustrate the behavior.
:- table p/2 as max_answers(3). p(M,N) :- between(1,M,N).
?- p(1 000 000, X). X = 3 ; X = 2 ; X = 1 ; % WFS residual program p(1000000, X) :- answer_count_restraint. p(1000000, X).