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 LAA16664; Mon, 26 Jan 2004 11:56:00 +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 LAA16953 for ; Mon, 26 Jan 2004 11:55:59 +0100 (MET) Received: from muscadet.inria.fr (muscadet.inria.fr [128.93.8.12]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0QAtOP04658; Mon, 26 Jan 2004 11:55:24 +0100 (MET) Received: by muscadet.inria.fr (Postfix, from userid 11404) id 729DC7AA8; Mon, 26 Jan 2004 11:55:24 +0100 (CET) To: Ocaml Cc: Richard Jones Subject: Re: [Caml-list] Marshalling unknown types Reply-To: James Leifer From: James Leifer References: <4014CE35.3000503@baretta.com> <20040126101945.GA2500@redhat.com> Date: Mon, 26 Jan 2004 11:55:24 +0100 In-Reply-To: <20040126101945.GA2500@redhat.com> (Richard Jones's message of "Mon, 26 Jan 2004 10:19:45 +0000") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 marshalling:01 marshalling:01 abstraction:01 versioning:01 rebinding:01 abstraction:01 furuse's:01 3.07:01 runtime:01 runtime:01 run-time:01 compiler:01 ocaml:01 int:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk We (Gilles Peskine, Peter Sewell, Keith Wansbrough, and I) have been working on type safety and related questions concerned with marshalling: http://pauillac.inria.fr/~leifer/articles/leifer-globas-icfp2003.ps.gz http://pauillac.inria.fr/~leifer/articles/leifer-marabreb.ps.gz However, we're far from a patch to the actual Ocaml compiler right now. We've rather concentrated on building a prototype ML interpreter which we can use for exploring the design space (type safety, abstraction safety, versioning, dynamic rebinding to local resources, etc.). If you don't need abstraction safety, then Jun Furuse's work on safe marshalling might interest you. Michel Mauny might be reimplementing this for 3.07? Richard Jones said: > What's needed is for someone to rewrite the marshal code to work > safely. However there's not enough type information available at > runtime for this to work. eg. [1; 2; 3] looks the same as (1, 2, 3) > at runtime. Well... Peter, Xavier, and I were scratching our heads at POPL two weeks ago and said: For a really polymorphic marshal then you need to pass some type information around at run-time or introduce user type representations. Of course, if you know *at compile time* that you're marshalling or unmarshalling to an int list or an int triple, there's no problem distinguishing between those cases (and including the right data for doing the dynamic type check). -James ------------------- 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