public class AndFilter extends KBQueryFilter
Modifier and Type | Field and Description |
---|---|
private Formula |
pattern
Pattern that must match to apply the filter
|
Constructor and Description |
---|
AndFilter()
Creates a new Filter on the pattern (and ??phi ??psi)
|
Modifier and Type | Method and Description |
---|---|
private static QueryResult |
andPhiPsi(Formula phi,
KBase phiKB,
Formula psi,
KBase psiKB,
ArrayList falsityReasons) |
QueryResult |
apply(Formula formula,
ArrayList falsityReasons,
QueryResult.BoolWrapper goOn)
If the formula matches the pattern (B ??agent (and ??phi ??psi)) and
??agent equals the given agent, this method returns a
QueryResult holding
the joined MatchResults of ??phi and ??psi, that is the MatchResults
that satisfy ??phi as well as ??psi. |
boolean |
getObserverTriggerPatterns(Formula formula,
Set set)
Adds in the set, the patterns for the formula phi and for the formula
psi.
|
toStrings
getMyKBase, setMyKBase
private Formula pattern
public AndFilter()
public QueryResult apply(Formula formula, ArrayList falsityReasons, QueryResult.BoolWrapper goOn)
QueryResult
holding
the joined MatchResults of ??phi and ??psi, that is the MatchResults
that satisfy ??phi as well as ??psi. 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.