From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 40161BBBB for ; Tue, 28 Feb 2006 02:34:09 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k1S1Y8sG017073 for ; Tue, 28 Feb 2006 02:34:08 +0100 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 CAA02199 for ; Tue, 28 Feb 2006 02:34:08 +0100 (MET) Received: from cgpsrv2.cis.mcmaster.ca (univmail.CIS.mcmaster.ca [130.113.64.46]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k1S1Y7oe017068 for ; Tue, 28 Feb 2006 02:34:07 +0100 Received: from [69.198.111.105] (account carette@univmail.cis.mcmaster.ca HELO [192.168.1.100]) by cgpsrv2.cis.mcmaster.ca (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 118989371; Mon, 27 Feb 2006 20:34:05 -0500 Message-ID: <4403A889.9070708@mcmaster.ca> Date: Mon, 27 Feb 2006 20:34:01 -0500 From: Jacques Carette Organization: McMaster University User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Cc: oleg@pobox.com Subject: Native delimited continuations for bytecode OCaml Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4403A890.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4403A88F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; delimited:01 bytecode:01 ocaml:01 oleg:01 delimited:01 byte-code:01 ocaml:01 arbitrarily:01 stack:01 stack:01 patching:01 3.09.0,:01 oleg:01 tar:01 prompts:98 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 [Posted for oleg@pobox.com] This message announces the native implementation of delimited continuation framework for byte-code OCaml. The framework supports `static' (shift/reset) and `dynamic' (prompt/control, shift0, control0) delimited continuation operators with multiple, arbitrarily typed prompts. The test file testd0.ml is a good example of using shift/reset in OCaml programs. The implementation is native: it copies a relevant fragment of the OCaml interpreter stack (The stack or its fragments are never inspected however). The implementation is efficient: only the necessary prefix of the stack is copied. The implementation is fully integrated with OCaml exceptions: exception handlers may be captured in delimited continuation (and re-instated when the captured continuation is installed); exceptions remove the prompts along the way. The implementation has no typing problems, no bizarre 'a cont types, and no use for magic. The implementation does no patching to the OCaml system and is a regular library. If you compile the top-level (see `make top'), you can use delimited continuation operators in interactive OCaml sessions. The library has been tested for OCaml 3.08, 3.09.0, and 3.09.1, on ia32 Linux and FreeBSD platforms. The current version is 1.6, Feb 7, 2006. The library is distributed under the MIT license. http://pobox.com/~oleg/ftp/packages/caml-shift.tar.gz