Class EvalVisitor
java.lang.Object
net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor
net.ssehub.easy.reasoning.sseReasoner.EvalVisitor
- All Implemented Interfaces:
net.ssehub.easy.varModel.cst.IConstraintTreeVisitor,net.ssehub.easy.varModel.cstEvaluation.IConstraintEvaluator
public class EvalVisitor
extends net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor
This class shall extend
EvaluationVisitor for using it in the Reasoning plugin.- Author:
- Sizonenko
-
Nested Class Summary
Nested classes/interfaces inherited from class net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor
net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor.Message -
Field Summary
FieldsFields inherited from class net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor
assignmentState -
Constructor Summary
ConstructorsConstructorDescriptionCreates an evaluation visitor.EvalVisitor(net.ssehub.easy.varModel.confModel.IConfiguration config, net.ssehub.easy.varModel.confModel.IAssignmentState assignmentState, boolean assignmentsOnly, net.ssehub.easy.varModel.cstEvaluation.IValueChangeListener listener) Constructor for initializing superclass. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected net.ssehub.easy.varModel.confModel.IAssignmentStategetTargetState(net.ssehub.easy.varModel.confModel.IDecisionVariable var) private booleanisAssignable(net.ssehub.easy.varModel.confModel.IDecisionVariable var, net.ssehub.easy.varModel.confModel.IDecisionVariable compound) Method for determining if variable is valid for value assignment.voidsetScopeAssignments(ScopeAssignments scopeAssignments) Method for setting ScopeAssignments register to check if variable was already assigned in this scope.private booleanwasAssignedInThisScope(net.ssehub.easy.varModel.confModel.IDecisionVariable var, net.ssehub.easy.varModel.confModel.IDecisionVariable compound) Method for determining if variable was already aasigned in this scope.Methods inherited from class net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor
clearIntermediary, clearResult, constraintFailed, constraintFailed, constraintFulfilled, constraintFulfilled, constraintIsAWarning, constraintUndefined, constraintUndefined, getFailedExpression, getIteratorEvaluator, getMessage, getMessageCount, getOperationEvaluator, getResult, getResultAccessor, getResultVariable, getTargetState, init, setAssignmentState, setDispatchScope, setResolutionListener, setResultAcessor, setSelfValue, setValueChangeListener, visit, visitAnnotationVariable, visitBlockExpression, visitComment, visitCompoundAccess, visitCompoundInitializer, visitConstantValue, visitContainerInitializer, visitContainerOperationCall, visitDeferInitExpression, visitIfThen, visitLet, visitMultiAndExpression, visitOclFeatureCall, visitParenthesis, visitSelf, visitUnresolvedExpression, visitVariable
-
Field Details
-
scopeAssignments
-
-
Constructor Details
-
EvalVisitor
public EvalVisitor()Creates an evaluation visitor. -
EvalVisitor
public EvalVisitor(net.ssehub.easy.varModel.confModel.IConfiguration config, net.ssehub.easy.varModel.confModel.IAssignmentState assignmentState, boolean assignmentsOnly, net.ssehub.easy.varModel.cstEvaluation.IValueChangeListener listener) Constructor for initializing superclass.- Parameters:
config- the configuration to take already evaluated values fromassignmentState- the state for the assignments (may be null if no assignment shall take place)assignmentsOnly- if true process only assignments, else process all constraintslistener- listener a listener to notify some external mechanism about a changed variable
-
-
Method Details
-
clear
public void clear()- Overrides:
clearin classnet.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor
-
setScopeAssignments
Method for setting ScopeAssignments register to check if variable was already assigned in this scope.- Parameters:
scopeAssignments- register.
-
getTargetState
protected net.ssehub.easy.varModel.confModel.IAssignmentState getTargetState(net.ssehub.easy.varModel.confModel.IDecisionVariable var) - Overrides:
getTargetStatein classnet.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor
-
isAssignable
private boolean isAssignable(net.ssehub.easy.varModel.confModel.IDecisionVariable var, net.ssehub.easy.varModel.confModel.IDecisionVariable compound) Method for determining if variable is valid for value assignment.- Parameters:
var- Variable to be checked.compound- Parent compound (might be null).- Returns:
- true if assignment is valid.
-
wasAssignedInThisScope
private boolean wasAssignedInThisScope(net.ssehub.easy.varModel.confModel.IDecisionVariable var, net.ssehub.easy.varModel.confModel.IDecisionVariable compound) Method for determining if variable was already aasigned in this scope.- Parameters:
var- Variable to be checked.compound- Parent compound (might be null).- Returns:
- true if assignment is valid.
-