[now to the list, apart from Gabriel]
Hello,

In general, the AST transformation should be gradual, like in logic rewriting systems kind of Maude. So the AST definitions should be lightweight as possible and passes declarative. In the end you have a "final" OCaml AST, with types or without, with blank tokens and comments or without, and it would be CIL or something else depending what you want.

I am not opposing inventing new frontend, but would rather think what kind of goodness we can get from the existing solutions. I think sticking with Clang (or gcc) as a frontend and exporting, maybe automatically the AST looks like a sane solution, as a bonus we have a C++ frontend that passes all the conformance testing.

hope that helps,
Wojciech


On Tue, Oct 15, 2013 at 10:36 PM, Gabriel Kerneis <gabriel@kerneis.info> wrote:
Le 2013-10-15 19:29, Dmitry Grebeniuk a écrit :

We are talking about changing the AST used to manipulate the programs.
Changing it (in either CIL or Frama-C) would mean breaking every
existing code around the world based on it.

  I don't think so.  Imagine that "C source -> CIL representation
(available to code based on CIL)" could be enhanced to "C source ->
Very Concrete C AST -> CIL representation".  Old users are happy, new
users have access to Very Concrete C AST.

Oh, this is already the case.  "Very concrete AST" is the
"FrontC" project mentionned elsewhere in this thread.

--
Gabriel


--
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs