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 Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate net.ssehub.easy.varModel.confModel.Configurationprivate net.ssehub.easy.varModel.model.Constraintprivate VariablesMapprivate net.ssehub.easy.varModel.cstEvaluation.EvaluationVisitor -
Constructor Summary
ConstructorsConstructorDescriptionVariablesInNotSimpleAssignmentConstraintsFinder(VariablesMap constraintMap) Creates a visitor instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(net.ssehub.easy.varModel.model.Constraint constraint, net.ssehub.easy.varModel.confModel.Configuration config) Accepts and visits a constraint.voidacceptAndClear(List<net.ssehub.easy.varModel.model.Constraint> constraints, net.ssehub.easy.varModel.confModel.Configuration config, boolean add) Combinesaccept(Constraint, Configuration)andclear()for an iterable of constraints.voidacceptAndClear(net.ssehub.easy.varModel.model.Constraint constraint, net.ssehub.easy.varModel.confModel.Configuration config) Combinesaccept(Constraint, Configuration)andclear().voidacceptAndClear(net.ssehub.easy.varModel.model.Constraint constraint, net.ssehub.easy.varModel.confModel.Configuration config, boolean add) Combinesaccept(Constraint, Configuration)andclear().voidclear()Clears this visitor for reuse.Turns this finder into remove mode.private booleanisConstraint(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst) Returns whether the type ofcstis a constraint type.private voidmodifyRelation(net.ssehub.easy.varModel.model.AbstractVariable variable, net.ssehub.easy.varModel.model.Constraint constraint) voidvisitAnnotationVariable(net.ssehub.easy.varModel.cst.AttributeVariable variable) voidvisitBlockExpression(net.ssehub.easy.varModel.cst.BlockExpression block) voidvisitComment(net.ssehub.easy.varModel.cst.Comment comment) voidvisitCompoundAccess(net.ssehub.easy.varModel.cst.CompoundAccess access) voidvisitCompoundInitializer(net.ssehub.easy.varModel.cst.CompoundInitializer initializer) voidvisitConstantValue(net.ssehub.easy.varModel.cst.ConstantValue value) voidvisitContainerInitializer(net.ssehub.easy.varModel.cst.ContainerInitializer initializer) voidvisitContainerOperationCall(net.ssehub.easy.varModel.cst.ContainerOperationCall call) voidvisitDeferInitExpression(net.ssehub.easy.varModel.cst.DeferInitExpression expression) voidvisitIfThen(net.ssehub.easy.varModel.cst.IfThen ifThen) voidvisitLet(net.ssehub.easy.varModel.cst.Let let) voidvisitMultiAndExpression(net.ssehub.easy.varModel.cst.MultiAndExpression expression) voidvisitOclFeatureCall(net.ssehub.easy.varModel.cst.OCLFeatureCall call) voidvisitParenthesis(net.ssehub.easy.varModel.cst.Parenthesis parenthesis) voidvisitSelf(net.ssehub.easy.varModel.cst.Self self) voidvisitUnresolvedExpression(net.ssehub.easy.varModel.cst.UnresolvedExpression expression) voidvisitVariable(net.ssehub.easy.varModel.cst.Variable variable)
-
Field Details
-
config
private net.ssehub.easy.varModel.confModel.Configuration config -
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
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 acceptconfig- the configuration used to resolve expressions
-
acceptAndClear
public void acceptAndClear(net.ssehub.easy.varModel.model.Constraint constraint, net.ssehub.easy.varModel.confModel.Configuration config) Combinesaccept(Constraint, Configuration)andclear().- Parameters:
constraint- the constraint to acceptconfig- 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) Combinesaccept(Constraint, Configuration)andclear().- Parameters:
constraint- the constraint to acceptconfig- the configuration used to resolve expressionsadd- addtrueor removefalse
-
acceptAndClear
public void acceptAndClear(List<net.ssehub.easy.varModel.model.Constraint> constraints, net.ssehub.easy.varModel.confModel.Configuration config, boolean add) Combinesaccept(Constraint, Configuration)andclear()for an iterable of constraints.- Parameters:
constraints- the constraints to acceptconfig- the configuration used to resolve expressionsadd- addtrueor removefalse
-
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:
visitConstantValuein interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitVariable
public void visitVariable(net.ssehub.easy.varModel.cst.Variable variable) - Specified by:
visitVariablein interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
modifyRelation
private void modifyRelation(net.ssehub.easy.varModel.model.AbstractVariable variable, net.ssehub.easy.varModel.model.Constraint constraint) - Parameters:
variable- the variableconstraint- the constraint
-
visitAnnotationVariable
public void visitAnnotationVariable(net.ssehub.easy.varModel.cst.AttributeVariable variable) - Specified by:
visitAnnotationVariablein interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitParenthesis
public void visitParenthesis(net.ssehub.easy.varModel.cst.Parenthesis parenthesis) - Specified by:
visitParenthesisin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitComment
public void visitComment(net.ssehub.easy.varModel.cst.Comment comment) - Specified by:
visitCommentin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
isConstraint
private boolean isConstraint(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst) Returns whether the type ofcstis a constraint type.- Parameters:
cst- the constraint syntax tree to look for- Returns:
truefor constraint type,falseelse
-
visitOclFeatureCall
public void visitOclFeatureCall(net.ssehub.easy.varModel.cst.OCLFeatureCall call) - Specified by:
visitOclFeatureCallin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitDeferInitExpression
public void visitDeferInitExpression(net.ssehub.easy.varModel.cst.DeferInitExpression expression) - Specified by:
visitDeferInitExpressionin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitMultiAndExpression
public void visitMultiAndExpression(net.ssehub.easy.varModel.cst.MultiAndExpression expression) - Specified by:
visitMultiAndExpressionin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitLet
public void visitLet(net.ssehub.easy.varModel.cst.Let let) - Specified by:
visitLetin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitIfThen
public void visitIfThen(net.ssehub.easy.varModel.cst.IfThen ifThen) - Specified by:
visitIfThenin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitContainerOperationCall
public void visitContainerOperationCall(net.ssehub.easy.varModel.cst.ContainerOperationCall call) - Specified by:
visitContainerOperationCallin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitCompoundAccess
public void visitCompoundAccess(net.ssehub.easy.varModel.cst.CompoundAccess access) - Specified by:
visitCompoundAccessin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitUnresolvedExpression
public void visitUnresolvedExpression(net.ssehub.easy.varModel.cst.UnresolvedExpression expression) - Specified by:
visitUnresolvedExpressionin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitCompoundInitializer
public void visitCompoundInitializer(net.ssehub.easy.varModel.cst.CompoundInitializer initializer) - Specified by:
visitCompoundInitializerin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitContainerInitializer
public void visitContainerInitializer(net.ssehub.easy.varModel.cst.ContainerInitializer initializer) - Specified by:
visitContainerInitializerin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitSelf
public void visitSelf(net.ssehub.easy.varModel.cst.Self self) - Specified by:
visitSelfin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-
visitBlockExpression
public void visitBlockExpression(net.ssehub.easy.varModel.cst.BlockExpression block) - Specified by:
visitBlockExpressionin interfacenet.ssehub.easy.varModel.cst.IConstraintTreeVisitor
-