public final class Inspect extends AbstractPredicateFactory
clause(X,Y)
/ retract(X)
- matches terms to existing clauses.
clause(X,Y)
causes X
and Y
to be matched to the head and body of an existing
clause. If no clauses are found for the predicate represented by X
then the goal fails. If there are
more than one that matches, the clauses will be matched one at a time as the goal is re-satisfied. X
must be suitably instantiated that the predicate of the clause can be determined.
retract(X)
- remove clauses from the knowledge base. The first clause that X
matches is
removed from the knowledge base. When an attempt is made to re-satisfy the goal, the next clause that X
matches is removed. X
must be suitably instantiated that the predicate of the clause can be determined.
Modifier and Type | Method and Description |
---|---|
protected Predicate |
getPredicate(Term clauseHead) |
protected Predicate |
getPredicate(Term clauseHead,
Term clauseBody) |
static Inspect |
inspectClause() |
static Inspect |
retract() |
getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicate, getPredicate, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBase
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAlwaysCutOnBacktrack
public static Inspect inspectClause()
public static Inspect retract()
protected Predicate getPredicate(Term clauseHead)
getPredicate
in class AbstractPredicateFactory
protected Predicate getPredicate(Term clauseHead, Term clauseBody)
getPredicate
in class AbstractPredicateFactory
Copyright © 2024. All rights reserved.