public abstract class KBQueryFilter extends KBFilter
Constructor and Description |
---|
KBQueryFilter() |
Modifier and Type | Method and Description |
---|---|
abstract 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. |
abstract 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 abstract QueryResult apply(Formula formula, ArrayList falsityReasons, QueryResult.BoolWrapper goOn)
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.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 abstract boolean getObserverTriggerPatterns(Formula formula, Set set)
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.public ArrayList toStrings()