public class OrFilter extends KBQueryFilter
Modifier and Type | Field and Description |
---|---|
private Formula |
pattern
Pattern that must match to apply the filter
|
private Formula |
pattern2 |
Constructor and Description |
---|
OrFilter()
Creates a new Filter on the pattern (B ??agent (or ??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 (or ??phi ??psi)) and
??agent equals the given agent term, this method returns the union
of the whole of solutions of the first part of the formula and
the whole of solutions of the second part of the formula.
|
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
private Formula pattern2
public OrFilter()
public QueryResult apply(Formula formula, ArrayList falsityReasons, QueryResult.BoolWrapper goOn)
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.