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] questions about FRAMA-C

  • Subject: [Frama-c-discuss] questions about FRAMA-C
  • From: virgile.prevosto at (Virgile Prevosto)
  • Date: Wed Oct 29 16:46:55 2008
  • In-reply-to: <10281758.1225289911499.JavaMail.www@wwumf0102>
  • References: <10281758.1225289911499.JavaMail.www@wwumf0102>

Le mer 29 oct 2008 15:18:31 CET,

> 1.Assignment of structures:  For pointers to structures, how does the assigns clause has to be used : assigns p or assigns *p?

assigns *p;

'assigns p;' would mean that the pointer itself might be modified.
>   In the second case I get the next error :
>   Fatal error: exception Assert_failure("src/jessie/", 531, 15).
>   I made an example which illustrates this case : cas_structure.tar.gz
> 2. Values of enum types are not accepted in predicates  (cas_constante.tar.gz).

Apparently the code examples have been lost somewhere, so that it is
difficult to address your issue precisely. The following code:

//@ assigns *p;
void bar(int *p);

enum foo { FOO, BAR };

//@ predicate is_FOO(enum foo x) = x == FOO;

int main() {
  enum foo x = BAR;
  //@assert !is_Foo(x);
  int y;
  return 0;

is handled correctly by Frama-C Helium.

> 3. "\let" clauses are not implemented in FRAMA-C which makes difficult verifying functions which have references as parameters. The values pointed by these references are difficult to use in the annotations, for example in predicates for properties of functions which call the first function.
>     The only possibility is to use ghost variables. The problem is that the formal specification should be written  before coding, so ghosts variables cannot be defined at this point.   
>   Do you this this feature will be implemented in the future ?
> 4. In a defined behavior, it is not possible to use a requires clause after the assume clause that defines the behavior. I took an example from the ACSL implementation, included in the distribution of FRAMA-C and I got a syntax error.

All ACSL constructions are meant to be supported by Frama-C at some
point (but I can't be more precise than that, except that \let and
requires in behavior won't be present in the next release). The current
state of the implementation is described in acsl-implementation.pdf in
the doc/ directory of the sources. Note however that implementation here
only means that the annotation is type-checked by Frama-C kernel. The
analysis plugins themselves may have further limitations, which are
normally listed in each plugin's documentation.

Best regards,
E tutto per oggi, a la prossima volta.
Virgile Prevosto