Class AbstractConstraintProcessor

java.lang.Object
net.ssehub.easy.reasoning.sseReasoner.functions.AbstractConstraintProcessor
Direct Known Subclasses:
Resolver.OtherConstraintsProcessor

public abstract class AbstractConstraintProcessor extends Object
Interface for a generic constraint processor functor (avoid collections, process directly).
Author:
Holger Eichelberger
  • Constructor Details

    • AbstractConstraintProcessor

      public AbstractConstraintProcessor()
  • Method Details

    • process

      public abstract net.ssehub.easy.varModel.cst.ConstraintSyntaxTree process(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst, AbstractConstraintProcessor.ExpressionType type, String slot, net.ssehub.easy.varModel.model.IModelElement parent)
      Processes a constraint syntax tree.
      Parameters:
      cst - the constraint syntax tree
      type - the type of cst
      slot - the slot name, only in case of AbstractConstraintProcessor.ExpressionType.DEFAULT or AbstractConstraintProcessor.ExpressionType.ANNOTATION_DEFAULT
      parent - the actual/intended parent if not determined otherwise
      Returns:
      the processed constraint syntax tree, may be cst
    • process

      public net.ssehub.easy.varModel.cst.ConstraintSyntaxTree process(net.ssehub.easy.varModel.model.Constraint constraint, AbstractConstraintProcessor.ExpressionType type)
      Processes a constraint (taking over the parent of constraint). [convenience]
      Parameters:
      constraint - the constraint to be processed
      type - the type of the constraint
      Returns:
      the processed constraint syntax tree, may be the one of constraint
    • getContextStack

      public abstract ContextStack getContextStack()
      Returns the context stack, e.g., for type exclusions.
      Returns:
      the context stack