public interface SymbolicRangeFactory
Factory for creating and manipulating
SymbolicRange's.-
Method Summary
Modifier and TypeMethodDescriptiondiff(SymbolicRange range0, SymbolicRange range1) disjoint(SymbolicRange range0, SymbolicRange range1) NOTE: Currently only support ranges with a step value of 1.equals(SymbolicRange range0, SymbolicRange range1) NOTE: Currently only support ranges with a step value of 1.inRange(NumericExpression expr, SymbolicRange range) neq(SymbolicRange range0, SymbolicRange range1) NOTE: Currently only support ranges with a step value of 1.strictlyBelow(SymbolicRange range0, SymbolicRange range1) NOTE: Currently only support ranges with a step value of 1.subset(SymbolicRange range0, SymbolicRange range1) NOTE: Currently only support ranges with a step value of 1.symbolicRange(NumericExpression element) Generates a newSymbolicRangewhich only includes "element".symbolicRange(NumericExpression lower, NumericExpression upper) Generates a newSymbolicRangewhich ranges from "lower" (inclusive) to "upper" (exclusive).symbolicRange(NumericExpression lower, NumericExpression upper, NumericExpression step) Generates a newSymbolicRangewhich ranges from "lower" (inclusive) to "upper" (exclusive) taking "step" number of steps.tryUnion(Reasoner reasoner, SymbolicRange range0, SymbolicRange range1) Attempts to create a singleSymbolicRangewhich is equivalent to the union of the inputSymbolicRanges range0 and range1.
-
Method Details
-
symbolicRange
Generates a newSymbolicRangewhich only includes "element".- Parameters:
element- The expression representing the single value of this range.- Returns:
- the newly created
SymbolicRange
-
symbolicRange
Generates a newSymbolicRangewhich ranges from "lower" (inclusive) to "upper" (exclusive).- Parameters:
lower- The expression representing the (inclusive) lower bound.upper- The expression representing the (exclusive) upper bound.- Returns:
- the newly created
SymbolicRange
-
symbolicRange
SymbolicRange symbolicRange(NumericExpression lower, NumericExpression upper, NumericExpression step) Generates a newSymbolicRangewhich ranges from "lower" (inclusive) to "upper" (exclusive) taking "step" number of steps.- Parameters:
lower- The expression representing the (inclusive) lower bound.upper- The expression representing the (exclusive) upper bound.step- The expression representing the step value.- Returns:
- the newly created
SymbolicRange
-
strictlyBelow
NOTE: Currently only support ranges with a step value of 1.- Parameters:
range0- the firstSymbolicRangerange1- the secondSymbolicRange- Returns:
- A
BooleanExpressionwhich is true if the values of range0 are all strictly below the values of range1.
-
disjoint
NOTE: Currently only support ranges with a step value of 1.- Parameters:
range0- the firstSymbolicRangerange1- the secondSymbolicRange- Returns:
- A
BooleanExpressionwhich is true whenever range0 and range1 are disjoint.
-
subset
NOTE: Currently only support ranges with a step value of 1.- Parameters:
range0- the firstSymbolicRangerange1- the secondSymbolicRange- Returns:
- A
BooleanExpressionwhich is true whenever range0 is a subset of range1.
-
diff
-
equals
NOTE: Currently only support ranges with a step value of 1.- Parameters:
range0- the firstSymbolicRangerange1- the secondSymbolicRange- Returns:
- A
BooleanExpressionwhich is true whenever range0 is equal to range1.
-
neq
NOTE: Currently only support ranges with a step value of 1.- Parameters:
range0- the firstSymbolicRangerange1- the secondSymbolicRange- Returns:
- A
BooleanExpressionwhich is true whenever range0 is not equal to range1.
-
inRange
- Parameters:
expr- aNumericExpressionrange- aSymbolicRange- Returns:
- A
BooleanExpressionwhich is true whenever expr is an element of r.
-
tryUnion
Attempts to create a singleSymbolicRangewhich is equivalent to the union of the inputSymbolicRanges range0 and range1. If no suchSymbolicRangecan be constructed then null is returned. Optionally takes aReasoner"reasoner" for determining potential relationships between range0 and range1. If reasoner is null then simple syntactic reasoning is used instead.- Parameters:
reasoner- theReasonerto be used in the union process. May be null in which case simple syntactic reasoning is used.range0- aSymbolicRangerange1- aSymbolicRange- Returns:
- either a single
SymbolicRangeequivalent to the union of range0 and range1, or null if such a range could not be constructed.
-