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] need frama-c help to develop plugin
- Subject: [Frama-c-discuss] need frama-c help to develop plugin
- From: Pascal.Cuoq at cea.fr (Pascal Cuoq)
- Date: Tue, 24 Nov 2009 15:55:07 +0100
- In-reply-to: <4fb3acb29cfd46217591c87ef390bd29.squirrel@webmail.ensi-bourges.fr>
- References: <96642b68b66b344ebcaf40f98e17ce9b.squirrel@webmail.ensi-bourges.fr> <4B0BE658.6000408@starynkevitch.net> <4fb3acb29cfd46217591c87ef390bd29.squirrel@webmail.ensi-bourges.fr>
Hello, please use English when this list is among the recipients of your message. > Nous devons d?velopper un plugin sous frama-c qui permet de modifier > un > fichier source en langage C (on veut par exemple lui retirer des > lignes, > enlever une instruction ...) > L'int?ret pour nous d'utiliser frama-c est de profiter des plugins > d?j? > incorpor?es ainsi que des fonctions de base comme obviously (on doit > partir d'un fichier C dans le format g?n?r? par obviously). To reassure non-French readers of this list, this sentence is hard to parse even with the benefit of the language. Are you saying that there exists something called "obviously" that is one of Frama-C's base functionalities? Should we know about it? I googled "obviously C transformation" and "obviously ensi bourges", and at this point I have to concede that I don't know... Frama-C transforms the C source in an Abstract Syntax Tree on which it is possible to do analyses. It is possible to print back the AST into a C program, but the result is never going to be exactly like the original with removed lines or statements. Just getting a file that is syntactically correct C may be difficult if you intend to remove some constructs. A rather simple C transformation plug-in that you can use for inspiration is the so-called "semantic constant folding" plug-in that substitutes constant expressions by their values. You can find it in .../src/constant_propagation. A less simple C transformation plug-in is the Slicing plug-in. You may have to use some of the latter's building blocks, especially the Program Dependency Graph. > Probl?me principal pour l'instant : malgr? la doc, nous n'arrivons > pas ? > comprendre le fonctionnement de frama-c au niveau de la lecture du > fichier > source. The point of writing a Frama-C plug-in is that you don't have to understand how it reads input files. If it is acceptable for you to have the input files go through the AST representation before being output again, concentrate on understanding how to manipulate the AST. Pascal
- Follow-Ups:
- [Frama-c-discuss] need frama-c help to develop plugin
- From: pierre.andrieux at ensi-bourges.fr (pierre.andrieux at ensi-bourges.fr)
- [Frama-c-discuss] need frama-c help to develop plugin
- References:
- [Frama-c-discuss] need frama-c help to develop plugin
- From: gregory.baudeau at ensi-bourges.fr (Baudeau Grégory)
- [Frama-c-discuss] need frama-c help to develop plugin
- From: basile at starynkevitch.net (Basile STARYNKEVITCH)
- [Frama-c-discuss] need frama-c help to develop plugin
- From: pierre.andrieux at ensi-bourges.fr (pierre.andrieux at ensi-bourges.fr)
- [Frama-c-discuss] need frama-c help to develop plugin
- Prev by Date: [Frama-c-discuss] need frama-c help to develop plugin
- Next by Date: [Frama-c-discuss] Using Frama-C as Caduceus
- Previous by thread: [Frama-c-discuss] need frama-c help to develop plugin
- Next by thread: [Frama-c-discuss] need frama-c help to develop plugin
- Index(es):