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] save plugins results in c file



Hello,

Le 05/01/2018 à 16:47, Rokiatou DIARRA a écrit :
> I'am new in frama-c. So I apologize  in advance for my question.
> 
> I would like to make a plugin that will modify the source code, clone 
> some function, insert codes and I would like my plugin to generate a 
> second file that will contain the modified version of the input file.I 
> would like to know if it is possible to generate a new file c with 
> frama-c. For example, the results of the Sparecode and Semantic constant 
> folding plugins are displayed on the terminal directly and not in a 
> file. So I would like to know if Frama-c has the function to write to a 
> file instead of sending the result of the analysis to the standard output.

The combination of options -print and -ocode does the job as in the 
following command:

$ frama-c foo.c -scf -then-last -print -ocode foo-scf.c

For details, please have a look to the available kernel options through 
"frama-c -kernel-help" and to the Frama-C user manual 
(http://www.frama-c.com/download/user-manual-Sulfur-20171101.pdf): all 
these options are explained there.

Best,
Julien
-- 
Researcher-engineer
CEA LIST, Software Security Labs
tel:(+33)1.69.08.00.18  fax:(+33)1.69.08.83.95  Julien.Signoles at cea.fr