#include <sicstus/sicstus.h> int SP_query_cut_fail(SP_pred_ref predicate, SP_term_ref arg1, …);
Calls a predicate for side-effects, reclaiming any storage used.
The predicate to call.
The arguments to pass.
SP_SUCCESS if the goal succeeded,
SP_FAILURE if it failed, and
SP_ERROR if an error condition occurred.
Call this is you are only interested in the side-effects of a predicate. It will try to prove the predicate, cut away the rest of the solutions, and finally fail. This will reclaim the storage used after the call, and throw away any solution found.
Finding One Solution of a Call.