public interface ClauseStore
A list of clauses belonging to the same family as a goal. A family is
composed by clauses with the same functor and arity. The clause store acts
as an iterator where each call to the fetch
method produces
the next clause compatible with the current goal. The current goal and a list
of local variables are normally passed to the ClauseStore
implementation during constructions time (see the ClauseStoreFactory interface).
Modifier and Type | Method and Description |
---|---|
void |
close()
Clause the store and free any external resources or caches associated
with it.
|
ClauseInfo |
fetch()
Get the next clause compatible with the current goal.
|
boolean |
hasCompatibleClause()
Return
true if there are more clauses compatible with the current
goal, irrespective of local variable bindings. |
boolean |
haveAlternatives()
Return
true if there are more clauses available compatible with
the current goal and false otherwise. |
ClauseInfo fetch()
Get the next clause compatible with the current goal. As a side-effect, all variables local to the clause store should be freed and available for unification again.
boolean haveAlternatives()
Return true
if there are more clauses available compatible with
the current goal and false
otherwise. A first call to this
method is equivalent to a call to hasCompatibleClause
(since
no variables would have been bound as yet).
boolean hasCompatibleClause()
Return true
if there are more clauses compatible with the current
goal, irrespective of local variable bindings.
void close()
Clause the store and free any external resources or caches associated with it. This method must be implemented by variants that access external resources such disk or DBMSs.
This being a cleanup method, implementations should try not to throw any exceptions here. It should also be possible to call this method repeatedly on the same instance without failure.
Copyright © 2015. All rights reserved.