From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA31973; Wed, 4 Feb 2004 15:29:45 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 PAA31381 for ; Wed, 4 Feb 2004 15:29:44 +0100 (MET) Received: from bourg.inria.fr (bourg.inria.fr [128.93.11.100]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i14ETgP09971 for ; Wed, 4 Feb 2004 15:29:42 +0100 (MET) Received: from starynke by bourg.inria.fr with local (Exim 4.30) id 1AoO29-00024X-JO; Wed, 04 Feb 2004 15:29:41 +0100 Date: Wed, 4 Feb 2004 15:29:41 +0100 To: Leszek.Holenderski@philips.com, caml-list@inria.fr Subject: Re: [Caml-list] Is Caml good for embedded systems? Message-ID: <20040204142941.GA7925@bourg.inria.fr> References: <4020F374.2DD8BC4E@philips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <4020F374.2DD8BC4E@philips.com> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Basile Starynkevitch X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 basile:01 basile:01 2004:99 philips:99 experimented:01 embedding:01 obstacle:01 floats:01 pointers:01 runtime:01 runtime:01 behave:01 cristal:01 cristal:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Feb 04, 2004 at 02:28:20PM +0100, Leszek.Holenderski@philips.com wrote: > I wonder if anybody attempted to use Caml (or any of its variants) > to program embedded systems? You didn't define what you mean by embedded systems... There are lots of various definitions, and you didn't gave any (real or fictiuous) examples, so we have to guess. Some old version of Caml-light (not Ocaml) has been ported to some old Palm PDA, IIRC. IIRC, someone experimented embedding Ocaml [or some Caml variant...?] (using the bytecode interpreter) inside the Linux kernel. > The main obstacle, as I see it, is a rather poor arithmetic. It > seems that the only directly supported numerical type is 31-bit > integers. Everything else (floats, 32-bit integers, fixed-point > integers) has to go via pointers. I'm not sure that the arithmetic is poor enough to be a problem in practice (but YMMV). I see others potential issues 1. embedded systems usually are extremely tight on memory space, and the runtime does take some space. 2. The current runtime requires floating point (and also some IO support) in the runtime - this can be worked around with some work... 3. most importantly, embedded systems usually have significant real time requirements, and the Ocaml garbage collector, even if it is very performant, is not exactly realtime (and coding realtime GC is a nightmare, and has important costs), but behave nicely even in interactive usage. Still, I tend to believe that the current Ocaml is usable in embedded systems, provided they are powerful enough (i.e. a 32bit CPU, with at least 16Mb RAM... ie something which is not smaller than 10times less my average desktop).... What kind of embedded systems do you have in mind? -- Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr Project cristal.inria.fr - INRIA Rocquencourt http://cristal.inria.fr/~starynke --- all opinions are only mine ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners