Class ConstraintFunctions.TransitiveConstraintFinder

java.lang.Object
net.ssehub.easy.varModel.model.filter.ConstraintFinder
net.ssehub.easy.reasoning.sseReasoner.functions.ConstraintFunctions.TransitiveConstraintFinder
All Implemented Interfaces:
net.ssehub.easy.varModel.cst.IConstraintTreeVisitor, net.ssehub.easy.varModel.model.datatypes.ICustomDatatypeVisitor, net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor, net.ssehub.easy.varModel.model.IModelVisitor
Enclosing class:
ConstraintFunctions

private static class ConstraintFunctions.TransitiveConstraintFinder extends net.ssehub.easy.varModel.model.filter.ConstraintFinder implements net.ssehub.easy.varModel.cst.IConstraintTreeVisitor, net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
A transitive constraint/variables finder.
Author:
Holger Eichelberger
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     
    private Set<net.ssehub.easy.varModel.model.AbstractVariable>
     
    private Set<Object>
     
    private net.ssehub.easy.varModel.model.IModelVisitor
     
    private Set<net.ssehub.easy.varModel.model.AbstractVariable>
     
    private net.ssehub.easy.varModel.model.Project
     
    private net.ssehub.easy.varModel.model.Project
     
    private Set<net.ssehub.easy.varModel.model.AbstractVariable>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TransitiveConstraintFinder(net.ssehub.easy.varModel.model.Project scope, net.ssehub.easy.varModel.model.Project target)
    Creates a finder with search scope and target project.
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    addToVariables(net.ssehub.easy.varModel.model.AbstractVariable var)
    Adds a variable to variables.
    private void
    handle(net.ssehub.easy.varModel.model.AbstractVariable variable)
    Handles the occurrence of a variable.
    protected void
    startAccept(net.ssehub.easy.varModel.model.Project project)
     
    void
    visit(net.ssehub.easy.varModel.model.AbstractVariable var)
    Call for the top-level variable to be visited.
    private void
    visit(net.ssehub.easy.varModel.model.datatypes.IDatatype type)
    Internal method to start visiting a datatype.
    void
    visitAnnotationVariable(net.ssehub.easy.varModel.cst.AttributeVariable variable)
     
    void
    visitAnyType(net.ssehub.easy.varModel.model.datatypes.AnyType datatype)
     
    void
    visitAttributeAssignment(net.ssehub.easy.varModel.model.AttributeAssignment assignment)
     
    void
    visitBlockExpression(net.ssehub.easy.varModel.cst.BlockExpression block)
     
    void
    visitBooleanType(net.ssehub.easy.varModel.model.datatypes.BooleanType type)
     
    void
    visitComment(net.ssehub.easy.varModel.cst.Comment comment)
     
    void
    visitCompoundAccess(net.ssehub.easy.varModel.cst.CompoundAccess access)
     
    void
    visitCompoundInitializer(net.ssehub.easy.varModel.cst.CompoundInitializer initializer)
     
    void
    visitCompoundType(net.ssehub.easy.varModel.model.datatypes.Compound compound)
     
    void
    visitConstantValue(net.ssehub.easy.varModel.cst.ConstantValue value)
     
    void
    visitConstraint(net.ssehub.easy.varModel.model.Constraint constraint)
     
    void
    visitConstraintType(net.ssehub.easy.varModel.model.datatypes.ConstraintType type)
     
    void
    visitContainerInitializer(net.ssehub.easy.varModel.cst.ContainerInitializer initializer)
     
    void
    visitContainerOperationCall(net.ssehub.easy.varModel.cst.ContainerOperationCall call)
     
    void
    visitDatatype(net.ssehub.easy.varModel.model.datatypes.IDatatype datatype)
     
    void
    visitDecisionVariableDeclaration(net.ssehub.easy.varModel.model.DecisionVariableDeclaration decl)
     
    void
    visitDeferInitExpression(net.ssehub.easy.varModel.cst.DeferInitExpression expression)
     
    void
    visitDerivedType(net.ssehub.easy.varModel.model.datatypes.DerivedDatatype datatype)
     
    void
    visitEnumType(net.ssehub.easy.varModel.model.datatypes.Enum enumType)
     
    void
    visitIfThen(net.ssehub.easy.varModel.cst.IfThen ifThen)
     
    void
    visitIntegerType(net.ssehub.easy.varModel.model.datatypes.IntegerType type)
     
    void
    visitLet(net.ssehub.easy.varModel.cst.Let let)
     
    void
    visitMetaType(net.ssehub.easy.varModel.model.datatypes.MetaType datatype)
     
    void
    visitMultiAndExpression(net.ssehub.easy.varModel.cst.MultiAndExpression expression)
     
    void
    visitOclFeatureCall(net.ssehub.easy.varModel.cst.OCLFeatureCall call)
     
    void
    visitOrderedEnumType(net.ssehub.easy.varModel.model.datatypes.OrderedEnum enumType)
     
    void
    visitParenthesis(net.ssehub.easy.varModel.cst.Parenthesis parenthesis)
     
    void
    visitProject(net.ssehub.easy.varModel.model.Project project)
     
    void
    visitRealType(net.ssehub.easy.varModel.model.datatypes.RealType type)
     
    void
    visitSelf(net.ssehub.easy.varModel.cst.Self self)
     
    void
    visitSequence(net.ssehub.easy.varModel.model.datatypes.Sequence sequence)
     
    void
    visitSet(net.ssehub.easy.varModel.model.datatypes.Set set)
     
    void
    visitStringType(net.ssehub.easy.varModel.model.datatypes.StringType type)
     
    void
    visitUnresolvedExpression(net.ssehub.easy.varModel.cst.UnresolvedExpression expression)
     
    void
    visitVariable(net.ssehub.easy.varModel.cst.Variable variable)
     
    void
    visitVersionType(net.ssehub.easy.varModel.model.datatypes.VersionType type)
     

    Methods inherited from class net.ssehub.easy.varModel.model.filter.ConstraintFinder

    getAttributeAssignments, getConstraints, getEvalConstraints, visitAttribute, visitComment, visitCompound, visitCompoundAccessStatement, visitDerivedDatatype, visitEnum, visitEnumLiteral, visitFreezeBlock, visitOperationDefinition, visitOrderedEnum, visitPartialEvaluationBlock, visitProjectImport, visitProjectInterface, visitReference

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor

    visitReference
  • Field Details

    • add

      private boolean add
    • variables

      private Set<net.ssehub.easy.varModel.model.AbstractVariable> variables
    • scheduled

      private Set<net.ssehub.easy.varModel.model.AbstractVariable> scheduled
    • candidates

      private Set<net.ssehub.easy.varModel.model.AbstractVariable> candidates
    • done

      private Set<Object> done
    • scope

      private net.ssehub.easy.varModel.model.Project scope
    • target

      private net.ssehub.easy.varModel.model.Project target
    • mVisitor

      private net.ssehub.easy.varModel.model.IModelVisitor mVisitor
  • Constructor Details

    • TransitiveConstraintFinder

      public TransitiveConstraintFinder(net.ssehub.easy.varModel.model.Project scope, net.ssehub.easy.varModel.model.Project target)
      Creates a finder with search scope and target project.
      Parameters:
      scope - the scope
      target - the target project
  • Method Details

    • startAccept

      protected void startAccept(net.ssehub.easy.varModel.model.Project project)
      Overrides:
      startAccept in class net.ssehub.easy.varModel.model.filter.ConstraintFinder
    • visit

      public void visit(net.ssehub.easy.varModel.model.AbstractVariable var)
      Call for the top-level variable to be visited.
      Parameters:
      var - the variable
    • visit

      private void visit(net.ssehub.easy.varModel.model.datatypes.IDatatype type)
      Internal method to start visiting a datatype. Due to additional checks, please do not visit the type directly.
      Parameters:
      type - the type to be visited
    • addToVariables

      private void addToVariables(net.ssehub.easy.varModel.model.AbstractVariable var)
      Adds a variable to variables.
      Parameters:
      var - the variable
    • visitDecisionVariableDeclaration

      public void visitDecisionVariableDeclaration(net.ssehub.easy.varModel.model.DecisionVariableDeclaration decl)
      Specified by:
      visitDecisionVariableDeclaration in interface net.ssehub.easy.varModel.model.IModelVisitor
      Overrides:
      visitDecisionVariableDeclaration in class net.ssehub.easy.varModel.model.filter.ConstraintFinder
    • visitConstraint

      public void visitConstraint(net.ssehub.easy.varModel.model.Constraint constraint)
      Specified by:
      visitConstraint in interface net.ssehub.easy.varModel.model.IModelVisitor
      Overrides:
      visitConstraint in class net.ssehub.easy.varModel.model.filter.ConstraintFinder
    • visitProject

      public void visitProject(net.ssehub.easy.varModel.model.Project project)
      Specified by:
      visitProject in interface net.ssehub.easy.varModel.model.IModelVisitor
      Overrides:
      visitProject in class net.ssehub.easy.varModel.model.filter.ConstraintFinder
    • visitConstantValue

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

      private void handle(net.ssehub.easy.varModel.model.AbstractVariable variable)
      Handles the occurrence of a variable.
      Parameters:
      variable - the variable
    • visitVariable

      public void visitVariable(net.ssehub.easy.varModel.cst.Variable variable)
      Specified by:
      visitVariable in interface net.ssehub.easy.varModel.cst.IConstraintTreeVisitor
    • 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
    • visitOclFeatureCall

      public void visitOclFeatureCall(net.ssehub.easy.varModel.cst.OCLFeatureCall call)
      Specified by:
      visitOclFeatureCall 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
    • 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
    • visitDatatype

      public void visitDatatype(net.ssehub.easy.varModel.model.datatypes.IDatatype datatype)
      Specified by:
      visitDatatype in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitAnyType

      public void visitAnyType(net.ssehub.easy.varModel.model.datatypes.AnyType datatype)
      Specified by:
      visitAnyType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitMetaType

      public void visitMetaType(net.ssehub.easy.varModel.model.datatypes.MetaType datatype)
      Specified by:
      visitMetaType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitDerivedType

      public void visitDerivedType(net.ssehub.easy.varModel.model.datatypes.DerivedDatatype datatype)
      Specified by:
      visitDerivedType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitBooleanType

      public void visitBooleanType(net.ssehub.easy.varModel.model.datatypes.BooleanType type)
      Specified by:
      visitBooleanType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitStringType

      public void visitStringType(net.ssehub.easy.varModel.model.datatypes.StringType type)
      Specified by:
      visitStringType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitConstraintType

      public void visitConstraintType(net.ssehub.easy.varModel.model.datatypes.ConstraintType type)
      Specified by:
      visitConstraintType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitIntegerType

      public void visitIntegerType(net.ssehub.easy.varModel.model.datatypes.IntegerType type)
      Specified by:
      visitIntegerType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitVersionType

      public void visitVersionType(net.ssehub.easy.varModel.model.datatypes.VersionType type)
      Specified by:
      visitVersionType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitRealType

      public void visitRealType(net.ssehub.easy.varModel.model.datatypes.RealType type)
      Specified by:
      visitRealType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitCompoundType

      public void visitCompoundType(net.ssehub.easy.varModel.model.datatypes.Compound compound)
      Specified by:
      visitCompoundType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitAttributeAssignment

      public void visitAttributeAssignment(net.ssehub.easy.varModel.model.AttributeAssignment assignment)
      Specified by:
      visitAttributeAssignment in interface net.ssehub.easy.varModel.model.IModelVisitor
      Overrides:
      visitAttributeAssignment in class net.ssehub.easy.varModel.model.filter.ConstraintFinder
    • visitSet

      public void visitSet(net.ssehub.easy.varModel.model.datatypes.Set set)
      Specified by:
      visitSet in interface net.ssehub.easy.varModel.model.datatypes.ICustomDatatypeVisitor
      Specified by:
      visitSet in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
      Overrides:
      visitSet in class net.ssehub.easy.varModel.model.filter.ConstraintFinder
    • visitSequence

      public void visitSequence(net.ssehub.easy.varModel.model.datatypes.Sequence sequence)
      Specified by:
      visitSequence in interface net.ssehub.easy.varModel.model.datatypes.ICustomDatatypeVisitor
      Specified by:
      visitSequence in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
      Overrides:
      visitSequence in class net.ssehub.easy.varModel.model.filter.ConstraintFinder
    • visitEnumType

      public void visitEnumType(net.ssehub.easy.varModel.model.datatypes.Enum enumType)
      Specified by:
      visitEnumType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor
    • visitOrderedEnumType

      public void visitOrderedEnumType(net.ssehub.easy.varModel.model.datatypes.OrderedEnum enumType)
      Specified by:
      visitOrderedEnumType in interface net.ssehub.easy.varModel.model.datatypes.IDatatypeVisitor