Package apron
Class Texpr0Intern
java.lang.Object
apron.Texpr0Intern
- All Implemented Interfaces:
Serializable
,Cloneable
Class of level 0 expression trees in opaque Apron representation.
A Texpr0Intern represents an expression tree, with unary and binary
operator nodes, and Coeff
constant and variables
(represented by dimension) leaves.
A Texpr0Intern encapsulates an Apron ap_texpr0_t
object,
an opaque object that can be passed to and retreived from Apron
abstract domains.
Texpr0Intern objects can be converted from and to Texpr0Node
concrete expression trees for construction and inspection.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConverts a linear expression to a comb-like expression tree.Deep copy.Converts a Java concrete tree to an opaque Apron tree (deep copy). -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds some dimensions and shifts coefficients accordingly.Returns a copy of this with some dimensions added.clone()
Returns a deep copy of this.boolean
Whether x is a Texpr0Intern tree and structurally equal to this.protected void
finalize()
Deallocates the underlying ap_texpr0_t Apron object.int
getDepth()
Returns the depth of the expression tree.int[]
getDims()
Returns an ordered list of all occurring dimensions.int
getSize()
Returns the number of internal nodes in the tree.boolean
hasDim
(int dim) Whether the dimension dim is present.int
hashCode()
Recursive hashing.boolean
Structural (recursive) equality.boolean
Whether the expression is constant.boolean
Whether the expression is linear with interval or scalar coefficients, and there is no rounding.boolean
Whether the expression is a polynomial fraction, with interval or scalar coefficients, and there is no rounding.boolean
Whether the expression is polynomial, with interval or scalar coefficients, and there is no rounding.boolean
isScalar()
Whether all coefficients are scalar (non interval).int
maxDim()
Maximum occurring dimension + 1.void
Permutes some dimensions in the expression.Returns a copy of this with some dimensions permuted.void
Removes some dimensions and shifts coefficients accordingly.Returns a copy of this with some dimensions removed.void
substitute
(int dim, Texpr0Intern t) Substitutes all occurrences of the dimension dim with the expression tree t.substituteCopy
(int dim, Texpr0Intern t) Returns a copy of this where all occurrences of the dimension dim are substituted with the expression tree t.toString()
Converts the expression tree to a String.Converts the expression tree to a String.Converts an opaque Apron tree to a concrete Java tree.
-
Constructor Details
-
Texpr0Intern
Converts a Java concrete tree to an opaque Apron tree (deep copy). -
Texpr0Intern
Converts a linear expression to a comb-like expression tree. -
Texpr0Intern
Deep copy.
-
-
Method Details
-
finalize
protected void finalize()Deallocates the underlying ap_texpr0_t Apron object. -
toTexpr0Node
Converts an opaque Apron tree to a concrete Java tree. -
getDepth
public int getDepth()Returns the depth of the expression tree. -
getSize
public int getSize()Returns the number of internal nodes in the tree. -
maxDim
public int maxDim()Maximum occurring dimension + 1. -
hasDim
public boolean hasDim(int dim) Whether the dimension dim is present. -
getDims
public int[] getDims()Returns an ordered list of all occurring dimensions. -
isIntervalCst
public boolean isIntervalCst()Whether the expression is constant. -
isIntervalLinear
public boolean isIntervalLinear()Whether the expression is linear with interval or scalar coefficients, and there is no rounding. -
isIntervalPolynomial
public boolean isIntervalPolynomial()Whether the expression is polynomial, with interval or scalar coefficients, and there is no rounding. -
isIntervalPolyfrac
public boolean isIntervalPolyfrac()Whether the expression is a polynomial fraction, with interval or scalar coefficients, and there is no rounding. -
isScalar
public boolean isScalar()Whether all coefficients are scalar (non interval). -
substitute
Substitutes all occurrences of the dimension dim with the expression tree t. -
substituteCopy
Returns a copy of this where all occurrences of the dimension dim are substituted with the expression tree t. -
addDimensions
Adds some dimensions and shifts coefficients accordingly. -
addDimensionsCopy
Returns a copy of this with some dimensions added. -
removeDimensions
Removes some dimensions and shifts coefficients accordingly. -
removeDimensionsCopy
Returns a copy of this with some dimensions removed. -
permuteDimensions
Permutes some dimensions in the expression. -
permuteDimensionsCopy
Returns a copy of this with some dimensions permuted. -
hashCode
public int hashCode()Recursive hashing. -
isEqual
Structural (recursive) equality. -
toString
Converts the expression tree to a String.Dimension i is denoted as xi.
-
toString
Converts the expression tree to a String.Dimension i is denoted by names[i].
-
toString
-
clone
Returns a deep copy of this. -
equals
Whether x is a Texpr0Intern tree and structurally equal to this.
-