caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Wojciech Meyer <wojciech.meyer@gmail.com>
To: Gabriel Kerneis <gabriel@kerneis.info>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] [ocaml-jobs] Developper position: designing a C front-end in OCaml
Date: Wed, 16 Oct 2013 01:12:22 +0100	[thread overview]
Message-ID: <CAOg1smA_OFGRzF4zB-zy5zf-8o_LB-ypiBeU1sJqdCWdBudmSg@mail.gmail.com> (raw)
In-Reply-To: <0a437177279677820a760c6912757fac@kerneis.info>

[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]

[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<https://sympa.inria.fr/sympa/arc/caml-list>
> Beginner's list: http://groups.yahoo.com/group/**ocaml_beginners<http://groups.yahoo.com/group/ocaml_beginners>
> Bug reports: http://caml.inria.fr/bin/caml-**bugs<http://caml.inria.fr/bin/caml-bugs>
>

[-- Attachment #2: Type: text/html, Size: 3320 bytes --]

  reply	other threads:[~2013-10-16  0:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 12:31 [Caml-list] " Xavier Rival
2013-10-15 12:41 ` Gabriel Kerneis
2013-10-15 12:48   ` [Caml-list] [ocaml-jobs] " Xavier Rival
2013-10-15 12:52     ` Julia Lawall
2013-10-15 13:02     ` David MENTRE
2013-10-15 13:22       ` Gabriel Kerneis
2013-10-15 18:29         ` Dmitry Grebeniuk
2013-10-15 21:36           ` Gabriel Kerneis
2013-10-16  0:12             ` Wojciech Meyer [this message]
2013-10-16  6:12         ` David MENTRE
2013-10-15 18:13     ` Florian Weimer
2013-10-15 14:06 ` [Caml-list] " Basile Starynkevitch
2013-10-15 15:36   ` Wojciech Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOg1smA_OFGRzF4zB-zy5zf-8o_LB-ypiBeU1sJqdCWdBudmSg@mail.gmail.com \
    --to=wojciech.meyer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=gabriel@kerneis.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).