Class ChaseImpl<RW extends MaterializedData & Writable>
java.lang.Object
fr.inria.rules.integraal.forward_chaining.chase.ChaseImpl<RW>
- Type Parameters:
RW- the writable materialized data type processed by the chase
- All Implemented Interfaces:
ForwardChainingAlgorithm, Chase<RW>
Default implementation of the chase algorithm
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedChaseImpl(ChasableData<RW> chasableData, RuleBase rb, RuleScheduler rule_scheduler, RuleApplier<RW> rule_applier, Collection<HaltingCondition<RW>> halting_conditions, Collection<PreTreatment<RW>> global_preTreatments, Collection<PreTreatment<RW>> step_preTreatments, Collection<EndTreatment<RW>> global_end_treatments, Collection<EndTreatment<RW>> end_of_step_treatments) UseChaseBuilderto create a chase -
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 chasedescribe()Returns a JSON description of the chase configuration.//////////////////////////////////////////////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()//////////////////////////////////////////////voidsetRuleBase(RuleBase rb) Sets the rulebase of this chasetoString()
-
Constructor Details
-
ChaseImpl
protected ChaseImpl(ChasableData<RW> chasableData, RuleBase rb, RuleScheduler rule_scheduler, RuleApplier<RW> rule_applier, Collection<HaltingCondition<RW>> halting_conditions, Collection<PreTreatment<RW>> global_preTreatments, Collection<PreTreatment<RW>> step_preTreatments, Collection<EndTreatment<RW>> global_end_treatments, Collection<EndTreatment<RW>> end_of_step_treatments) UseChaseBuilderto create a chase- Parameters:
chasableData- the factbaserb- the rulebaserule_scheduler- the rule schedulerrule_applier- the rule applierhalting_conditions- the halting conditionsglobal_preTreatments- the global pre-treatmentsstep_preTreatments- the step pre-treatmentsglobal_end_treatments- the global end treatmentsend_of_step_treatments- the end of step treatments
-
-
Method Details
-
nextStep
public void nextStep()//////////////////////////////////////////////- Specified by:
nextStepin interfaceChase<RW extends MaterializedData & Writable>
-
hasNextStep
public boolean hasNextStep()Description copied from interface:ChaseIndicates whether another chase step is available.- Specified by:
hasNextStepin interfaceChase<RW extends MaterializedData & Writable>- Returns:
- true iff this chase has a next step
-
applyGlobalPretreatments
public void applyGlobalPretreatments()Description copied from interface:ChaseApply global pretreatments These are treatments to do once at the beginning of the chase- Specified by:
applyGlobalPretreatmentsin interfaceChase<RW extends MaterializedData & Writable>
-
applyPretreatments
public void applyPretreatments()Description copied from interface:ChaseApply pretreatments These are treatments to do at the beginning of each step of the chase- Specified by:
applyPretreatmentsin interfaceChase<RW extends MaterializedData & Writable>
-
applyEndOfStepTreatments
public void applyEndOfStepTreatments()Description copied from interface:ChaseApply end of step treatments These are treatments to do at the end of each step of the chase- Specified by:
applyEndOfStepTreatmentsin interfaceChase<RW extends MaterializedData & Writable>
-
applyGlobalEndTreatments
public void applyGlobalEndTreatments()Description copied from interface:ChaseApply global end treatments These are treatments to do once at the end of the chase- Specified by:
applyGlobalEndTreatmentsin interfaceChase<RW extends MaterializedData & Writable>
-
getChasableData
//////////////////////////////////////////////- Specified by:
getChasableDatain interfaceChase<RW extends MaterializedData & Writable>- Returns:
- the ChasableData of this chase
-
getRuleBase
Description copied from interface:ChaseReturns the rule base used by this chase.- Specified by:
getRuleBasein interfaceChase<RW extends MaterializedData & Writable>- Returns:
- the rulebase of this chase
-
setRuleBase
Description copied from interface:ChaseSets the rulebase of this chase- Specified by:
setRuleBasein interfaceChase<RW extends MaterializedData & Writable>- Parameters:
rb- the new rulebase
-
getLastStepResults
Description copied from interface:ChaseReturns the result of the last applied chase step.- Specified by:
getLastStepResultsin interfaceChase<RW extends MaterializedData & Writable>- Returns:
- the result of the last step of this chase
-
getRuleScheduler
Description copied from interface:ChaseReturns the rule scheduler driving the chase.- Specified by:
getRuleSchedulerin interfaceChase<RW extends MaterializedData & Writable>- Returns:
- the rule scheduler of this chase
-
toString
-
getStepCount
public int getStepCount()Description copied from interface:ChaseReturns the current chase step number.- Specified by:
getStepCountin interfaceChase<RW extends MaterializedData & Writable>- Returns:
- the number of the current step
-
getDescription
Description copied from interface:ChaseReturns a structured description of the chase configuration. Returns a description of the configuration of the chase- Specified by:
getDescriptionin interfaceChase<RW extends MaterializedData & Writable>- Returns:
- the chase description
-
describe
-