Class Expressions

java.lang.Object
dev.civl.sarl.expr.IF.Expressions

public class Expressions extends Object
This class provides static methods for producing factories that create various kinds of SymbolicExpression.
  • Constructor Details

    • Expressions

      public Expressions()
  • Method Details

    • newExpressionFactory

      public static ExpressionFactory newExpressionFactory(NumericExpressionFactory numericFactory)
      Produces a new instance of the standard expression factory.
      Parameters:
      numericFactory - the numeric factory that the new standard expression factory will use for the creation of NumericExpressions.
      Returns:
      the new expression factory
    • newCnfFactory

      public static BooleanExpressionFactory newCnfFactory(SymbolicTypeFactory typeFactory, ObjectFactory objectFactory)
      Produces a new factory for creating BooleanExpressions that uses Conjunctive Normal Form (CNF) as the canonical representation of boolean expressions.
      Parameters:
      typeFactory - the type factory that should be used by the new boolean factory
      objectFactory - the object factory that should be used by the new boolean factory
      collectionFactory - the collection factory that should be used by the new boolean factory
      Returns:
      the new boolean expression factory
    • newIdealExpressionFactory

      public static ExpressionFactory newIdealExpressionFactory(NumberFactory numberFactory, ObjectFactory objectFactory, SymbolicTypeFactory typeFactory)
      Produces a new expression factory in which the underlying NumericExpressionFactory uses "ideal" (mathematical) integer and real arithmetic, i.e., infinite precision, unbounded arithmetic. The BooleanExpressionFactory will use the standard CNF form for boolean expressions.
      Parameters:
      numberFactory - the factory used to produce and manipulate concrete Numbers.
      objectFactory - factory used to produce SymbolicObjects
      typeFactory - factory used to produce SymbolicTypes
      collectionFactory - factory used to produce
      invalid reference
      SymbolicCollection
      s
      Returns:
      the new ideal expression factory
    • newHerbrandExpressionFactory

      public static ExpressionFactory newHerbrandExpressionFactory(NumberFactory numberFactory, ObjectFactory objectFactory, SymbolicTypeFactory typeFactory)
      Produces a new expression factory in which the underlying NumericExpressionFactory is based on "Herbrand arithmetic", i.e., arithmetic in which the numeric operations are treated as uninterpreted functions.
      Parameters:
      numberFactory - the factory used to produce and manipulate concrete Numbers.
      objectFactory - factory used to produce SymbolicObjects
      typeFactory - factory used to produce SymbolicTypes
      collectionFactory - factory used to produce
      invalid reference
      SymbolicCollection
      s
      Returns:
      the new Herbrand expression factory
    • newStandardExpressionFactory

      public static ExpressionFactory newStandardExpressionFactory(NumberFactory numberFactory, ObjectFactory objectFactory, SymbolicTypeFactory typeFactory)
      Produces a new expression factory that uses both Herbrand and Ideal arithmetic. The choice of which kind of arithmetic to use is determined by the types of the arguments to the numerical operators.
      Parameters:
      numberFactory - the factory used to produce and manipulate concrete Numbers.
      objectFactory - factory used to produce SymbolicObjects
      typeFactory - factory used to produce SymbolicTypes
      collectionFactory - factory used to produce
      invalid reference
      SymbolicCollection
      s
      Returns:
      the new standard (Herbrand-Ideal composite) expression factory