ill-typed alt-ergo proof obligation
ID0001484:
**This issue was created automatically from Mantis Issue 1484. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0001484 | Frama-C | Plug-in > wp | public | 2013-09-25 | 2020-02-17 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | virgile | **Assigned To** | correnson | **Resolution** | fixed |
| **Priority** | normal | **Severity** | minor | **Reproducibility** | always |
| **Platform** | - | **OS** | - | **OS Version** | - |
| **Product Version** | Frama-C GIT, precise the release id | **Target Version** | - | **Fixed in Version** | Frama-C 20-Calcium |
### Description :
Using WP with RTE enabled on the attached file results in proof obligations rejected as ill-typed by Alt-Ergo.
### Additional Information :
Without rte, everything is fine. With RTE, the resulting proof obligation is the following:
forall x_0 : int.
let x_1 = to_sint32(neqb(0, x_0)) : int in
let x_2 = to_uint8(x_0 - (ite((eqb(0, x_0)), 0, 1))) : int in
is_uint8(x_0) ->
(x_1 <= (2147483648 + x_0)) ->
(x_0 <= (2147483647 + x_1)) ->
is_uint8(x_2) ->
(x_2 <= x_0)
the definition of x_1 is lacking an ite(_,0,1) conversion, as shown in the definition of x_2. x_1 does not appear in the PO without RTE, as it is only used in the (x<=2147483648 + x_0) and x_0 <= (2147483647 + x_1) hypotheses reflecting the RTE-generated hypotheses.
Note that writing the RTE-generated hypotheses in the code (and launching WP without -wp-rte) results in warning cast from (boolean) not yet implemented, and degenerated goals.
### Steps To Reproduce :
frama-c -wp -wp-rte t.c
## Attachments
- [t.c](/uploads/085bb97c670f033ea923101dfd6b3a57/t.c)
issue