Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] possible bug in bitwise operators and jessie



Hello,

> I can't get any of the provers to prove the following:
>
> void function(){
> ? ?/*@ assert (3&1) == 1*/
> }
>
> Can anyone shed some light or is this a bug?

The automatic provers you have tried consider integers as abstract
entities on which one adds, substracts, multiplies (and perhaps only
sometimes divides, but that's really tricky). A prover that considered
integers as sequences of booleans would have no problem with your
assertion, but the slightest addition in the analyzed program would
become an equations system involving 96 variables instead of three.

If you intend to analyze a program that does only bitwise operations
on integers, consider solutions based on "bit blasting", for instance
the techniques and limitations described in
http://research.microsoft.com/pubs/80722/z3prefix.pdf (for what it's
worth, this link does not work in Safari).

Pascal