Frama-C Bug Tracking System - Frama-C
View Issue Details
0001484Frama-CPlug-in > wppublic2013-09-25 15:302019-10-17 17:11
Frama-C GIT, precise the release id 
Frama-C 20-Calcium 
0001484: ill-typed alt-ergo proof obligation
Using WP with RTE enabled on the attached file results in proof obligations rejected as ill-typed by Alt-Ergo.
frama-c -wp -wp-rte t.c
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.
No tags attached.
related to 0002355assigned virgile Alt-Ergo reports about " bool and int cannot be unified" 
c t.c (165) 2013-09-25 15:30
Issue History
2013-09-25 15:30virgileNew Issue
2013-09-25 15:30virgileStatusnew => assigned
2013-09-25 15:30virgileAssigned To => correnson
2013-09-25 15:30virgileFile Added: t.c
2013-09-25 16:03virgileAdditional Information Updated
2013-09-25 16:11virgileNote Added: 0004090
2018-02-05 17:27virgileRelationship addedrelated to 0002355
2019-10-17 17:11corrensonStatusassigned => resolved
2019-10-17 17:11corrensonFixed in Version => Frama-C 20-Calcium
2019-10-17 17:11corrensonResolutionopen => fixed

2013-09-25 16:11   
Actually, thinking about it, I guess that the difference between RTE-generated and user-written assertions lies in the fact that RTE might not insert a coercion from boolean to integer in the corresponding AST node.