Ejemplo n.º 1
0
        public static SymbolicTransform New(
            BasicSymbolicConstraint constraint,
            SymbolMap inputMap,
            Function outputFunction)
        {
            var inputContext = inputMap.GenerateContext();

            if (!outputFunction.ContainsVariables(inputContext))
            {
                throw new InvalidTransformException(
                          $"'{nameof(inputMap)}' contains variable names that do not exist in '{nameof(outputFunction)}'");
            }

            var deconstructor = new SymbolicDeconstructor(inputMap);

            return(new SymbolicTransform(constraint, deconstructor, outputFunction));
        }
Ejemplo n.º 2
0
 public VariableContext Deconstruct(ISymbol expression)
 {
     return(Deconstruct(expression, _map, _map.GenerateContext()));
 }