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] Using frama-c script to get proof obligations

  • Subject: [Frama-c-discuss] Using frama-c script to get proof obligations
  • From: julien.signoles at (SIGNOLES Julien)
  • Date: Wed, 11 Jun 2014 10:43:07 +0000
  • In-reply-to: <>
  • References: <>


The functions Annotations.fold_all_code_annot folds over code annotations, which are the annotations attached to statements (assertions, loop invariants, stmt contracts, etc). They do not include elements of function contracts like the ones defined in swap.c. I guess that is why you get no result. For instance, if you computes the RTE first (option -rte), your script correctly runs Alt-Ergo on the proof obligations corresponding to the generated assertions.

The module Annotations also contains iterators/folders over the other kind of annotations (ensures, ...). You might have to use each of them...

Hope this helps,

De : Frama-c-discuss [frama-c-discuss-bounces at] de la part de Jos? Pinheiro [7jpinheiro at]
Envoy? : mardi 27 mai 2014 17:46
? : frama-c-discuss at
Objet : [Frama-c-discuss] Using frama-c script to get proof obligations

Hi all,

I am trying to develop a frama-c script that uses wp api to get a list of list of pos.

I am using Annotations.fold_all_code_annot and applying the function goals_of_property to get the proof obligations list, after i invoke wp_run() and a function that calls the prover on the annotations. The types all check correctly but when i use it it always returns me an empty list.

I think i am not invoking wp plugin correctly or not using fold_all_code_annot correctly.

If you could explain me what i am doing wrong i would be very grateful. I have tried to study wp plugin but there is little information about how you can use the api and only how to use the wp plugin itself, which is understandable due to be still in development.

In annex, i attach my script and the example i use as input.

Thanks in advance,
Jos? Pinheiro

-------------- section suivante --------------
Une pi?ce jointe HTML a ?t? nettoy?e...
URL: <>