International audienceWe present a notion of η-long β-normal term for the typed lambda calculus with sums and prove, using Grothendieck logical relations, that every term is equivalent to one in normal form. Based on this development we give the first type-directed partial evaluator that constructs %able to construct normal forms of terms in this calculus
Tierless Web programming languages allow programmers to combine client-side and server-side programming in a single program. Programmers can then define components with both client and server parts and get flexible, efficient and typesafe client-server communications. However, the expressive client-server features found in most tierless languages are not necessarily compatible with functionalities found in many mainstream languages. In particular, we would like to benefit from type safety, an efficient execution, static compilation, modularity and separate compilation.In this paper, we propose E , an industrial-strength tierless functional Web programming language which extends OC with support for rich client/server interactions. It allows to build whole applications as a single distributed program, in which it is possible to define modular tierless libraries with both server and client behaviors and combine them effortlessly. E is the only language that combines type-safe and efficient client/server communications with a static compilation model that supports separate compilation and modularity. It also supports excellent integration with OC , allowing to transparently leverage its ecosystem.To achieve all these features, E borrows ideas not only from distributed programming languages, but also from meta-programming and modern module systems. We present the design of E , how it can be used in practice and its formalization; including its type system, semantics and compilation scheme. We show that this compilation scheme preserves typing and semantics, and that it supports separate compilation.This juggling of many different technologies does not only make programming more complicated, it also imposes strong constraints on code organization and prevents modularity. Let us consider the case where we want to add a comment widget to a website. This widget requires J S code for client interactions, for example a convenient editor. It also requires server code that will store and serve the comments and potentially some associated database queries. This code will thus be split in two codebases and up to three languages. Furthermore, in order to be properly integrated in the larger website, the internal communications between the client and server parts of the widget will be exposed to the rest of the program. All these programming constraints, which stem directly from the way Web programming is done currently, make it impossible to preserve abstraction and encapsulation for widgets who have both client and server aspects. This hinders safety and reusability of widgets by preventing programmers to create selfcontained independent libraries that have both client and server aspects.: A Language for Modular Tierless Web Programming :3programming often relies on numerous external libraries (for encryption, HTML, logging, . . . ). We wanted to leverage all the existing tools and libraries developed either in the O project or the larger OC ecosystem. The design of a Modular Tierless languageTo build such a language with suppo...
We present the design and implementation of a compiler from OCaml bytecode to JavaScript. The compiler first translates the bytecode into a static single-assignment intermediate representation on which optimizations are performed, before generating JavaScript. We believe that taking bytecode as an input instead of a high-level language is a sensible choice. Virtual machines provide a very stable API. Such a compiler is thus easy to maintain. It is also convenient to use, and it can just be added to an existing installation of the development tools. Already-compiled libraries can be used directly, with no need to reinstall anything. Finally, some virtual machines are the target of several languages. A bytecode to JavaScript compiler would make it possible to retarget all these languages to Web browsers at once.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.