java.lang.Object
dev.civl.sarl.expr.IF.Expressions
This class provides static methods for producing factories that create
various kinds of
SymbolicExpression.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BooleanExpressionFactorynewCnfFactory(SymbolicTypeFactory typeFactory, ObjectFactory objectFactory) Produces a new factory for creatingBooleanExpressions that uses Conjunctive Normal Form (CNF) as the canonical representation of boolean expressions.static ExpressionFactorynewExpressionFactory(NumericExpressionFactory numericFactory) Produces a new instance of the standard expression factory.static ExpressionFactorynewHerbrandExpressionFactory(NumberFactory numberFactory, ObjectFactory objectFactory, SymbolicTypeFactory typeFactory) Produces a new expression factory in which the underlyingNumericExpressionFactoryis based on "Herbrand arithmetic", i.e., arithmetic in which the numeric operations are treated as uninterpreted functions.static ExpressionFactorynewIdealExpressionFactory(NumberFactory numberFactory, ObjectFactory objectFactory, SymbolicTypeFactory typeFactory) Produces a new expression factory in which the underlyingNumericExpressionFactoryuses "ideal" (mathematical) integer and real arithmetic, i.e., infinite precision, unbounded arithmetic.static ExpressionFactorynewStandardExpressionFactory(NumberFactory numberFactory, ObjectFactory objectFactory, SymbolicTypeFactory typeFactory) Produces a new expression factory that uses both Herbrand and Ideal arithmetic.
-
Constructor Details
-
Expressions
public Expressions()
-
-
Method Details
-
newExpressionFactory
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 ofNumericExpressions.- Returns:
- the new expression factory
-
newCnfFactory
public static BooleanExpressionFactory newCnfFactory(SymbolicTypeFactory typeFactory, ObjectFactory objectFactory) Produces a new factory for creatingBooleanExpressions 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 factoryobjectFactory- the object factory that should be used by the new boolean factorycollectionFactory- 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 underlyingNumericExpressionFactoryuses "ideal" (mathematical) integer and real arithmetic, i.e., infinite precision, unbounded arithmetic. TheBooleanExpressionFactorywill use the standard CNF form for boolean expressions.- Parameters:
numberFactory- the factory used to produce and manipulate concreteNumbers.objectFactory- factory used to produceSymbolicObjectstypeFactory- factory used to produceSymbolicTypescollectionFactory- factory used to producesinvalid reference
SymbolicCollection- 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 underlyingNumericExpressionFactoryis 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 concreteNumbers.objectFactory- factory used to produceSymbolicObjectstypeFactory- factory used to produceSymbolicTypescollectionFactory- factory used to producesinvalid reference
SymbolicCollection- 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 concreteNumbers.objectFactory- factory used to produceSymbolicObjectstypeFactory- factory used to produceSymbolicTypescollectionFactory- factory used to producesinvalid reference
SymbolicCollection- Returns:
- the new standard (Herbrand-Ideal composite) expression factory
-