Enables the tracking of various properties related to arrays.
Enables the tracking of various properties related to arrays.
This domain in particular enables the tracking of an array's concrete content in some specific cases (e.g., the Strings stored in an array or some primitive values) or the tracking of information about an array's elements at a higher level. In both cases only arrays up to a specified size (cf. maxTrackedArraySize) are tracked. The content of arrays which track mutable data-structures cannot be tracked since the infrastructure to "update the array's content if the referenced value is changed" is not available!
This domain requires that the instantiated domain is only used to analyze one method.
,This domain does not require modeling the heap. This however, strictly limits the kind of arrays that can be tracked/the information about elements that can be tracked. Tracking the contents of arrays of mutable values is not possible; unless we only track abstract properties that do not depend on the concrete array element's value. For example, if we just want to know the upper type bounds of the values stored in the array, then it is perfectly possible. This property cannot change in an unsound fashion without directly accessing the array.
Enables the tracking of concrete Class
values.
Enables the tracking of concrete Class
values.
This class overrides invokestatic
and only delegates to the default implementation
if it cannot successfully handle the call. Hence, this trait needs to be mixed in after
the trait that handles the default case but before all other traits that "just"
analyze invokestatic calls.
class MyDomain extends DefaultTypeLevelInvokeInstructions with ClassValues with <DOES ANAYLZE INVOKE CALLS>
Default implementation of a domain that performs basic conversions between primitive values.
Domain that traces the relationship between integer values.
Configuration of a domain with an arbitrary id that uses the most capable l1
domains.
This domain uses the l1 level stable domains which handle primitive values using intervals/ranges.
This domain uses the l1 level stable, partial domains.
Default configuration of a domain that uses the most capable l1
domains and
which uses the method as the id.
Configuration of a domain that uses the most capable l1
domains and
which also records the abstract-interpretation time control flow graph.
Configuration of a domain that uses the most capable l1
domains and
which also records the abstract-interpretation time control flow graph and def/use
information.
This domain implements the tracking of integer values at the level of ranges.
This domain implements the tracking of integer values using sets.
This domain implements the tracking of simple integer values.
This domain implements the tracking of simple integer values.
This domain uses a single object to represent some integer. I.e., this domain does not support the identification of values that may be equal.
IntegerValues for more details.
Default implementation of the AsDomainValue
trait.
This domain implements the tracking of long values at the level of sets.
This domain is able to track constant long values and to perform mathematical operations related to constant long values.
This domain uses the l1 level stable, partial domains that represent the values of variables using sets.
This domain uses the l1 level stable domains which can "only" represent single values.
This domain represents integer values using ranges.
This domain represents integer values using ranges.
The cardinality of the range can be configured to satisfy different needs with regard to the desired precision (maxCardinalityOfIntegerRanges). Often, a very small cardinality (e.g., between 2 and 8) may be completely sufficient and a large cardinality does not add the overall precision significantly and just increases the analysis time.
This domain facilitates and performs constraint propagation (e.g.,
intEstablishValue, intEstablishIsLessThan,...).
Two integer (range) values (ir1
,ir2
) are reference equal (eq
in Scala)
iff both represent the same runtime value.
In other words, the implementation ensures that two int values that are known to have the same value – even though the precise value may not be known – are represented using the same object. Furthermore, two int values that are not known to represent the same value at runtime are always represented using different objects. For example, consider the following sequence:
iadd
(Stack: 1 :: AnIntegerValue :: ...; Registers: <ignored>)dup
(Stack: v(pcA/t1) :: ...; Registers: <ignored>)iflt
true:+10 (Stack: v(pcA/t1) :: v(pcA/t1) :: ...; Registers: <ignored>)Here, the test (iflt
) of the topmost stack value against the constant 0
constraints the second topmost stack value. Both (abstract) values are guaranteed
to represent the same value at runtime even though the concrete value
may be unknown. In this case, the value was even created at the same point in time.
In case of this domain the reference of the Domain(Integer)Value is used to identify those values that were created at the same point in time and hence, have the same properties.
E.g., consider the following fictitious sequence:
Additionally, if the sequence would be part of a loop, the next iteration would
create new IntegerRangeValue
s.
Subclasses are required to create new instances of IntegerRangeValue
s and
AnIntegerValue
whenever a computation is performed that may affect the
runtime value.
If this property is not satisfied the implemented constraint propagation mechanism
will produce unpredictable results as it may constrain unrelated values!
This is true for concrete ranges as well as AnIntegerValue
s.
This domain enables the tracking of integer values using sets.
This domain enables the tracking of integer values using sets. The cardinality of the set can be configured to facilitate different needs with regard to the desired precision. Often, a very small cardinality (e.g., between 2 or 8) may be completely sufficient and a large cardinality does not significantly add to the overall precision.
This domain enables the tracking of an integer value (a constant); unknown integer values are represented using "AnIntegerValue".
This domain enables the tracking of an integer value (a constant); unknown integer values are represented using "AnIntegerValue". It basically provides support for constant propagation and constant computations related to integer values.
Given that it uses one instance to represent arbitrary integer values, constraint propagation is not relevant.
This domain may be appropriate, e.g., if you want to determine if a field/local is always initialized to a specific value.
This domain enables the tracking of long values using sets.
This domain enables the tracking of long values using sets. The cardinality of the set can be configured to facilitate different needs with regard to the desired precision.
This domain supports constraint propagation as every two values that are not guaranteed to have the same value at runtime are always represented using a unique instance of LongValue.
Implements the shift operators for long values.
Implements the shift operators for long values.
(The shift operators are put in their own module, because the shift value is always an IntegerValue.)
Foundation for domains that trace specific long values.
Foundation for domains that trace specific long values. This domain can directly be used to trace simple computations involving constant long values.
Implements the shift operators for long values.
In case that the arraylength is just an integer value, the value is refined to the range [0...Int.MaxValue].
Refines a reference's null property if the reference value may be null and this has resulted in a corresponding exception.
Records all exception values thrown by a method.
Records all exception values thrown by a method. I.e., for each instruction that throws an exception (or multiple exceptions) all exceptions are recorded.
This partial domain enables tracking of a reference value's null-ness and must-alias information.
Support the invocation of methods (using Java reflection) of Java objects that represent concrete domain values.
Support the invocation of methods (using Java reflection) of Java objects that represent concrete domain values.
This greatly facilitates the implementation of methods that need to simulate the logic of a specific object.
Enables the tracing of StringBuilders
.
Enables the tracing of StringBuilders
.
TODO ==Implementation Details==
Given that StringBuilders are mutable, we have to create a copy whenever we have a branch. This enables us to make the domain value that represents the state of the StringBuilder independently mutable on each branch. E.g.,
val sb : StringBuilder = .... if (condition) sb.append("X") else sb.append("Y") // here, the represented string either ends with "X" or with "Y", but not with "XY" or "YX"
To ensure termination in degenerated cases, such as:
val b : StringBuilder = ... while((System.nanoTime % 33L) != 0){ b.append((System.nanoTime % 33L).toString) } return b.toString
We count the number of joins per PC and if that value exceeds the configured threshold, we completely abstract over the contents of the string builder.
Enables the tracing of concrete string values and can, e.g., be used to resolve static "class.forName(...)" calls.
Defines common constants related to integer ranges.
At the bytecode level, the allocation of memory and the call of the constructor are not atomic and it is possible to associate one "new" instruction with multiple constructor calls (INVOKESPECIAL(...,"<init>",...)); however, such code is not generated by any known compiler so far (Dec. 2014).
Commonly useful methods.