caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: James Leifer <James.Leifer@inria.fr>
To: Ocaml <caml-list@inria.fr>
Cc: Richard Jones <rich@annexia.org>
Subject: Re: [Caml-list] Marshalling unknown types
Date: Mon, 26 Jan 2004 11:55:24 +0100	[thread overview]
Message-ID: <r77d6973roj.fsf@muscadet.inria.fr> (raw)
In-Reply-To: <20040126101945.GA2500@redhat.com> (Richard Jones's message of "Mon, 26 Jan 2004 10:19:45 +0000")

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


      reply	other threads:[~2004-01-26 10:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-26  8:22 Alex Baretta
2004-01-26 10:19 ` Richard Jones
2004-01-26 10:55   ` James Leifer [this message]

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=r77d6973roj.fsf@muscadet.inria.fr \
    --to=james.leifer@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=rich@annexia.org \
    /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).