Class CSTUtils

java.lang.Object
net.ssehub.easy.varModel.cst.CSTUtils

public class CSTUtils extends Object
Utility functions for handling ConstraintSyntaxTrees.
Author:
El-Sharkawy
  • Constructor Details

    • CSTUtils

      private CSTUtils()
      Avoid initialization.
  • Method Details

    • isAssignment

      public static boolean isAssignment(ConstraintSyntaxTree completeCST)
      Checks whether the given ConstraintSyntaxTree is a assignment or a constraint. Assignments are always instance of OCLFeatureCall.
      Parameters:
      completeCST - A complete (not sub part) constraint, must not be null.
      Returns:
      true if the given constraint is an assignment, false if it is a constraint.
    • isSimpleAssignment

      public static boolean isSimpleAssignment(ConstraintSyntaxTree completeCST)
      Checks whether the given ConstraintSyntaxTree is a simple assignment (variable assigned with constant or compound/container initializer).
      Parameters:
      completeCST - A complete (not sub part) constraint, must not be null.
      Returns:
      true if the given constraint is a simple assignment, false if it is a complex constraint.