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] Restricting write access to globals in ACSL


On Fri, May 7, 2010 at 10:48 AM, Tom Hawkins <tomahawkins at> wrote:
>?Is this possible in ACSL without resorting to detailed
> assign annotations for every function in the program?

If we assume for the moment that the answer is no,
you can still generate assigns for all your functions
from any convenient format with a Frama-C plug-in.

At the moment I cannot find a good plug-in to copy
the skeleton from in order to do that
(when we encourage someone to write their own plug-in,
we usually recommend a simple, existing plug-in to use
as a model, but I'm not sure we have the "iterate on all
functions and insert a specification" variety. Perhaps
Aora?, but it provides sophisticated features, so it may
be hard to use as a model: ).

Still, Frama-C has a module to generate assigns clauses
for external functions for which only a type is known.
This is implemented in file src/logic/ .
You can experiment with it but we will need to provide
proper APIs if you decide this is the way to go.

The key part is:

  match kf.spec.spec_behavior with
  | [] ->
      kf.spec.spec_behavior <- [{b_name = "generated"; b_post_cond = [] ;
                                 b_assumes = [];
                                 b_assigns = Lazy.force generated_assigns}]
  | _ ->