Frama-C Bug Tracking System - Frama-C
View Issue Details
0001847Frama-CPlug-in > wppublic2014-07-21 10:062014-07-21 10:06
normalminorhave not tried
0001847: Problem with _Bool(when casting to int or with ?:)
In this example the ensures seems to be impossible to prove whereas it should be easy : //@ensures (!\result) == (!x); _Bool f(_Bool x) { _Bool y; return (y?x:x); } I put the bug in Wp category but it can be see as a framaC bug depending from where it comes from.
This must be due to the transformation of ?: into an if statement with an int local variable which lead more or less to a function like this that can't be proven : //@ensures (!\result) == (!x); _Bool g(_Bool x) { int t = x; return t; } This must be due to the lack of information about the cast. I think that the transformation of ?: should use a _Bool temp variable instead of an int. Or int cast should have a lemma like \forall _Bool x; (x != 0) <==> (((int) x) != 0);
No tags attached.
Issue History
2014-07-21 10:06davygNew Issue
2014-07-21 10:06davygStatusnew => assigned
2014-07-21 10:06davygAssigned To => correnson

There are no notes attached to this issue.