public class ForallFilter extends KBQueryFilter
Modifier and Type | Field and Description |
---|---|
private Formula |
pattern1
Pattern that must match to apply the filter
|
private Formula |
pattern2 |
Constructor and Description |
---|
ForallFilter()
Creates a new Filter on the pattern (forall ??var ??phi)
|
Modifier and Type | Method and Description |
---|---|
QueryResult |
apply(Formula formula,
ArrayList falsityReasons,
QueryResult.BoolWrapper goOn)
If the formula matches the pattern (B ??agent (forall ??var ??phi))
and ??agent equals the given agent and ??phi is a mental attitude of this
agent, the method returns
QueryResult.KNOWN if the answer to the
query on the opposite of incoming formula (not (phi)) is null and
(not (phi)) is a closed formula. |
boolean |
getObserverTriggerPatterns(Formula formula,
Set set)
By default, this method does nothing.
|
toStrings
getMyKBase, setMyKBase
private Formula pattern1
private Formula pattern2
public ForallFilter()
public QueryResult apply(Formula formula, ArrayList falsityReasons, QueryResult.BoolWrapper goOn)
QueryResult.KNOWN
if the answer to the
query on the opposite of incoming formula (not (phi)) is null and
(not (phi)) is a closed formula. It return QueryResult.UNKNOWN
otherwise.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.