From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA10559 for caml-red; Thu, 2 Nov 2000 19:25:19 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA23219 for ; Wed, 1 Nov 2000 16:29:04 +0100 (MET) Received: from pcrm.win.tue.nl (pcrm.win.tue.nl [131.155.69.41]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id eA1FT3X21335 for ; Wed, 1 Nov 2000 16:29:03 +0100 (MET) Received: from pcrm (stephan@localhost [127.0.0.1]) by pcrm.win.tue.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with SMTP id QAA13295 for ; Wed, 1 Nov 2000 16:32:24 +0100 From: Stephan Houben Reply-To: stephanh@win.tue.nl Organization: Scientific Computing Group 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 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00110116304500.13232@pcrm> Content-Transfer-Encoding: 8bit Sender: weis@pauillac.inria.fr 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