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] WP and Allocations
- Subject: [Frama-c-discuss] WP and Allocations
- From: loic.correnson at cea.fr (Loïc Correnson)
- Date: Mon, 17 Feb 2020 09:20:44 +0100
- In-reply-to: <9698bb60-a17c-14e3-7ec4-c956cb1095eb@cock.li>
- References: <9698bb60-a17c-14e3-7ec4-c956cb1095eb@cock.li>
Dear Emperor, Unfortunately, there is no (not yet) such a reasonable way of reasoning about allocation with WP. Memory models _are_ already able to deal with allocation: eg. they do so for managing the scope of local variables. However, implementation of ACSL clauses dealing with allocation is still not implemented yet, by lack of founded project that would require this feature. However, you can still simulate the effect of (typed instanced of) `malloc()` calls by returning pointers in a global (ghost) pre-allocated array. Best regards, L. > Le 16 févr. 2020 à 08:49, Emperor Hirohito <hirohito at cock.li> a écrit : > > I'm using Frama-C 20.0, alt-ergo 2.3.0, why3 1.2.1. > > Is there any reasonable way to deal with dynamic allocation with > ACSL and WP? Here's a small sample program: > >> #include <stdlib.h> >> >> int >> main(void) >> { >> char *p = malloc(10); >> if (!p) >> return 1; >> //@ assert \valid(p); >> return 0; >> } > > When I run `frama-c -wp [filename]`, none of the provers are able to > prove the assertion, while running `frama-c -eva [filename]` says > that it's valid. > _______________________________________________ > 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] WP and Allocations
- From: hirohito at cock.li (Emperor Hirohito)
- [Frama-c-discuss] WP and Allocations
- Prev by Date: [Frama-c-discuss] WP and Allocations
- Next by Date: [Frama-c-discuss] EJCP 2020 - Appel à participation
- Previous by thread: [Frama-c-discuss] WP and Allocations
- Next by thread: [Frama-c-discuss] EJCP 2020 - Appel à participation
- Index(es):