From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 218337EE4B for ; Tue, 15 Oct 2013 20:14:07 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of fw@deneb.enyo.de) identity=pra; client-ip=87.106.162.201; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="fw@deneb.enyo.de"; x-sender="fw@deneb.enyo.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of fw@deneb.enyo.de) identity=mailfrom; client-ip=87.106.162.201; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="fw@deneb.enyo.de"; x-sender="fw@deneb.enyo.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@ka.mail.enyo.de) identity=helo; client-ip=87.106.162.201; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="fw@deneb.enyo.de"; x-sender="postmaster@ka.mail.enyo.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4FAM2EXVJXaqLJ/2dsb2JhbABagwfDNIEjFnSCJQEBBAE6PwULCyElDwFHBogTCr1tj0oHhCUDnjyLSoFmgUA6 X-IPAS-Result: Ag4FAM2EXVJXaqLJ/2dsb2JhbABagwfDNIEjFnSCJQEBBAE6PwULCyElDwFHBogTCr1tj0oHhCUDnjyLSoFmgUA6 X-IronPort-AV: E=Sophos;i="4.93,501,1378850400"; d="scan'208";a="30472602" Received: from ka.mail.enyo.de ([87.106.162.201]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 15 Oct 2013 20:14:06 +0200 Received: from [172.17.135.4] (helo=deneb.enyo.de) by ka.mail.enyo.de with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) id 1VW981-0006ID-9G; Tue, 15 Oct 2013 20:13:57 +0200 Received: from fw by deneb.enyo.de with local (Exim 4.80) (envelope-from ) id 1VW981-0003BR-4H; Tue, 15 Oct 2013 20:13:57 +0200 From: Florian Weimer To: Xavier Rival Cc: Gabriel Kerneis , caml-list@inria.fr References: <20131015124116.GA7090@kerneis.info> Date: Tue, 15 Oct 2013 20:13:57 +0200 In-Reply-To: (Xavier Rival's message of "Tue, 15 Oct 2013 14:48:49 +0200 (CEST)") Message-ID: <87a9ia8kre.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Caml-list] [ocaml-jobs] Developper position: designing a C front-end in OCaml * Xavier Rival: > I have used CIL in another project in the past. My experience is that > it is a great front-end for program transformation. It is less adapted > to static analysis though, as it does a lot of syntactic > transformations, causing part of the structure of the code to be > lost. For instance, it transforms loops into a while(1) form, with > break statements. This design choice does not help static analyzers, > and may require recalculating information that was lost in the early > phases. Clang mirrors the source pretty closely in its AST, so a Zephyr ASDL model and serializer for that might be the way to go. The advantage would be that you get not just C, but also many popular extensions, broadening the set of potential inputs for your analysis tools. GCC is another option (using a similar approach), but it's trees are a little less close to the source code.