Not-null annotation check properties which are added to the beginning of
the method's goto inherit the source_locationt of the method. Because
previously the location had missing information (missing method name),
the property name looked like this:
[not-null-annotation-check.1]
Now the name looks like this:
[java::Main.bar:(Ljava/lang/Integer;ZLjava/lang/Object;[Ljava/lang/String;)Ljava/lang/Integer;.not-null-annotation-check.1]
The line number is not the line number of the first instruction because
that can be unassigned. Instead, set it to the line number of the first
instruction that does have a line number assigned.
Set location function to be the name of the method itself.
Rather than typecasting as needed, we check that the type corresponds to
the instruction.
In particular this removes the casting of reference to void reference in
the case of `a`.
This is similar to how other instructions are handled, makes the
convert_instructions method shorter and gives a natural place where to
document the conversion of the load instruction.
Leaving typecast in the expression could lead to erroneous result.
For instance (A*)(B*)dynamic_object would have been considered different
from (A*)dynamic_object while they are the same pointer.
List of new instructions:
==I (equality for Int)
<>I (inequality for Int)
<I (less than for Int)
>I (greater than for Int)
<=I (less than or equal for Int)
>=I (greater than or equal for Int)
==D (equality for DInt)
<>D (inequality for DInt)
<D (less than for DInt)
>D (greater than for DInt)
<=D (less than or equal for DInt)
>=D (greater than or equal for DInt)
==R (equality for Real)
<>R (inequality for Real)
<R (less than for Real)
>R (greater than for Real)
<=R (less than or equal for Real)
>=R (greater than or equal for Real)
Provides a function for generating the __CPROVER_rounding_mode symbol
and for initializing it inside of __CPROVER_initialize. Currently only
uses the ROUND_TO_EVEN rounding mode.
Adds an extra state to the scanner to distinguish the version from
regular floats. Also adjusts the literal converters so that they use
utility functions for the conversion from the primitive type to its irep
representation. This ensures compatibility with the GOTO conversion
process later.
For --string-printable and --nondet-static, we expect that static char
fields will not be able to produce a counterexample to violated the
assumption that the character is printable.
In order to implement this constraint for arrays, we would have to do a
loop even though the element type is primitive. This was deemed to
costly in terms of time for the benefit at the time of implementation.
--string-printable now affects nondet characters, so we add regression
tests to show that the assertion that the character is in the printable
set cannot be violated when --string-printable is enabled and that it
can be when --string-printable is not enabled.
This commit adds a higher level interface for `ID_output` based ireps.
This gives us a central place to document instances of these and a
central place to put the code for constructing and checking them. This
makes it possible to find documentation about them and avoids
duplicating the code for constructing and checking them.
This commit adds a higher level interface for `ID_input` based ireps.
This gives us a central place to document instances of these and a
central place to put the code for constructing and checking them. This
makes it possible to find documentation about them and avoids
duplicating the code for constructing and checking them.