Class VariablesInNotSimpleAssignmentConstraintsFinder

java.lang.Object
net.ssehub.easy.reasoning.sseReasoner.model.VariablesInNotSimpleAssignmentConstraintsFinder
All Implemented Interfaces:
net.ssehub.easy.varModel.cst.IConstraintTreeVisitor

public class VariablesInNotSimpleAssignmentConstraintsFinder extends Object implements net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
A visitor to retrieve variables from constraints.
  • Field Details

    • config

      private net.ssehub.easy.varModel.confModel.Configuration config
    • constraintMap

      private VariablesMap constraintMap
    • constraint

      private net.ssehub.easy.varModel.model.Constraint constraint
    • add

      private boolean add
    • evaluator

      private net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor evaluator
  • Constructor Details

    • VariablesInNotSimpleAssignmentConstraintsFinder

      public VariablesInNotSimpleAssignmentConstraintsFinder(VariablesMap constraintMap)
      Creates a visitor instance.
      Parameters:
      constraintMap - the constraint map to use for storing results
  • Method Details

    • accept

      public void accept(net.ssehub.easy.varModel.model.Constraint constraint, net.ssehub.easy.varModel.confModel.Configuration config)
      Accepts and visits a constraint.
      Parameters:
      constraint - the constraint to accept
      config - the configuration used to resolve expressions
    • acceptAndClear

      public void acceptAndClear(net.ssehub.easy.varModel.model.Constraint constraint, net.ssehub.easy.varModel.confModel.Configuration config)
      Parameters:
      constraint - the constraint to accept
      config - the configuration used to resolve expressions
    • acceptAndClear

      public void acceptAndClear(net.ssehub.easy.varModel.model.Constraint constraint, net.ssehub.easy.varModel.confModel.Configuration config, boolean add)
      Parameters:
      constraint - the constraint to accept
      config - the configuration used to resolve expressions
      add - add true or remove false
    • acceptAndClear

      public void acceptAndClear(List<net.ssehub.easy.varModel.model.Constraint> constraints, net.ssehub.easy.varModel.confModel.Configuration config, boolean add)
      Combines accept(Constraint, Configuration) and clear() for an iterable of constraints.
      Parameters:
      constraints - the constraints to accept
      config - the configuration used to resolve expressions
      add - add true or remove false
    • clear

      public void clear()
      Clears this visitor for reuse.
    • forRemove

      Turns this finder into remove mode.
      Returns:
      this
    • visitConstantValue

      public void visitConstantValue(net.ssehub.easy.varModel.cst.ConstantValue value)
      Specified by:
      visitConstantValue in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitVariable

      public void visitVariable(net.ssehub.easy.varModel.cst.Variable variable)
      Specified by:
      visitVariable in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • modifyRelation

      private void modifyRelation(net.ssehub.easy.varModel.model.AbstractVariable variable, net.ssehub.easy.varModel.model.Constraint constraint)
      Modifies the relationship between variable and constraint due to add.
      Parameters:
      variable - the variable
      constraint - the constraint
    • visitAnnotationVariable

      public void visitAnnotationVariable(net.ssehub.easy.varModel.cst.AttributeVariable variable)
      Specified by:
      visitAnnotationVariable in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitParenthesis

      public void visitParenthesis(net.ssehub.easy.varModel.cst.Parenthesis parenthesis)
      Specified by:
      visitParenthesis in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitComment

      public void visitComment(net.ssehub.easy.varModel.cst.Comment comment)
      Specified by:
      visitComment in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • isConstraint

      private boolean isConstraint(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst)
      Returns whether the type of cst is a constraint type.
      Parameters:
      cst - the constraint syntax tree to look for
      Returns:
      true for constraint type, false else
    • visitOclFeatureCall

      public void visitOclFeatureCall(net.ssehub.easy.varModel.cst.OCLFeatureCall call)
      Specified by:
      visitOclFeatureCall in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitDeferInitExpression

      public void visitDeferInitExpression(net.ssehub.easy.varModel.cst.DeferInitExpression expression)
      Specified by:
      visitDeferInitExpression in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitMultiAndExpression

      public void visitMultiAndExpression(net.ssehub.easy.varModel.cst.MultiAndExpression expression)
      Specified by:
      visitMultiAndExpression in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitLet

      public void visitLet(net.ssehub.easy.varModel.cst.Let let)
      Specified by:
      visitLet in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitIfThen

      public void visitIfThen(net.ssehub.easy.varModel.cst.IfThen ifThen)
      Specified by:
      visitIfThen in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitContainerOperationCall

      public void visitContainerOperationCall(net.ssehub.easy.varModel.cst.ContainerOperationCall call)
      Specified by:
      visitContainerOperationCall in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitCompoundAccess

      public void visitCompoundAccess(net.ssehub.easy.varModel.cst.CompoundAccess access)
      Specified by:
      visitCompoundAccess in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitUnresolvedExpression

      public void visitUnresolvedExpression(net.ssehub.easy.varModel.cst.UnresolvedExpression expression)
      Specified by:
      visitUnresolvedExpression in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitCompoundInitializer

      public void visitCompoundInitializer(net.ssehub.easy.varModel.cst.CompoundInitializer initializer)
      Specified by:
      visitCompoundInitializer in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitContainerInitializer

      public void visitContainerInitializer(net.ssehub.easy.varModel.cst.ContainerInitializer initializer)
      Specified by:
      visitContainerInitializer in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitSelf

      public void visitSelf(net.ssehub.easy.varModel.cst.Self self)
      Specified by:
      visitSelf in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • visitBlockExpression

      public void visitBlockExpression(net.ssehub.easy.varModel.cst.BlockExpression block)
      Specified by:
      visitBlockExpression in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor