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] Plugin development: Modifying a contract



Hello,

On 02/10/2012 09:05 AM, Boris Hollas wrote:
> I want to modify the contract of a function, ie to insert pre- or
> postconditions. I've seen that there are functions to build these in
> Ast_info, but how are they inserted into the AST?

With Frama-C Nitrogen, Kernel_function.set_spec is what you need.

Note that the way of handling annotations will fully changed in the next 
major release. Hopefully it will be simple and more homogeneous for the 
different kind of annotations (function contracts, global annotations 
and code annotations).

Hope this helps,
Julien