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] Queries regarding WP plugin
- Subject: [Frama-c-discuss] Queries regarding WP plugin
- From: dmentre at linux-france.org (David MENTRE)
- Date: Mon, 15 Dec 2014 08:55:47 +0100
- In-reply-to: <CAAm4naDEygcQerVHAcpCGTubjaRrUu5+-zW8Qa7Q9N1iuHfe=w@mail.gmail.com>
- References: <CAAm4naBmXRNK9hh8k0pUDOraf5X7V2sY9Zg9F-c9VJqED8XFcw@mail.gmail.com> <F61EA928-AB8C-4B01-B2DC-3447D7E7E453@cea.fr> <CAAm4naCC5HzyUo7R7ZrKgDQ-+B=D8tGovfG8q=BmLHFO5nhu+g@mail.gmail.com> <548A9B7B.9000000@linux-france.org> <CAAm4naDEygcQerVHAcpCGTubjaRrUu5+-zW8Qa7Q9N1iuHfe=w@mail.gmail.com>
Hello, Le 15/12/2014 05:17, Debasmita Lohar a ?crit : > The exact commands and outputs are as follows: > 1. frama-c -wp-print test.c. Output: [kernel] preprocessing with "gcc -C > -E -I. test.c" > 2. frama-c -wp-out wptest test.c. Output: same. wptest is a directory > and after the execution of this command it contains nothing. > 3. frama-c -wp-gen test.c. Output: again same. > 4. frama-c -wp test.c. > output: [kernel] preprocessing with "gcc -C -E -I. test.c" > [wp] Running WP plugin... > [wp] Collecting axiomatic usage > [wp] warning: Missing RTE guards > [wp] 1 goal scheduled > [wp] [Qed] Goal typed_main_assert_P : Valid OK, you have several issues: 1. You should use *simultaneously* -wp (to generate and prove proof obligations) and -wp-out <dir> (to keep them in the given <dir> directory) options; 2. Your program is too simple and the generated proof obligation is prove by Qed (line "[Qed] Goal typed_main_assert_P : Valid"), the internal prover of WP, and not Alt-Ergo (thus no file are generated). You should use -wp-qed-checks but it seems to be broken in WP 0.8 (generation of truncated Alt-Ergo files). For 2., another option is to use more complicated proof obligations. For example, on the attached simple_wp.c file, verification condition of f_complicated() is generated (and not for f()). I used following command line: frama-c -wp-out simple_wp_out -wp simple_wp.c Best regards, david -------------- next part -------------- /*@ requires 0 <= x <= 10; ensures 1 <= \result <= 11; */ int f(int x) { return x + 1; } /*@ requires 0 <= x <= 10; ensures 0 <= \result <= 33; */ int f_complicated(int x) { return x * 1; }
- Follow-Ups:
- [Frama-c-discuss] Queries regarding WP plugin
- From: dmentre at linux-france.org (David MENTRE)
- [Frama-c-discuss] Queries regarding WP plugin
- References:
- [Frama-c-discuss] Queries regarding WP plugin
- From: dlohar2009 at gmail.com (Debasmita Lohar)
- [Frama-c-discuss] Queries regarding WP plugin
- From: loic.correnson at cea.fr (Loïc Correnson)
- [Frama-c-discuss] Queries regarding WP plugin
- From: dlohar2009 at gmail.com (Debasmita Lohar)
- [Frama-c-discuss] Queries regarding WP plugin
- From: dmentre at linux-france.org (David MENTRE)
- [Frama-c-discuss] Queries regarding WP plugin
- From: dlohar2009 at gmail.com (Debasmita Lohar)
- [Frama-c-discuss] Queries regarding WP plugin
- Prev by Date: [Frama-c-discuss] Queries regarding WP plugin
- Next by Date: [Frama-c-discuss] Queries regarding WP plugin
- Previous by thread: [Frama-c-discuss] Queries regarding WP plugin
- Next by thread: [Frama-c-discuss] Queries regarding WP plugin
- Index(es):