public class DefaultClauseStore extends Object implements ClauseStore
| Modifier and Type | Method and Description |
|---|---|
static ClauseStore |
build(Prolog engine,
Term goal,
List vars,
List familyClauses)
Carica una famiglia di clausole
|
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()
Verify if there is a term in compatibleGoals compatible with goal.
|
boolean |
haveAlternatives()
Return
true if there are more clauses available compatible with
the current goal and false otherwise. |
String |
toString() |
public void close()
ClauseStoreClause 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.
close in interface ClauseStorepublic boolean hasCompatibleClause()
hasCompatibleClause in interface ClauseStoregoal - compGoals - public static ClauseStore build(Prolog engine, Term goal, List vars, List familyClauses)
familyClauses - public ClauseInfo fetch()
ClauseStoreGet 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.
fetch in interface ClauseStorepublic boolean haveAlternatives()
ClauseStore
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).
haveAlternatives in interface ClauseStoreCopyright © 2015. All rights reserved.