public class EvaluateRule extends RuleAdapter
KappaTerm evaluate() methods are called.
In fact this rule uses multiple rules, because evaluate() is implemented in a
different way on the classes that implement the KappaTerm interface:
- It evaluates KappaMin instances by proofing if there is an element e
which is evaluated and uses the value of this element if there is no greater
or equal constraint on another element that is smaller as the value of element e.
- The KappaSum instances are simply evaluated if every sub-element of the sum can be evaluated
- The KappaValue instances are evaluated as soon as their KappaMin members are
evaluated.| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<KappaTerm,java.lang.Integer> |
progressMap
stores the old values of the kappa and is used to realize if some progress in calculation occured
|
conditionalStructure, kappas| Constructor and Description |
|---|
EvaluateRule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply()
Applies the rule
|
private boolean |
changeOccurred()
Updates the progressMap and also checks if a change to one kappa value is occurred sicnge the last application of
this rule.
|
void |
setKappas(java.util.Collection<KappaValue> kappas)
Sets the Collection of
KappaValue that is used as data basis
for the rule |
setConditonalStructureprivate java.util.Map<KappaTerm,java.lang.Integer> progressMap
public void setKappas(java.util.Collection<KappaValue> kappas)
RuleBasedCReasoner.RuleKappaValue that is used as data basis
for the rulesetKappas in interface RuleBasedCReasoner.RulesetKappas in class RuleAdapterpublic boolean apply()
RuleBasedCReasoner.Ruleprivate boolean changeOccurred()