class AnIntegerValue extends (DefaultIntegerSetValues.this)#AnIntegerValueLike
- Alphabetic
- By Inheritance
- AnIntegerValue
- AnIntegerValueLike
- IntegerLikeValue
- IsIntegerValue
- IsIntegerLikeValue
- IsPrimitiveValue
- ConstantValueInformationProvider
- TypedValue
- KnownTypedValue
- KnownValue
- Value
- ValueInformation
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AnIntegerValue()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def PCIndependent: Int
- Definition Classes
- Value
- Annotations
- @inline()
- def abstractsOver(other: (DefaultIntegerSetValues.this)#DomainValue): Boolean
Returns
true
iff the abstract state represented by this value abstracts over the state of the given value.Returns
true
iff the abstract state represented by this value abstracts over the state of the given value. In other words if every possible runtime value represented by the given value is also represented by this value.The abstract state generally encompasses every information that would be considered during a join of
this
value and theother
value and that could lead to a true Update.This method is reflexive, I.e., every value abstracts over itself.
TheIllegalValue only abstracts over itself.
- Definition Classes
- AnIntegerValue → Value
- Note
abstractsOver is only defined for comparable values where both values have the same computational type.
,The default implementation uses the join method of this domain value. Overriding this method is, hence, primarily meaningful for performance reasons.
- See also
isMorePreciseThan
- def adapt(target: TargetDomain, pc: Int): (target)#DomainValue
Adapts this value to the given domain (default: throws a domain exception that adaptation is not supported).
Adapts this value to the given domain (default: throws a domain exception that adaptation is not supported). This method needs to be overridden by concrete
Value
classes to support the adaptation for a specific domain.Supporting the
adapt
method is primarily necessary when you want to analyze a method that is called by the currently analyzed method and you need to adapt this domain's values (the actual parameters of the method) to the domain used for analyzing the called method.Additionally, the
adapt
method is OPAL's main mechanism to enable dynamic domain-adaptation. I.e., to make it possible to change the abstract domain at runtime if the analysis time takes too long using a (more) precise domain.- Definition Classes
- AnIntegerValue → Value
- Note
The abstract interpretation framework does not use/call this method. This method is solely predefined to facilitate the development of project-wide analyses.
- def asConstantBoolean: Boolean
- Definition Classes
- ConstantValueInformationProvider
- def asConstantByte: Byte
- Definition Classes
- ConstantValueInformationProvider
- def asConstantChar: Char
- Definition Classes
- ConstantValueInformationProvider
- def asConstantDouble: Double
- Definition Classes
- ConstantValueInformationProvider
- def asConstantFloat: Float
- Definition Classes
- ConstantValueInformationProvider
- def asConstantInteger: Integer
- Definition Classes
- IsIntegerValue → ConstantValueInformationProvider
- def asConstantLong: Long
- Definition Classes
- ConstantValueInformationProvider
- def asConstantShort: Short
- Definition Classes
- ConstantValueInformationProvider
- def asDomainReferenceValue: (DefaultIntegerSetValues.this)#DomainReferenceValue
Returns the represented reference value iff this value represents a reference value.
Returns the represented reference value iff this value represents a reference value.
- Definition Classes
- Value
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def asPrimitiveValue: IsPrimitiveValue[IntegerType]
- Definition Classes
- IsPrimitiveValue → ValueInformation
- def asReferenceValue: IsReferenceValue
- Definition Classes
- ValueInformation
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def computationalType: ComputationalType
The computational type of the value if this object represents a legal value.
The computational type of the value if this object represents a legal value.
The precise computational type is, e.g., needed to calculate the effect of generic stack manipulation instructions (e.g.,
DUP_...
andSWAP
) on the stack as well as to calculate the jump targets ofRET
instructions and to determine which values are actually copied by, e.g., thedup_XX
instructions.- Definition Classes
- IsPrimitiveValue → ValueInformation
- Exceptions thrown
IllegalStateException
if this value is illegal or void.- Note
The computational type has to be precise/correct.
- final def constantValue: Option[Int]
The constant value that this variable takes - if it take a single constant value! I.e., if the variable may take multiple different values at runtime
constantValue
will returnNone
.The constant value that this variable takes - if it take a single constant value! I.e., if the variable may take multiple different values at runtime
constantValue
will returnNone
.- Definition Classes
- AnIntegerValueLike → ConstantValueInformationProvider
- def doJoin(pc: Int, value: (DefaultIntegerSetValues.this)#DomainValue): Update[(DefaultIntegerSetValues.this)#DomainValue]
Joins this value and the given value.
Joins this value and the given value.
Join is called whenever an instruction is evaluated more than once and, hence, the values found on the paths need to be joined. This method is, however, only called if the two values are two different objects (
(this ne value) === true
), but both values have the same computational type.This basically implements the join operator of complete lattices.
Example
For example, joining a
DomainValue
that represents the integer value 0 with aDomainValue
that represents the integer value 1 may return a newDomainValue
that precisely captures the range [0..1] or that captures all positive integer values or just some integer value.Contract
this
value is always the value that was previously used to perform subsequent computations/analyses. Hence, ifthis
value subsumes the given value, the result has to be eitherNoUpdate
or aMetaInformationUpdate
. In case that the given value subsumesthis
value, the result has to be aStructuralUpdate
with the given value as the new value. Hence, thisjoin
operation is not commutative. If a new (more abstract) abstract value is created that represents both values the result always has to be aStructuralUpdate
. If the result is aStructuralUpdate
the framework will continue with the interpretation.The termination of the abstract interpretation directly depends on the fact that at some point all (abstract) values are fixed and don't change anymore. Hence, it is important that the type of the update is only a org.opalj.ai.StructuralUpdate if the value has changed in a way relevant for future computations/analyses involving this value. In other words, when two values are joined it has to be ensured that no fall back to a previous value occurs. E.g., if you join the existing integer value 0 and the given value 1 and the result would be 1, then it must be ensured that a subsequent join with the value 0 will not result in the value 0 again.
Conceptually, the join of an object with itself has to return the object itself. Note, that this is a conceptual requirement as such a call (
this.doJoin(..,this)
) will not be performed by the abstract interpretation framework; this case is handled by the join method. However, if the join object is also used by the implementation of the domain itself, it may be necessary to explicitly handle self-joins.Performance
In general, the domain should try to minimize the number of objects that it uses to represent values. That is, two values that are conceptually equal should – whenever possible – use only one object. This has a significant impact on functions such as
join
.- pc
The program counter of the instruction where the paths converge.
- value
The "new" domain value with which this domain value should be joined. The given
value
and this value are guaranteed to have the same computational type, but are not reference equal.
- Definition Classes
- AnIntegerValue → Value
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: Any): Boolean
- Definition Classes
- AnIntegerValue → AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def hasCategory2ComputationalType: Boolean
Returns
true
if and only if the value has the computational type 2;false
in all other cases (including the case where this value is illegal!).Returns
true
if and only if the value has the computational type 2;false
in all other cases (including the case where this value is illegal!).- Definition Classes
- IsIntegerValue → ValueInformation
- def hashCode(): Int
- Definition Classes
- AnIntegerValue → AnyRef → Any
- final def isArrayValue: Answer
Returns
Yes
if the value is _not null_ and the least upper type bound is anArrayType
; the value isUnknown
if the least upper type bound isArrayType
but the value may be null; in all other casesNo
is returned; in particular if the value is known to be null.Returns
Yes
if the value is _not null_ and the least upper type bound is anArrayType
; the value isUnknown
if the least upper type bound isArrayType
but the value may be null; in all other casesNo
is returned; in particular if the value is known to be null.No
is also returned if the value's type isObject
orSeriablizable
orCloneable
.- Definition Classes
- IsPrimitiveValue → ValueInformation
- final def isIllegalValue: Boolean
Returns
true
iff this value is not a legal value according to the JVM specification.Returns
true
iff this value is not a legal value according to the JVM specification. Such values cannot be used to perform any computations and will generally not occur in static analyses unless the analysis or the bytecode is buggy.- Definition Classes
- KnownValue → ValueInformation
- Note
An IsIllegalValue can always be distinguished from a void value.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isMorePreciseThan(other: (DefaultIntegerSetValues.this)#DomainValue): Boolean
Returns
true
iff the abstract state represented by this value is strictly more precise than the state of the given value.Returns
true
iff the abstract state represented by this value is strictly more precise than the state of the given value. In other words if every possible runtime value represented by this value is also represented by the given value, but both are not equal; in other words, this method is irreflexive.The considered abstract state generally encompasses every information that would be considered during a join of
this
value and theother
value and that could lead to a StructuralUpdate.- other
Another
DomainValue
with the same computational type as this value. (TheIllegalValue
has no computational type and, hence, a comparison with an IllegalValue is not well defined.)
- final def isPrimitiveValue: Boolean
Returns
true
in case of a value with primitive type.Returns
true
in case of a value with primitive type.- Definition Classes
- IsPrimitiveValue → ValueInformation
- Exceptions thrown
IllegalStateException
if this value is illegal.
- final def isReferenceValue: Boolean
Returns
true
if the value has a reference type.Returns
true
if the value has a reference type.- Definition Classes
- IsPrimitiveValue → ValueInformation
- Exceptions thrown
IllegalStateException
if this value is illegal.
- final def isVoid: Boolean
Returns
true
if this value represents void.Returns
true
if this value represents void.- Definition Classes
- KnownTypedValue → ValueInformation
- def join(pc: Int, that: (DefaultIntegerSetValues.this)#DomainValue): Update[(DefaultIntegerSetValues.this)#DomainValue]
Checks that the given value and this value are compatible with regard to its computational type and – if so – calls doJoin.
Checks that the given value and this value are compatible with regard to its computational type and – if so – calls doJoin.
See
doJoin(PC,DomainValue)
for details.- pc
The program counter of the instruction where the paths converge or
Int.MinValue
if the join is done independently of an instruction.- that
The "new" domain value with which this domain value should be joined. The caller has to ensure that the given value and this value are guaranteed to be two different objects.
- returns
MetaInformationUpdateIllegalValue or the result of calling doJoin.
- Definition Classes
- Value
- Note
It is in general not recommended/needed to override this method.
- final def leastUpperType: Option[CTIntType]
The type kind of the values, if the value has a specific type kind;
None
if and only if the underlying value isnull
.The type kind of the values, if the value has a specific type kind;
None
if and only if the underlying value isnull
.- returns
The type/the least upper type bound of the value. If the type is a base type, then the type is necessarily precise. In case of a reference type the type may be an upper type bound or may be precise. In the latter case, it may be possible to get further information using the concrete domain. If the underlying value is
null
,None
is returned.
- Definition Classes
- IntegerLikeValue → TypedValue
- final def lowerBound: Int
- Definition Classes
- AnIntegerValueLike → IsIntegerValue
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def primitiveType: IntegerType
- Definition Classes
- IsIntegerValue → IsPrimitiveValue
- def summarize(pc: Int): (DefaultIntegerSetValues.this)#DomainValue
Creates a summary of this value.
Creates a summary of this value.
In general, creating a summary of a value may be useful/required for values that are potentially returned by a called method and which will then be used by the calling method. For example, it may be useful to precisely track the flow of values within a method to be able to distinguish between all sources of a value (E.g., to be able to distinguish between a
NullPointerException
created by instruction A and another one created by instruction B (A != B
).)However, from the caller perspective it may be absolutely irrelevant where/how the value was created in the called method and, hence, keeping all information would just waste memory and a summary may be sufficient.
- Definition Classes
- AnIntegerValue → Value
- Note
This method is predefined to facilitate the development of project-wide analyses.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toCanonicalForm: ValueInformation
Returns a
ValueInformation
object that just captures the basic information as defined by thisvalue
framework.Returns a
ValueInformation
object that just captures the basic information as defined by thisvalue
framework. The returned value information object will be independent of the underlying representation from which it was derived.- Definition Classes
- IsIntegerValue → ValueInformation
- def toString(): String
- Definition Classes
- AnIntegerValue → AnyRef → Any
- final def upperBound: Int
- Definition Classes
- AnIntegerValueLike → IsIntegerValue
- final def verificationTypeInfo: VerificationTypeInfo
The type of this value as used by the org.opalj.br.StackMapTable attribute.
The type of this value as used by the org.opalj.br.StackMapTable attribute.
- Definition Classes
- IsIntegerLikeValue → ValueInformation
- Exceptions thrown
IllegalStateException
if this value represents void or a return address value.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated