Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Stephan Houben <stephan@pcrm.win.tue.nl>
To: caml-list@inria.fr
Subject: question on integrating the toplevel in an O'Caml app
Date: Wed, 1 Nov 2000 16:15:39 +0100	[thread overview]
Message-ID: <00110116304500.13232@pcrm> (raw)

Hello list,

At our department, we have currently an application that allows
"Graphical programming", i.e. the user can connect modules (which
act like functions) on the screen with a mouse. It is somewhat similar
to systems like AVS.

Currently, the application is written in C++ and extremely unstable.
It is also not very simple to write new modules, because of all the issues
of memory management, since the user can create, delete, connect
and disconnect modules in an arbitrary order.

I thought that it would be much nicer to have such a system in O'Caml.
Essentially, every graph the user can draw can directly tarnslated
into an O'Caml expression. So I would like to be able to do the
following tasks:

1. Read in a .cmo/.cmi file and find out what functions (and what types)
   are defined in it.
2. Assemble an expression using the functions in .1
3. Type-checking and evaluating the function.

These all seem things the interpreter does now. In the crudest set-up,
I would simply send string to the interpreter. However, a better
approach might be to actually send the AST to the interpreter.

I also need to get the type information. A crude approach would be again
to ask the interpreter to evaluate something like module M = Blah, 
and look at the result. again, I suppose a better approach would be
to get the data structure inside the compiler back.

Finally, it would be nice if some modules could be natively compiled
and statically linked to the application, so as to speed them up.

Any advice you can give before I dive into the toplevel `source?

Stephan

-- 
ir. Stephan H.M.J. Houben
tel. +31-40-2474358 / +31-40-2743497
e-mail: stephanh@win.tue.nl



             reply	other threads:[~2000-11-02 18:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-01 15:15 Stephan Houben [this message]
2000-11-02 23:35 Ruchira Datta

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=00110116304500.13232@pcrm \
    --to=stephan@pcrm.win.tue.nl \
    --cc=caml-list@inria.fr \
    --cc=stephanh@win.tue.nl \
    /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