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] Proving properties with land?

  • Subject: [Frama-c-discuss] Proving properties with land?
  • From: me at (Yifan Lu)
  • Date: Tue, 15 Aug 2017 16:22:07 -0500

I have the following simple function

int test(unsigned char x) {
    int y;
    y = (int)x & 0x5;
    //@ assert 0 <= (x & 0x1);
    //@ assert 0 <= (x & 0x4);
    return y;

The first assertion goes through but the second one cannot be proved.

My options: -wp -wp-rte -wp-init-const -wp-model ref -wp-split

Eventually, I want to prove something more complicated such as

/*@ lemma alignment: \forall integer x, y; x <= y && y % 4 == 0 ==>
((x + 3) & 4) <= y;

But I can't even get a simple toy property proven.