caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: "Dash, Santanu" <s.dash@herts.ac.uk>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] file specific outputting
Date: Tue, 10 Jul 2012 13:21:36 +0200	[thread overview]
Message-ID: <CAPFanBE5h5c4NEMTe823223RHM3+za79S4UT-JESi-3Gu4YH1Q@mail.gmail.com> (raw)
In-Reply-To: <CEDE565C-6DB2-40FF-9967-8E93DEACAE5E@herts.ac.uk>

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

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 <s.dash@herts.ac.uk> 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
>
>

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

  reply	other threads:[~2012-07-10 11:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 10:50 Dash, Santanu
2012-07-10 11:21 ` Gabriel Scherer [this message]
2012-07-10 12:16 ` Jérémie Dimino
2012-07-10 12:39   ` Dash, Santanu

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=CAPFanBE5h5c4NEMTe823223RHM3+za79S4UT-JESi-3Gu4YH1Q@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=s.dash@herts.ac.uk \
    /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).