- All Superinterfaces:
SymbolicExpression,SymbolicObject
- All Known Subinterfaces:
ArrayElementReference,NTReferenceExpression,OffsetReference,TupleComponentReference,UnionMemberReference
An expression representing a way to reference into values. A reference expression may be thought of as a function which accepts certain values (represented as symbolic expressions) and for each such value, returns a reference to some sub-structure of that value.
For example, the identity reference accepts a value and returns a reference to the entire value. It is like the identity function. A non-trivial example is the reference expression "element 17 of an array." Thought of as a function, that reference accepts any value of array type and returns element 17 of that value. There is also a tuple component reference, which is similar to an array reference, though the index must be concrete for a tuple component reference, while for an array reference the index can be specified by any symbolic expression of integer type.
Reference expressions can be composed. For example, a reference expression corresponding to "element 17 of component 2 of element 32 of an array of tuples of arrays" may be formed.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe different kinds of references.Nested classes/interfaces inherited from interface dev.civl.sarl.IF.expr.SymbolicExpression
SymbolicExpression.SymbolicOperatorNested classes/interfaces inherited from interface dev.civl.sarl.IF.object.SymbolicObject
SymbolicObject.SymbolicObjectKind -
Method Summary
Modifier and TypeMethodDescriptionbooleanIs this an array element reference?booleanIs this the identity reference?booleanIs this the null reference?booleanIs this an "offset reference"?booleanIs this a tuple component reference?booleanIs this a union member reference?Gets the kind of this reference.Methods inherited from interface dev.civl.sarl.IF.expr.SymbolicExpression
argument, atomString, getArguments, getFreeVars, isFalse, isNull, isNumeric, isOne, isTrue, isZero, numArguments, operator, printCompressedTree, size, typeMethods inherited from interface dev.civl.sarl.IF.object.SymbolicObject
containsQuantifier, containsSubobject, containsSubobjectIgnoringType, equals, getOrder, hashCode, id, isCanonic, setInCanonic, setOrder, symbolicObjectKind, toString, toStringBuffer, toStringBufferLong
-
Method Details
-
referenceKind
ReferenceExpression.ReferenceKind referenceKind()Gets the kind of this reference.- Returns:
- the kind of this reference
-
isNullReference
boolean isNullReference()Is this the null reference?- Returns:
trueiff the kind of this reference isReferenceExpression.ReferenceKind.NULL.
-
isIdentityReference
boolean isIdentityReference()Is this the identity reference?- Returns:
trueiff the kind of this reference isReferenceExpression.ReferenceKind.IDENTITY.
-
isArrayElementReference
boolean isArrayElementReference()Is this an array element reference?- Returns:
trueiff the kind of this reference isReferenceExpression.ReferenceKind.ARRAY_ELEMENT.
-
isTupleComponentReference
boolean isTupleComponentReference()Is this a tuple component reference?- Returns:
trueiff the kind of this reference isReferenceExpression.ReferenceKind.TUPLE_COMPONENT.
-
isUnionMemberReference
boolean isUnionMemberReference()Is this a union member reference?- Returns:
trueiff the kind of this reference isReferenceExpression.ReferenceKind.UNION_MEMBER.
-
isOffsetReference
boolean isOffsetReference()Is this an "offset reference"?- Returns:
trueiff the kind of this reference isReferenceExpression.ReferenceKind.OFFSET.
-