Next: 13. Other XSB Packages
Up: 12. XASP: Answer Set
Previous: 12.2 The Smodels Interface
Contents
Index
.
This module provides the interface from the xnmr module to
Smodels. It does not use the sm_int interface, but rather
directly calls the Smodels C interface, and can be thought of as a
special-purpose alternative to sm_int.
- init_smodels(+Query)
-
Initializes smodels with the residual program produced by evaluating
Query. Query must be a call to a tabled predicate that is
currently completely evaluated (and should have a delay list)
- atom_handle(?Atom,?AtomHandle)
-
The handle of an atom is set by init_smodels/1 to be an
integer uniquely identifying each atoms in the residual program (and
thus each atom in the Herbrand base of the program for which the
stable models are to be derived. The initial query given to
init_smodels has the atom-handle of 1.
- in_all_stable_models(+AtomHandle,+Neg)
-
in_all_stable_models/2 returns true if Neg is 0 and the
atom numbered AtomHandle returns true in all stable models (of
the residual program set by the previous call to init_smodels/1). If Neg is nonzero, then it is true if the
atom is in NO stable model.
- pstable_model(+Query,-Model,+Flag)
-
returns nondeterministically a list of atoms true in the partial
stable model total on the atoms relevant to instances of Query,
if Flag is 0. If Flag is 1, it only returns models in
which the instance of Query is true.
- a_stable_model
-
This predicate invokes Smodels to find a (new) stable model (of the
program set by the previous invocation of init_smodels/1.) It
will compute all stable models through backtracking. If there are no
(more) stable models, it fails. Atoms true in a stable model can be
examined by in_current_stable_model/1.
- in_current_stable_model(?AtomHandle)
-
This predicate is true of handles of atoms true in the current stable
model (set by an invocation of a_stable_model/0.)
- current_stable_model(-AtomList)
-
returns the list of atoms true in the current stable model.
- print_current_stable_model
-
prints the current stable model to the stream to which answers are
sent (i.e stdfbk)
Next: 13. Other XSB Packages
Up: 12. XASP: Answer Set
Previous: 12.2 The Smodels Interface
Contents
Index
Terrance Swift
2007-10-06