class HornClauseFilter.HornClauseQueryFilter extends KBQueryFilter
Modifier and Type | Field and Description |
---|---|
(package private) Formula |
body |
(package private) Formula |
head |
(package private) String |
stringRepresentation |
Constructor and Description |
---|
HornClauseQueryFilter(Term agentName,
Formula head,
Formula body) |
Modifier and Type | Method and Description |
---|---|
QueryResult |
apply(Formula formula,
ArrayList falsityReasons,
QueryResult.BoolWrapper goOn)
Returns a
QueryResult object, similar to the one returned by the query
operation of the KBase interface. |
boolean |
getObserverTriggerPatterns(Formula formula,
Set set)
Fills the set given in parameter with the patterns manipulated by this
filter and likely to trigger the observers which observe the formula given
in parameter.
|
ArrayList |
toStrings() |
getMyKBase, setMyKBase
public QueryResult apply(Formula formula, ArrayList falsityReasons, QueryResult.BoolWrapper goOn)
KBQueryFilter
QueryResult
object, similar to the one returned by the query
operation of the KBase
interface. Such an objet can be
- QueryResult.UNKNOWN
if the filter is not applicable or
returns no solution,
- QueryResult.KNOWN
if the filter returns
a solution and the formula holds no meta-variable,
- a not empty QueryResult
object if the filter returns
solutions and the formula holds meta-variables.apply
in class KBQueryFilter
formula
- a formula on which the filter is testedfalsityReasons
- a list of believed formulas, which must be filled to explain
a null result of the method. If the filter is actually not
applicable, this list must not be modified.
Warning: when calling the method, this parameter should not be nullKBase.query(Formula)
public ArrayList toStrings()
toStrings
in class KBQueryFilter
public boolean getObserverTriggerPatterns(Formula formula, Set set)
KBQueryFilter
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.