Returns this reference value as a DomainValue of its original domain.
Returns this reference value as a DomainValue of its original domain.
The domain that was used to create this object can be used to get/create a DomainValue.
The upper bound of the value's type.
The upper bound of the value's type. The upper bound is empty if this
value is null (i.e., isNull == Yes). The upper bound is only guaranteed to contain
exactly one type if the type is precise. (i.e., isPrecise == true). Otherwise,
the upper type bound may contain one or more types that are not known to be
in an inheritance relation, but which will correctly approximate the runtime
type.
If only a part of a project is analyzed, the class hierarchy may be fragmented and it may happen that two classes that are indeed in an inheritance relation – if we would analyze the complete project – are part of the upper type bound.
If Yes the value is known to always be null at runtime.
If Yes the value is known to always be null at runtime. In this
case the upper bound is (has to be) empty. If the answer is Unknown then the
analysis was not able to statically determine whether the value is null or
is not null. In this case the upper bound is expected to be non-empty.
If the answer is No then the value is statically known not to be null. In this
case, the upper bound may precisely identify the runtime type or still just identify
an upper bound.
This default implementation always returns Unknown; this is a sound
over-approximation.
Unknown.
This method is expected to be overridden by subtypes.
Returns true if the type information is precise.
Returns true if the type information is precise. I.e., the type returned by
upperTypeBound precisely models the runtime type of the value.
If, isPrecise returns true, the type of this value can
generally be assumed to represent a class type (not an interface type) or
an array type. However, this domain also supports the case that isPrecise
returns true even though the associated type identifies an interface type
or an abstract class type. The later case may be interesting in the context
of classes that are generated at run time.
This default implementation always returns false.
false
This method is expected to be overridden by subtypes.
,isPrecise is always true if this value is known to be null.
Tests if the type of this value is potentially a subtype of the specified
reference type under the assumption that this value is not null.
Tests if the type of this value is potentially a subtype of the specified
reference type under the assumption that this value is not null.
This test takes the precision of the type information into account.
That is, if the currently available type information is not precise and
the given type has a subtype that is always a subtype of the current
upper type bound, then Unknown is returned. Given that it may be
computationally intensive to determine whether two types have a common subtype
it may be better to just return Unknown in case that this type and the
given type are not in a direct inheritance relationship.
Basically, this method implements the same semantics as the ClassHierarchy's
isSubtypeOf method, but it additionally checks if the type of this value
could be a subtype of the given supertype. I.e., if this value's type
identifies a supertype of the given supertype and that type is not known
to be precise, the answer is Unknown.
For example, assume that the type of this reference value is
java.util.Collection and we know/have to assume that this is only an
upper bound. In this case an answer is No if and only if it is impossible
that the runtime type is a subtype of the given supertype. This
condition holds, for example, for java.io.File which is not a subclass
of java.util.Collection and which does not have any further subclasses (in
the JDK). I.e., the classes java.io.File and java.util.Collection are
not in an inheritance relationship. However, if the specified supertype would
be java.util.List the answer would be unknown.
This default implementation always returns Unknown.
This method is expected to be overridden by subtypes.
,The function isValueSubtypeOf is not defined if isNull returns Yes;
if isNull is Unknown then the result is given under the
assumption that the value is not null at runtime.
In other words, if this value represents null this method is not supported.
Characterizes a single reference value. Captures the information about one of the values a domain value may refer to. For example, in the following:
o is a reference value (
IsReferenceValue) that refers to two "simple" values each represented by an instance of anIsAReferenceValue(new Object()and"STRING").