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] Can i specify/proove a function to be "just called"?
- Subject: [Frama-c-discuss] Can i specify/proove a function to be "just called"?
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- Date: Thu, 16 Jan 2014 09:38:00 +0100
- In-reply-to: <20140114113819.A452072604E1@dd13004.kasserver.com>
- References: <20140114113819.A452072604E1@dd13004.kasserver.com>
Hello, 2014/1/14 <ds.verification at flecsim.com>: > So, the idea is that for the function being called that its call has no > (visible-to-Frama-C) effect but i only need to ensure it is called: The > function is "trustable" and has side effects which are out of scope of the > verification. > > I thought of something like: > > /* Does some magic (e.g. external assembly module), but has no contract > * its own > */ > extern void foo(int val); > > int counter = 0; > > /* @ensures \called(foo(\old(counter))); > @ensures \counter=\old(counter)+1; > */ > void test1() > { > foo(counter); > counter++; > } > > Is this possible in ACSL? > You might be interested in the Aora? plug-in (http://frama-c.com/download/frama-c-aorai-manual.pdf), whose main aim is to specify the sequences of function calls that can occur during the execution of a program. Such a specification is then translated into a set of ACSL contracts which have to be discharged by WP, Jessie or Value analysis (or any other plug-in that can check the validity of ACSL formulas). From what you describe, I'd say that the following automaton (not tested) should do the trick: %init: Init; %accept: OK; %deterministic; Init: { CALL(test1) } -> FOO; FOO: { foo() } -> OK | { RETURN(test1) } -> KO | other -> FOO; OK: -> OK; KO: -> KO; Note that Aora?'s current version only considers defined functions, so that you'd have to provide a dummy body for foo in order to use this plugin. Best regards, -- E tutto per oggi, a la prossima volta Virgile
- Follow-Ups:
- [Frama-c-discuss] Can i specify/proove a function to be "just called"?
- From: ds.verification at flecsim.com (ds.verification at flecsim.com)
- [Frama-c-discuss] Can i specify/proove a function to be "just called"?
- References:
- [Frama-c-discuss] Can i specify/proove a function to be "just called"?
- From: ds.verification at flecsim.com (ds.verification at flecsim.com)
- [Frama-c-discuss] Can i specify/proove a function to be "just called"?
- Prev by Date: [Frama-c-discuss] Frama-c: WP issues
- Next by Date: [Frama-c-discuss] Can i specify/proove a function to be "just called"?
- Previous by thread: [Frama-c-discuss] Can i specify/proove a function to be "just called"?
- Next by thread: [Frama-c-discuss] Can i specify/proove a function to be "just called"?
- Index(es):