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

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor

    assignmentState
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates 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 Type
    Method
    Description
    void
     
    protected net.ssehub.easy.varModel.confModel.IAssignmentState
    getTargetState(net.ssehub.easy.varModel.confModel.IDecisionVariable var)
     
    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.
    void
    Method for setting ScopeAssignments register to check if variable was already assigned in this scope.
    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.

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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 from
      assignmentState - the state for the assignments (may be null if no assignment shall take place)
      assignmentsOnly - if true process only assignments, else process all constraints
      listener - listener a listener to notify some external mechanism about a changed variable
  • Method Details

    • clear

      public void clear()
      Overrides:
      clear in class net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor
    • setScopeAssignments

      public void setScopeAssignments(ScopeAssignments scopeAssignments)
      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:
      getTargetState in class net.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.