Class AbstractFrozenChecker<M extends ContainableModelElement>

    • Constructor Detail

      • AbstractFrozenChecker

        protected AbstractFrozenChecker​(Configuration config)
        Single constructor of this class.
        Parameters:
        config - A already initialized Configuration, needed for checking whether an arbitrary variable is already frozen.
    • Method Detail

      • getConfiguration

        public final Configuration getConfiguration()
        Getter for the configuration (passed to the constructor).
        Returns:
        The currently used configuration.
      • constraintIsFrozen

        protected boolean constraintIsFrozen​(ConstraintSyntaxTree constraint,
                                             RewriteContext context)
        Checks whether the given constraint contains only constant values or frozen variables.
        Parameters:
        constraint - The constraint to check.
        context - Knowledge of the current translation, comes from the ProjectRewriteVisitor
        Returns:
        true if the constraint contains only frozen/constant elements or is null, false if it contain at least one open variable.
      • allInstancesAreFrozen

        protected boolean allInstancesAreFrozen​(AbstractVariable declaration,
                                                RewriteContext context)
        Checks whether all instances of the given declaration are already frozen.
        Parameters:
        declaration - The declaration to check (if it is nested, it can have multiple instances).
        context - Knowledge of the current translation, comes from the ProjectRewriteVisitor
        Returns:
        true if all instances are frozen or if it has no instances, otherwise.