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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 6299D7ED34 for ; Tue, 10 Jul 2012 13:22:19 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.213.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.213.182 as permitted sender) identity=mailfrom; client-ip=209.85.213.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yx0-f182.google.com) identity=helo; client-ip=209.85.213.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-yx0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkwBAHsP/E/RVdW2kGdsb2JhbABFDqZkiAkBiHoIIgEBAQEJCQ0HFAQjgiABAQEDARICLAEbEgsBAwELBgUEBxohIgERAQUBChIGExIQh1sBAwYGC51sCQOMI4JxhUAKGScDCleIcQEFDIs0hiIDlTaBEol0gyI+g0U7 X-IronPort-AV: E=Sophos;i="4.77,559,1336341600"; d="scan'208";a="166267889" Received: from mail-yx0-f182.google.com ([209.85.213.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Jul 2012 13:22:18 +0200 Received: by yenl8 with SMTP id l8so16189143yen.27 for ; Tue, 10 Jul 2012 04:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=8MWuHtxvRQVzgEraIML2NOpTUHkFBz9BUBaCMwiwqPw=; b=g1DEduOJOmymqAksYTP6opl+kWPM6HATHAw61t3b1eVr7Q/3o/7d5M0gm3bs14bcxj OSYf90emJub+oEIu0z2b6cNaWt7TDLzDyoPwsjYyoQcWZPgoOARvYqno+1E7KbOtosOt adJLCuITWE0C/yCrSMIZhhn8zFH5+GrRD0rirlF3Mcp/TfHYB8yEbCETrBGCgJDXDiqU Y23KQO5YeCpIS1nDcQsIGkGU0h/6m61rClZNo00foXevTPKeUyrurCFk/mSvSmQecMQg 17VqXCs6d5MqEvIdYsBPTvekndJh2jPPz0u1F3nzLEc5DidPT0Fu+H29/X3rqCIr+OPB e/yw== Received: by 10.50.202.8 with SMTP id ke8mr11041816igc.6.1341919337320; Tue, 10 Jul 2012 04:22:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.94.39 with HTTP; Tue, 10 Jul 2012 04:21:36 -0700 (PDT) In-Reply-To: References: From: Gabriel Scherer Date: Tue, 10 Jul 2012 13:21:36 +0200 Message-ID: To: "Dash, Santanu" Cc: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=f46d04479ee56b125104c477f157 Subject: Re: [Caml-list] file specific outputting --f46d04479ee56b125104c477f157 Content-Type: text/plain; charset=ISO-8859-1 There is an "output_name" value in utils/clflags.ml, which is handled by the "output_prefix" function in driver/main.ml, which passes it to the Compile.{interface,implementation} functions of drivers/compile.ml; have a look at how these two functions handle production of auxiliary .cmi or .annot files. On Tue, Jul 10, 2012 at 12:50 PM, Dash, Santanu wrote: > Hello all, > > I work in the area of program analysis. I am currently trying to analyse > Ocaml programs and wish to output file-specific information with the aid of > the Ocaml compiler. > > For example, if I compile a file called foo.ml, i want to output a file > called foo.info based on an analysis of alpha.ml. I have already > integrated the analysis module with the Ocaml compiler. > > Can someone direct me on the best way to go about this? Is there a > variable in the compiler that stores the filename of the file currently > being compiled? > > Kind regards, > Santanu > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > --f46d04479ee56b125104c477f157 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable There is an "output_name" value in utils/clflags.ml, which is handled by the "output_prefix" fun= ction in driver/main.ml, which passes it to = the Compile.{interface,implementation} functions of drivers/compile.ml; have a look at how these two functions handl= e production of auxiliary .cmi or .annot files.

On Tue, Jul 10, 2012 at 12:50 PM, Dash, Sant= anu <s.dash@herts.ac.uk> wrote:
Hello all,

I work in the area of program analysis. I am currently trying to analyse Oc= aml programs and wish to output file-specific information with the aid of t= he Ocaml compiler.

For example, if I compile a file called foo.ml, i want to output a file called foo.info based on an analysis of alpha.ml. I have already integrated the = analysis module with the Ocaml compiler.

Can someone direct me on the best way to go about this? Is there a variable= in the compiler that stores the filename of the file currently being compi= led?

Kind regards,
Santanu
--
Caml-list mailing list. =A0Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


--f46d04479ee56b125104c477f157--