From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTPS id 7351C5D5 for ; Sat, 6 Oct 2018 15:19:22 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.54,349,1534802400"; d="scan'208";a="349885945" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 06 Oct 2018 17:19:20 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id A2CA182515; Sat, 6 Oct 2018 17:19:20 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 78809824CF for ; Sat, 6 Oct 2018 17:19:17 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=oleg@okmij.org; spf=Pass smtp.mailfrom=oleg@okmij.org; spf=None smtp.helo=postmaster@mail1.g3.pair.com IronPort-PHdr: =?us-ascii?q?9a23=3AGKjiPhCas0d3p22IlzlOUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPrzocbcNUDSrc9gkEXOFd2Cra4c1KyO6+jJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fcbglUhjexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfO?= =?us-ascii?q?pWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnM?= =?us-ascii?q?VhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Xymp4aV2Rx/ykC?= =?us-ascii?q?oJOT43/n/KhMJzg61UvA+uqBJkzo7IfI2YLuZycr/HcN8EQ2dKQ8ZfVzZGAoO5?= =?us-ascii?q?d4YBFu4BMvhXr4LgoFYOqh++ChejBO70zT9IhXr23aw40+g7FgHGxgMgEssIvX?= =?us-ascii?q?/Jotv1M6ISXvq0zKnO1TjDaPBW2TL86IjKaBwhpuuMXb12fMHMykcvDxvIg1SR?= =?us-ascii?q?pID/MT6Y0v4BvmaB4+Z9SO6ihHYrpg51rzS12MshhI3EipgUx13G7yl13Yc4KN?= =?us-ascii?q?++RUVme9CrCoFQuDufN4ZuQsMtXWVouCEix70Do5G7fSwKxIk9yx7QZfGLaZCI?= =?us-ascii?q?7QjiVOaLOzt3mHVleLenixaz90iv1PH8W9G13VtLtCZInN3BumoD2hDJ98SLV/?= =?us-ascii?q?Rw8l+k2TmV1gDT7u9EIVozlareM5MhxbowmYQcsUnYGS/2m0D2jK6Udkk+/eio?= =?us-ascii?q?8evnbq38ppCAL490lh3+MqM2l8OjG+s4NwwOU3Gf+eS9z73j4Vb0QK5Kj/0ziq?= =?us-ascii?q?nWqorWJcUdpq6jAg9ayJwv6xilD2Tu7NNNlnACKBdBeQmbp4nvIVDHZv7iXtml?= =?us-ascii?q?hFH5tzNmyLiSObnsDb3KLX3CkvHmZ7kruB0U8xY60d0Kv8EcMboGOv+mAhag5u?= =?us-ascii?q?ydNQcwNkmP+8iiDdx80o0EXmfWW/2eM6bTsxmP/O19erDQNr9Qgy70Lr0e39Cr?= =?us-ascii?q?lWUwwAZPeqqs3JlRb2q3TKw/fhepJEH0i9JEKl8k+wozSOuz2Q+HWD9XPjC9BO?= =?us-ascii?q?Qk7zAhTomhCNWbSw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CCAADn0bhbbXIDJ0JiHAEBAQQBAQcEA?= =?us-ascii?q?QGBVAQBAQsBggVmfyiMaItNmnANIwmIcRkHAQQzCg0BAwEBAgEBAQEBEwsNCQY?= =?us-ascii?q?rIwyCNiKDIjpBNAWDfoIAAQ+lLooUizkXgUBAgRKGFBkDgi2CZYImAo8WjlgJg?= =?us-ascii?q?nODW4lwIoFOS2+DK4lDAYwoiUqBWIF3TTAIgycJiw6FTWB6jEUBAQ?= X-IPAS-Result: =?us-ascii?q?A0CCAADn0bhbbXIDJ0JiHAEBAQQBAQcEAQGBVAQBAQsBggV?= =?us-ascii?q?mfyiMaItNmnANIwmIcRkHAQQzCg0BAwEBAgEBAQEBEwsNCQYrIwyCNiKDIjpBN?= =?us-ascii?q?AWDfoIAAQ+lLooUizkXgUBAgRKGFBkDgi2CZYImAo8WjlgJgnODW4lwIoFOS2+?= =?us-ascii?q?DK4lDAYwoiUqBWIF3TTAIgycJiw6FTWB6jEUBAQ?= X-IronPort-AV: E=Sophos;i="5.54,349,1534802400"; d="scan'208";a="349885927" Received: from mail1.g3.pair.com ([66.39.3.114]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Oct 2018 17:19:16 +0200 Received: from mail1.g3.pair.com (localhost [127.0.0.1]) by mail1.g3.pair.com (Postfix) with ESMTP id B170B3FB351; Sat, 6 Oct 2018 11:19:13 -0400 (EDT) Received: from Melchior.localnet (167.67.239.49.rev.vmobile.jp [49.239.67.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail1.g3.pair.com (Postfix) with ESMTPSA id DCBBD582C92; Sat, 6 Oct 2018 11:19:12 -0400 (EDT) Date: Sun, 7 Oct 2018 00:19:30 +0900 From: Oleg To: caml-list@inria.fr Message-ID: <20181006151930.GA15255@Melchior.localnet> Mail-Followup-To: Oleg , caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Subject: [Caml-list] ANN: BER MetaOCaml N107, for OCaml 4.07.1 Reply-To: Oleg X-Loop: caml-list@inria.fr X-Sequence: 17096 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: BER MetaOCaml N107 is a strict superset of OCaml 4.07.1 for ``writing programs that generate programs''. BER MetaOCaml adds to OCaml the type of code values (denoting ``program code'', or future-stage computations), and two basic constructs to build them: quoting and splicing. The generated code can be printed, stored in a file -- or compiled and linked-back to the running program, thus implementing run-time code optimization. A well-typed BER MetaOCaml program generates only well-scoped and well-typed programs: The generated code shall compile without type errors. Staging-annotation-free BER MetaOCaml is identical to OCaml; BER MetaOCaml can link to any OCaml-compiled library (and vice versa); findlib and other tools can be used with BER MetaOCaml as they are, in their binary form. BER MetaOCaml N107 is a superset of the just released OCaml 4.07.1. It also has a number of small improvements: better error messages, no longer needing parentheses when putting a sequence of statements in brackets, more convenient genlet, etc. It also has two notable additions: explicit lifting and new offshoring. Explicit lifting is the explicit conversion of a value to the code, which, when compiled and run, (re-)produces that value. BER N107 supports explicit lifting of base-type values and lists, options, and, notably, arrays of liftable values. Explicit lifting is described in Section 3.2.1 of the MetaOCaml book. The generated code, if simple enough, can be `offshored' -- converted to the intermediate, imperative language which may then be transcribed to C, OpenCL, LLVM, etc. When generating computational kernels, the code is supposed to be simple enough, so it runs fast. One test case in MetaOCaml distribution shows how can one go about converting the intermediate code to C. Offshoring thus lets us treat a subset of OCaml as a new notation (syntax) for C. BER MetaOCaml N107 should be available though OPAM, hopefully soon. In the meanwhile, it is available as a set of patches to the OCaml 4.07.1 distribution. http://okmij.org/ftp/ML/ber-metaocaml-107.tar.gz See the INSTALL document in that archive. You need the source distribution of OCaml 4.07.1. For more explanations, please see http://okmij.org/ftp/ML/MetaOCaml.html as well as ChangeLog and NOTES.txt in the BER MetaOCaml distribution. -- Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs