Class CompilerHelper


  • public class CompilerHelper
    extends java.lang.Object
    • Method Detail

      • checkAndTrimEqualVariables

        public static PlanningTrace checkAndTrimEqualVariables​(SubPlan plan,
                                                               PlanningTrace coreTrace)
        Makes sure that all variables in the tuple are different so that it can be used as CompiledSubPlan. If a variable occurs multiple times, equality checks are applied and then the results are trimmed so that duplicates are hidden. If no manipulation is necessary, the original trace is returned.

        to be used whenever a constraint introduces new variables.

      • convertVariablesTuple

        public static java.util.List<PVariable> convertVariablesTuple​(EnumerablePConstraint constraint)
        Extracts the variable list representation of the variables tuple.
      • convertVariablesTuple

        public static java.util.List<PVariable> convertVariablesTuple​(Tuple variablesTuple)
        Extracts the variable list representation of the variables tuple.
      • makeTrimmerRecipe

        protected static TrimmerRecipe makeTrimmerRecipe​(PlanningTrace compiledParent,
                                                         java.util.List<PVariable> projectedVariables)
        Creates a trimmer that keeps selected variables only.
      • makeProjectionMask

        public static Mask makeProjectionMask​(PlanningTrace compiledParent,
                                              java.lang.Iterable<PVariable> projectedVariables)
      • toRecipeMask

        public static Mask toRecipeMask​(TupleMask mask)
        Since:
        1.4