If you use the database, the clauses you assert might have
constraints associated with their variables. You should use
projecting_assert/1
instead of assert/1
in order to ensure
that only the relevant and projected constraints get stored in the
database.
| ?- {A+B=<33}, projecting_assert(test(A,B)). {A+B=<33} | ?- listing(test). test(A, B) :- {A+B=<rat(33,1)} | ?- test(A,B). {A+B=<33}