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] Ghost function call
- Subject: [Frama-c-discuss] Ghost function call
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- Date: Wed, 11 Jun 2014 12:52:00 +0200
- In-reply-to: <53982EC9.7090503@enseeiht.fr>
- References: <1402305133.31114.YahooMailNeo@web140902.mail.bf1.yahoo.com> <5397291A.2010608@inria.fr> <CA+yPOViL+xWVM0veJ2e6ruFuPqKhDdxXSku1kT9qrbQtTsgKOA@mail.gmail.com> <53982EC9.7090503@enseeiht.fr>
Hello, 2014-06-11 12:26 GMT+02:00 arnaud <arnaud.dieumegard at enseeiht.fr>: > I wanted to use ghost functions that I can call in some other > annotations but it seems not to work. Here is a toy example as an > illustration: > > /*@ ghost int val (int a){ > return a; > } > */ > > /*@ ensures a == val(a); > */ > When I launch frama-c with this code I get following error: > > user error: unbound function val in annotation Ghost functions are still code: you cannot use them in annotations. You have to define (either directly or within an axiomatic) logic functions for that. > > But it is possible to call the val(int) function from the code itself > (as non-ghost code) ! > Is this behavior normal ? In my mind, ghost code can access non-ghost > elements but not the opposite ? In theory this is the case: you should only be able to call val inside ghost code. However, as mentioned in the ACSL implementation manual, the type-checker does not verify this at the moment. Best regards, -- E tutto per oggi, a la prossima volta Virgile
- References:
- [Frama-c-discuss] Fwd: Frama-C max_sqe question
- From: Claude.Marche at inria.fr (Claude Marché)
- [Frama-c-discuss] Fwd: Frama-C max_sqe question
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Ghost function call
- From: arnaud.dieumegard at enseeiht.fr (arnaud)
- [Frama-c-discuss] Fwd: Frama-C max_sqe question
- Prev by Date: [Frama-c-discuss] Using frama-c script to get proof obligations
- Next by Date: [Frama-c-discuss] Using frama-c script to get proof obligations
- Previous by thread: [Frama-c-discuss] Ghost function call
- Next by thread: [Frama-c-discuss] Using frama-c script to get proof obligations
- Index(es):