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: arnaud.dieumegard at enseeiht.fr (arnaud)
- Date: Wed, 11 Jun 2014 12:26:17 +0200
- In-reply-to: <CA+yPOViL+xWVM0veJ2e6ruFuPqKhDdxXSku1kT9qrbQtTsgKOA@mail.gmail.com>
- References: <1402305133.31114.YahooMailNeo@web140902.mail.bf1.yahoo.com> <5397291A.2010608@inria.fr> <CA+yPOViL+xWVM0veJ2e6ruFuPqKhDdxXSku1kT9qrbQtTsgKOA@mail.gmail.com>
Hi list, 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); */ int min(int a, int b){ if (a > b) return b; else return a; } When I launch frama-c with this code I get following error: user error: unbound function val in annotation 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 ? Maybe my ghost function declaration is not correct ? PS: I'm using Frama-C version Neon-20140301 Arnaud
- Follow-Ups:
- [Frama-c-discuss] Ghost function call
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Ghost function call
- 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] Fwd: Frama-C max_sqe question
- Prev by Date: [Frama-c-discuss] Fwd: Frama-C max_sqe question
- Next by Date: [Frama-c-discuss] Using frama-c script to get proof obligations
- Previous by thread: [Frama-c-discuss] Fwd: Frama-C max_sqe question
- Next by thread: [Frama-c-discuss] Ghost function call
- Index(es):