public class NotFilter extends CasaQueryFilter
Modifier and Type | Field and Description |
---|---|
private Formula |
pattern
Pattern that must match to apply the filter
|
private Formula |
pattern1 |
Constructor and Description |
---|
NotFilter()
Creates a new Filter on the pattern (and ??phi ??psi)
|
Modifier and Type | Method and Description |
---|---|
QueryResult |
apply(Formula formula,
ArrayList falsityReasons,
QueryResult.BoolWrapper goOn)
If the formula matches the pattern (B ??agent (not ??phi)) and
??agent equals the given agent, this method returns a
QueryResult holding
the MatchResults of ??phi, that is the MatchResults
that satisfy ??phi. |
boolean |
getObserverTriggerPatterns(Formula formula,
Set set)
Adds in the set, the patterns for the formula phi and for the formula
psi.
|
private static QueryResult |
notPhi(Formula phi,
KBase phiKB,
ArrayList falsityReasons) |
getFormula, getNode, getSymbol, getTerm, getVariable
toStrings
getMyKBase, setMyKBase
private Formula pattern
private Formula pattern1
public NotFilter()
public QueryResult apply(Formula formula, ArrayList falsityReasons, QueryResult.BoolWrapper goOn)
QueryResult
holding
the MatchResults of ??phi, that is the MatchResults
that satisfy ??phi. Else it returns QueryResult.UNKNOWN
apply
in class KBQueryFilter
formula
- a formula on which the filter is testedagent
- a term that represents the agent is trying to apply the filterKBase.query(Formula)
public boolean getObserverTriggerPatterns(Formula formula, Set set)
getObserverTriggerPatterns
in class KBQueryFilter
formula
- an observed formulaset
- set of patterns. Each pattern corresponds to a kind a formula
which, if it is asserted in the base, triggers the observer that
observes the formula given in parameter.private static QueryResult notPhi(Formula phi, KBase phiKB, ArrayList falsityReasons)