public class IsdoingQueryFilter extends KBQueryFilter
Modifier and Type | Field and Description |
---|---|
private Formula |
pattern
Pattern that must match to apply the filter
|
Constructor and Description |
---|
IsdoingQueryFilter()
Creates a new Filter on the pattern
(B ??agent (not (is_doing ??myself ??plan)))
|
Modifier and Type | Method and Description |
---|---|
QueryResult |
apply(Formula formula,
ArrayList falsityReasons,
QueryResult.BoolWrapper goOn)
If the formula matches the pattern
this method returns the result of the query of
(not (B myself (is_doing myself plan))) instead
|
boolean |
getObserverTriggerPatterns(Formula formula,
Set set)
Adds nothing in the set, returns false.
|
toStrings
getMyKBase, setMyKBase
private Formula pattern
public IsdoingQueryFilter()
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 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.