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] Predicates with bitwise operators?
- Subject: [Frama-c-discuss] Predicates with bitwise operators?
- From: loic.correnson at cea.fr (Loïc Correnson)
- Date: Fri, 28 Jul 2017 08:30:37 +0200
- In-reply-to: <CAP4Mwte+sSZAJU7tFjK2E1G5h1qCdxzazAbCNFX4qTTFUHMWAQ@mail.gmail.com>
- References: <CAP4Mwte+sSZAJU7tFjK2E1G5h1qCdxzazAbCNFX4qTTFUHMWAQ@mail.gmail.com>
Hello, The problem is that Qed (the WP simplifier) does not unfold definition on its own, and alt-ergo can not perform bitwise operation. However, in the GUI, you can select your goal and apply the « Definition » tactic which allows Qed to solve the problem. Otherwise, you can turn you predicate into a macro⦠L. > Le 27 juil. 2017 à 19:25, Yifan Lu <me at yifanlu.com> a écrit : > > Hi, > > I wrote the following > > //@ predicate is_power_2(integer x) = x >= 0 && ((x & (x-1)) == 0); > > and I'm trying to test it (Typed+cint) with > > //@ assert is_power_2(2); > //@ assert is_power_2(8); > //@ assert is_power_2(4); > //@ assert is_power_2(64); > //@ assert !is_power_2(66); > > Unfortunately, WP does not seem to find a proof for any of them. Any ideas? > _______________________________________________ > Frama-c-discuss mailing list > Frama-c-discuss at lists.gforge.inria.fr > https://lists.gforge.inria.fr/mailman/listinfo/frama-c-discuss
- References:
- [Frama-c-discuss] Predicates with bitwise operators?
- From: me at yifanlu.com (Yifan Lu)
- [Frama-c-discuss] Predicates with bitwise operators?
- Prev by Date: [Frama-c-discuss] Predicates with bitwise operators?
- Next by Date: [Frama-c-discuss] a floating-point program example in WP
- Previous by thread: [Frama-c-discuss] Predicates with bitwise operators?
- Next by thread: [Frama-c-discuss] a floating-point program example in WP
- Index(es):