Interface Chase<RW extends MaterializedData & Writable>
- Type Parameters:
RW- the writable materialized data type saturated by the chase
- All Superinterfaces:
ForwardChainingAlgorithm
- All Known Implementing Classes:
ChaseImpl, StratifiedChase
The Chase is a way to saturate a
ChasableData according to rules
The work done for the modeling and implementation of the Chase is mostly part of Guillaume Pérution-Kihli internship's work (2020)
-
Method Summary
Modifier and TypeMethodDescriptionvoidApply end of step treatments These are treatments to do at the end of each step of the chasevoidApply global end treatments These are treatments to do once at the end of the chasevoidApply global pretreatments These are treatments to do once at the beginning of the chasevoidApply pretreatments These are treatments to do at the beginning of each step of the chasedefault Stringdescribe()Returns a JSON description of the chase configuration.default voidexecute()Execute the algorithmReturns the chased data structure.Returns a structured description of the chase configuration.Returns the result of the last applied chase step.Returns the rule base used by this chase.Returns the rule scheduler driving the chase.intReturns the current chase step number.booleanIndicates whether another chase step is available.voidnextStep()Apply the next step of this chasevoidsetRuleBase(RuleBase rb) Sets the rulebase of this chase
-
Method Details
-
hasNextStep
boolean hasNextStep()Indicates whether another chase step is available.- Returns:
- true iff this chase has a next step
-
getChasableData
ChasableData<RW> getChasableData()Returns the chased data structure.- Returns:
- the ChasableData of this chase
-
nextStep
void nextStep()Apply the next step of this chase -
applyGlobalPretreatments
void applyGlobalPretreatments()Apply global pretreatments These are treatments to do once at the beginning of the chase -
applyPretreatments
void applyPretreatments()Apply pretreatments These are treatments to do at the beginning of each step of the chase -
applyEndOfStepTreatments
void applyEndOfStepTreatments()Apply end of step treatments These are treatments to do at the end of each step of the chase -
applyGlobalEndTreatments
void applyGlobalEndTreatments()Apply global end treatments These are treatments to do once at the end of the chase -
execute
default void execute()Description copied from interface:ForwardChainingAlgorithmExecute the algorithm- Specified by:
executein interfaceForwardChainingAlgorithm
-
getRuleBase
RuleBase getRuleBase()Returns the rule base used by this chase.- Returns:
- the rulebase of this chase
-
setRuleBase
-
getLastStepResults
RuleApplicationStepResult getLastStepResults()Returns the result of the last applied chase step.- Returns:
- the result of the last step of this chase
-
getRuleScheduler
RuleScheduler getRuleScheduler()Returns the rule scheduler driving the chase.- Returns:
- the rule scheduler of this chase
-
getStepCount
int getStepCount()Returns the current chase step number.- Returns:
- the number of the current step
-
getDescription
IChaseDescription getDescription()Returns a structured description of the chase configuration. Returns a description of the configuration of the chase- Returns:
- the chase description
-
describe
Returns a JSON description of the chase configuration. Returns a String description of the configuration of the chase- Returns:
- the serialized chase description
-