Class Resolver.OtherConstraintsProcessor

java.lang.Object
net.ssehub.easy.reasoning.sseReasoner.functions.AbstractConstraintProcessor
net.ssehub.easy.reasoning.sseReasoner.Resolver.OtherConstraintsProcessor
Enclosing class:
Resolver

private class Resolver.OtherConstraintsProcessor extends AbstractConstraintProcessor
Implements a processor for constraints, for which variables (including the variable mapping) shall be substituted and the result shall be added to Resolver.otherConstraints. Call setParameter(ConstraintSyntaxTree, AbstractVariable, IDecisionVariable) before processing and clear() afterwards before reuse.
Author:
Holger Eichelberger
  • Field Details

    • selfEx

      private net.ssehub.easy.varModel.cst.ConstraintSyntaxTree selfEx
    • self

      private net.ssehub.easy.varModel.model.AbstractVariable self
    • variable

      private net.ssehub.easy.varModel.confModel.IDecisionVariable variable
  • Constructor Details

    • OtherConstraintsProcessor

      private OtherConstraintsProcessor()
  • Method Details

    • setParameter

      private void setParameter(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree selfEx, net.ssehub.easy.varModel.model.AbstractVariable self, net.ssehub.easy.varModel.confModel.IDecisionVariable variable)
      Sets the parameters for processing.
      Parameters:
      selfEx - an expression representing self (ignored if null, self and selfEx shall never both be specified/not null).
      self - an variable declaration representing self (ignored if null).
      variable - the variable the constraints are processed for (may be null)
    • clear

      private void clear()
      Clears the parameters for reuse. Although clearing may be superfluous, it also helps getting rid of unnecessary references / supports garbage collection.
    • process

      public 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)
      Description copied from class: AbstractConstraintProcessor
      Processes a constraint syntax tree.
      Specified by:
      process in class AbstractConstraintProcessor
      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
    • getContextStack

      public ContextStack getContextStack()
      Description copied from class: AbstractConstraintProcessor
      Returns the context stack, e.g., for type exclusions.
      Specified by:
      getContextStack in class AbstractConstraintProcessor
      Returns:
      the context stack