Manuel Serrano
inria > sophia > indes
-- Publications

[30]Serrano, M. and Findler, R. -- Dynamic Property Caches, a Step towards Faster JavaScripts Proxy Objects -- Proceedings of the 29th Compiler Construction Conference (CC'20), San Dieo, USA, feb, 2020.
[ pdf ]
Inline caches and hidden classes are two essential components for closing the performance gap between static languages such as Java, Scheme, or ML and dynamic languages such as JavaScript or Python. They rely on the observation that for a particular object access located at a particular point of the program, the shapes, usually referred to as the hidden classes, of accessed objects are likely to be the same. Taking benefit of that invariant, they replace the expensive lookup the semantics of these languages normally demand with one test, the inline cache, and a memory read indexed by an offset computed during the last cache miss. These optimizations are essential but they are not general enough to cope with JavaScript's proxies. In particular, when the property name is itself unknown statically, inline cache-based optimizations always take a slow path. In this paper, we show how to generalize inline caches to cope with an unknown property name. The paper first discusses the general principle of the extension and then presents the experimental results we collected using a modified version of the Hop JavaScript compiler, demonstrating how the optimization is crucial for improving the performance of proxy objects (as they naturally use dynamic property names extensively). The evaluation report shows that the modified Hop outperforms all other implementations of the language, including the most efficient commercial ones, by a factor ranging from 2 times to 100 times. Even better, our optimizations are applicable to existing compilers as they require only straightforward changes to runtime data structures; no complex analyses are required.
[29]Berry. G., and Serrano, M. -- HipHop.js: (A)Synchronous Web Reactive Programming -- Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020), London, UK, 2020.
[ pdf ]
We present HipHop.js, a synchronous reactive language that adds synchronous concurrency and preemption to Inspired from Esterel, HipHop.js simplifies the programming of non-trivial temporal behaviors as found in complex web interfaces or IoT controllers and the cooperation between synchronous and asynchronous activities. HipHop.js is compiled into plain sequential and executes on unmodified runtime environments. We use three examples to present and discuss HipHop.js: a simple web login form to introduce the language and show how it differs from and two real life examples, a medical prescription pillbox and an interactive music system that show why concurrency and preemption help programming such temporal applications.
[5]Petit, B. and Serrano, M. -- Composing and Executing Interactive Music Using the HipHop.JS Language -- Porto Alegre, Brazil, Jun, 2019.
[42]Serrano, M. and Feeley, M. -- Property Caches Revisited -- Proceedings of the 28th Compiler Construction Conference (CC'19), Washington, USA, feb, 2019.
[ pdf ]
Property caches are a well-known technique invented over 30 years ago to improve dynamic object accesses. They have been adapted to JavaScript, which they have greatly contributed to accelerate. However, this technique is applicable only when some constraints are satisfied by the objects, the properties, and the property access sites. In this work, we propose enhancements to improve two common usage patterns: prototype accesses, object extensions, and megamorphic accesses. We have implemented these in the Hopc AOT JavaScript compiler and we have measured their impact. We observe that they effectively complement traditional caches. They reduce cache misses and consequently accelerate execution. Moreover, they do not cause a slowdown in the handling of the other usage patterns.
[28]Serrano, M. -- JavaScript AOT Compilation -- 14th Dynamic Language Symposium (DLS), Boston, USA, Nov, 2018.
[ pdf ]
Static compilation, a.k.a., ahead-of-time (AOT) compilation, is an alternative approach to JIT compilation that can combine good speed and lightweight memory footprint, and that can accommodate read-only memory constraints that are imposed by some devices and some operating systems. Unfortunately the highly dynamic nature of JavaScript makes it hard to compile statically and all existing AOT compilers have either gave up on good performance or full language support. We have designed and implemented an AOT compiler that aims at satisfying both. It supports full unrestricted ECMAScript 5.1 plus many ECMAScript 2017 features and the majority of benchmarks are within 50% of the performance of one of the fastest JIT compilers.
[24]Colin Vidal, and G Berry, and Manuel Serrano, -- Hiphop.js: a language to orchestrate web applications -- Proceedings of the 33rd Annual ACM Symposium on Applied Computing, SAC 2018, Pau, France, April 09-13, 2018, 2018, pp. 2193--2195.
[ ]
[14]Zieli C., et al. -- Variable structure robot control systems: The -- Robotics and Autonomous Systems, 94(), Aug, 2017, pp. 226 - 244.
[ ]
Abstract This paper presents a method of designing variable structure control systems for robots. As the on-board robot computational resources are limited, but in some cases the demands imposed on the robot by the user are virtually limitless, the solution is to produce a variable structure system. The task dependent part has to be exchanged, however the task governs the activities of the robot. Thus not only exchange of some task-dependent modules is required, but also supervisory responsibilities have to be switched. Such control systems are necessary in the case of robot companions, where the owner of the robot may demand from it to provide many services.
[22]Serrano, M. and Prunet, V. -- A Glimpse of Hopjs -- 21th Sigplan Int'l Conference on Functional Programming (ICFP), Nara, Japan, Sep, 2016, pp. 188--200.
[ pdf ]
Hop.js is a multitier programming environment for JavaScript. It allows a single JavaScript program to describe the client-side and the server-side components of a web application. Its runtime environment ensures consistent executions of the application on the server and on the client.

This paper overviews the Hop.js design. It shows the JavaScript extensions that makes it possible to conceive web applications globally. It presents how Hop.js interacts with the outside world. It also briefly presents the Hop.js implementation. It presents the Hop.js web server implementation, the handling of server-side parallelism, and the JavaScript and HTML compilers.
[17]Serrano, M. -- The Computer Scientist Nightmare -- A List of Successes That Can Change the World, Lecture Notes on Computer Science, Apr, 2016, pp. 356--366.
[ pdf ]
This text relates the story of particularly shocking bug that occurred during the development of a Web application. The bug is first described. The battle to understand and fix it is then presented. This experimental report concludes with some questionings about the way we conceive programming languages and programming environments.
[1]Couillec, Y. and Serrano, M. -- Requesting Heterogeneous Data Sources with Array Comprehensions in Hop.js -- Proceedings of the Database Programming Language Conference (DBPL'15), Pittsburgh, USA, Oct, 2015.
[ pdf ]
During the past few years the volume of accumulated data has increased dramatically. New kinds of data stores have emerged as NoSQL family stores. Many modern applications now collect, analyze, and produce data from several heterogeneous sources. However implementing such applications is still difficult because of lack of appropriate tools and formalisms. We propose a solution to this problem in the context of the JavaScript programming language by extending array comprehensions. Our extension allows programmers to query data from usual stores, such as SQL databases, NoSQL databases, Semantic Web data repositories, Web pages, or even custom user defined data structures. The extension has been implemented in the Hop.js system. It is the subject of this paper.
[4]Grande, J. and Boudol, G. and Serrano, M. -- Jthread, a deadlock-free mutex library -- Proceedings of the 17th International Symposium on Principles and Practice of Declarative Programming (PPDP'15), Siena, Italy, Jul, 2015.
[ pdf ]
This article presents several independent optimizations of operations on monitors. They do not involve the low-level mutual exclusion mechanisms but rather their integration with and usage within higher-level constructs of the language. The paper reports acceleration of Hop, the Web programming language for which these optimizations have been created. The paper shows that other languages such as C and Java would also benefit from these optimizations.
[7]Serrano, M. -- A Multitier Debugger for Web Applications -- Proceedings of the 10th WEBIST conference (WEBIST'14), Barcelona, Spain, Apr, 2014.
[ pdf | html ]
Debugging Web applications is difficult because of their distributed nature but also because of the programming languages and tools commonly used to develop them. Taking benefit of the multitier aspect of the Hop programming language, we have built a new debugger for Web applications that copes with the server-side and the client-side of the executions. Its advantage over most debuggers for the Web is that it reports the full stack trace containing all the server-side and client-side frames that have conducted to an error. An error is reported on its actual position on the source code, wherever it occurs on the server or on the client. To help detecting errors as early as possible, the Hop debugger is accompanied with a debugging execution mode where types are checked before data structures are accessed, argument numbers are verified before functions are called, and array bounds are checked before vectors are accessed. Combining the debugger and the debugging mode makes errors of Web applications easier to understand and easier to localize. Hopefully they also become easier to fix.
[55]Serrano, M. and Grande, J. -- Locking Fast -- Proceedings of the ACM Symposium on Applied Computing (SAC'14), Gyeongju, Korea, Mar, 2014.
[ pdf | html ]
This article presents several independent optimizations of operations on monitors. They do not involve the low-level mutual exclusion mechanisms but rather their integration with and usage within higher-level constructs of the language. The paper reports acceleration of Hop, the Web programming language for which these optimizations have been created. The paper shows that other languages such as C and Java would also benefit from these optimizations.
[26]Berry, G. and Serrano, M. -- Hop and HipHop : Multitier Web Orchestration -- Proceedings of the ICDCIT 2014 conference, Feb, 2014, pp. 1--13.
[ pdf ]
Rich applications merge classical computing, client-server concurrency, web-based interfaces, and the complex time- and event-based reactive programming found in embedded systems. To handle them, we extend the Hop web programming platform by HipHop, a domain-specific language dedicated to event-based process orchestration. Borrowing the synchronous reactive model of Esterel, HipHop is based on synchronous concurrency and preemption primitives that are known to be key components for the modular design of complex reactive behaviors. HipHop departs from Esterel by its ability to handle the dynamicity of Web applications, thanks to the reflexivity of Hop. Using a music player example, we show how to modularly build a non-trivial Hop application using HipHop orchestration code.
[21]Serrano, M. and Berry, G. -- Multitier Programming in Hop - A first step toward programming 21st-century applications -- Communications of the ACM, 55(8), Aug, 2012, pp. 53--59.
[ ]
[37]Serrano, M. and Queinnec, C. -- A multi-tier semantics for Hop -- Higher Order and Symbolic Computation (HOSC), 23(4), 2012, pp. 409-431.
Hop is a multi-tier programming language where a single program specifies servers and clients behaviors altogether. Hop adheres to the standard web programming style where servers elaborate HTML pages containing JavaScript code. This JavaScript code responds locally to user's interactions but also (following the so-called Ajax style) requests services from remote servers. These services bring back new HTML fragments containing additional JavaScript code replacing or modifying the state of the client.This paper presents a continuation-based denotational semantics for a sequential subset of Hop. Though restricted to a single server and a single client, this semantics takes into account the nature of the web where the server elaborates some JavaScript code to be run in the client's browser. This new client-code dynamically requests services from the server which, again, elaborate new JavaScript code to be run in the client's browser.This semantics details the programming model advocated by Hop and provides a sound basis for future studies such as web continuations and concurrency.
[54]Robert Hirschfeld, and Shriram Krishnamurthi, and Jan Vitek, -- Foundations for Scripting Languages (Dagstuhl Seminar 12011) -- Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 2012.
[9]Boudol, G. et al. -- Reasoning about Web Applications: An Operational Semantics for HOP -- ACM Transactions on Programming Languages and Systems (TOPLAS), 34(2), New York, NY, USA, 2012.
[ pdf ]
[56]Berry, G. and Nicolas, C. and Serrano, M. -- HipHop: A Synchronous Reactive Extension for Hop -- Proceedings of the PLASTIC'11 workshop, Portland, USA, Oct, 2011.
[ pdf ]
HOP is a SCHEME-based language and system to build rich multi-tier web applications. We present HIPHOP, a new language layer within HOP dedicated to request and event orchestration. HIPHOP follows the synchronous reactive model of the Esterel and ReactiveC languages, originally developed for embedded systems programming. It is based on synchronous concurrency and preemption primitives, which are known to be key components for the modular design of complex temporal behaviors. Although the language is concurrent, the generated code is purely sequential and thread-free; HIPHOP is translated to HOP for the server side and to straight JavaScript for the client side. With a music playing example, we show how to modularly buid non-trivial orchestration code with HIPHOP,
[60]Serrano, M. -- HopTeX - Compiling HTML to LaTeX with CSS -- Online Proceedings of the Scheme'11 workshop, Portland, USA, Oct, 2011.
[ pdf | html ]
[23]Serpette, B. and Serrano, M. -- An Interpreter for Server-Side Hop -- Proceedings of the Dynamic Language symposium (DLS), Portland, USA, Oct, 2011.
[ pdf | html ]
HOP is a Scheme-based multi-tier programming language for the Web. The client-side of a program is compiled to JavaScript, while the server-side is executed by a mix of natively compiled code and interpreted code. At the time where HOP programs were basic scripts, the performance of the server-side interpreter was not a concern; an inefficient interpreter was acceptable. As HOP expanded, HOP programs got larger and more complex. A more efficient interpreter was necessary. This new interpreter is described in this paper. It is compact, its whole implementation counting no more than 2.5 KLOC. It is more than twice faster than the old interpreter and consumes less than a third of its memory. Although it cannot compete with static or JIT native compilers, our experimental results show that it is amongst the fastest interpreters for dynamic languages.
[20]Luo, Z. and Rezk, T. and Serrano, M. -- Automated Code Injection Prevention for Web Applications -- Proceedings of the first Conference on Theory of Security and Applications (TOSCA'11), Lecture Notes on Computer Science, Saarbrücken, Germany, Apr, 2011, pp. 186--204.
[ pdf ]
[63]Serrano, M. -- HSS: a Compiler for Cascading Style Sheets -- 12th Sigplan Int'l Conference on Principles and Practice of Declarative Programming (PPDP), Hagenberg, Austria, Jul, 2010.
[ pdf ]
This article presents HSS, a compiler for CSS. It is first argued that generating CSS improves portability and maintainability of CSS files. This claim is supported by realistic examples. Then, the HSS compilation algorithm is presented. It is simple enough to be easily adapted to most web development kits. HSS can be used as a stand-alone HSS-to-CSS compiler in the goal of enriching CSS with user defined variables, functions, and element types. It can also be used with the Hop web development kit in which case, working hand in hand with the Hop programming language, it can be used to implement skinning or theming of web applications.
[62]Boudol, G. et al. -- Towards Reasoning for Web Applications: an Operational Semantics for Hop -- Proceedings of the first Workshop on Analysis and Programming Languages for Web Applications and Cloud Applications (APLWACA'10), Toronto, Canada, Jun, 2010.
[ pdf ]
We propose a small-step operational semantics to support reasoning about web applications written in the multi-tier language Hop. The semantics covers both server side and client side computations, as well as their interactions, and includes creation of web services, distributed client-server communications, concurrent evaluation of service requests at server side, elaboration of HTML documents, DOM operations, evaluation of script nodes in HTML documents and actions from HTML pages at client side.
[65]Serrano, M. and Queinnec, C. -- HTML5 Video portable avec Hop -- Jan, 2010.
[8]Serrano, M. -- HOP, a Fast Server for the Diffuse Web -- proceedings of the 11th international conference on Coordination Models and Languages (COORDINATION'09) (invited paper), Lisbon, Portugal, Jun, 2009.
[ pdf ]
The diffuse Web is an alternative way of using the Web 2.0 infrastructure for building personal diffuse applications. Systems that let users tune the temperature of their house with a cell-phone, check that the shutters are closed with a PDA, or select the music to be played on a Hi-Fi system with a PC are examples of the targeted applications.Diffuse Web applications have similarities with Web 2.0 applications: they rely on fast bi-directional interactions between servers and clients, and they make extensive use of non-cachable dynamic contents. On the other hand, diffuse applications have also an important difference with respect to traditional Web applications: they generally do not need to deal with a huge number of simultaneous users. That is, diffuse Web applications are built on top of standard technologies but they use it differently. Therefore they demand different optimizations and tunings.HOP ( is a platform designed for building and running diffuse Web applications. Its software development kit contains two compilers, one interpreter, and a bootstrapped Web server. That is, the HOP Web server is implemented in HOP. This paper shows that this implementation strategy allows HOP to dramatically outperform the popular mainstream Web servers for delivering dynamic contents. Contrary to most servers, HOP delivers static and dynamic contents at a comparable pace. The paper details the implementation of the HOP Web server.
[39]Serrano, M. -- Anatomy of a Ubiquitous Media Center -- Proceedings of the Sixteenth Annual Multimedia Computing and Networking (MMCN'09), San Jose, CA, USA, Jan, 2009.
[ pdf ]
The Web is such a rich architecture that it is giving birth to new applications that were unconceivable only few years ago in the past. Developing these applications being different from developing traditional applications, generalist programming languages are not well suited. To help face this problem, we have conceived the HOP programming language whose syntax and semantics are specially crafted for programming Web applications. In order to demonstrate that HOP, and its SDK, can be used for implementing realistic applications, we have started to develop new innovative applications that extensively rely on the infrastructure offered by the Web and that use features unique to HOP. We have initiated this effort with a focus on multimedia applications.

Using HOP we have implemented a distributed audio system. It supports a flexible architecture that allows new devices to catch up with the application any time: a cell phone can be used to pump up the volume, a PDA can be used to browse over the available musical resources, a laptop can be used to select the output speakers, etc. This application is intrinsically complex to program because, i- it is distributed (several different devices access and control shared resources such a music repositories and sound card controllers), ii- it is dynamic (new devices may join or quit the application at any time), and iii- it involves different heterogeneous devices with different hardware architectures and different capabilities.
[32]Serrano, M. and Queinnec, C. -- Une galerie de photos sur le Web avec HOP -- Feb, 2008.
[ ]
[33]Serrano, M. and Queinnec, C. -- Hop, un langage de programmation pour le Web -- Jan, 2008.
[ ]
[59]Loitsch, F. and Serrano, M. -- Trends in Functional Programming, ch. Hop Client-Side Compilation -- Seton Hall University, Intellect Bristol, UK/Chicago, USA, 2008, pp. 141--158.
[45]Serrano, M. and Gallesio, E. -- An Adaptive Package Management System for Scheme -- Proceedings of the Second Dynamic Languages Symposium (DLS), Montréal, Québec, Canada, Oct, 2007.
[ html ]
This paper presents a package management system for the Scheme programming language. It is inspired by the Comprehensive Perl Archive Network (Cpan) and various GNU/Linux distributions. It downloads, installs, and prepares source codes for execution. It manages the dependencies between packages. The main characteristic of this system is its neutrality with respect to the various Scheme implementations. It is neutral with respect to the language extensions that each Scheme implementation proposes and with respect to the execution environment of these implementations. This allows the programmer to blend, within the same program, independent components which have been developed and tested within different Scheme implementations. ScmPkg is available at:
[2]Serrano, M. -- Programming Web Multimedia Applications with Hop -- Proceedings of the ACM Sigmm and ACM Siggraph conference on Multimedia, Best Open Source Software, Augsburg, Germany, Sep, 2007.
[ pdf ]
Hop is a new execution platform for running interactive and multimedia applications on the Web. It is aimed at executing applications such as Web agendas, Web galleries, Web music players, etc. Hop consists of: i) a new programming language specially designed for addressing the distributed aspects of Web programming, ii) a rich set of libraries for dealing with music files, sounds, pictures, photographs, etc., iii) a full-fledged Web server for executing the server-side components of the applications.

In this paper we illustrate Hop's skills for programming multimedia applications in two examples. We show that, with 50 lines of code, an operational photograph gallery can be implemented and we show that with approximatively 30 lines of code an operational podcast receiver can be built.

[53]Serrano, M. -- The HOP platform -- proceedings of the International Lisp Conference'07 (invited presentation), Cambridge, UK, Jun, 2007.
[61]Loitsch, F. and Serrano, M. -- Hop Client-Side Compilation -- Proceedings of the 8th Symposium on Trends on Functional Languages, New York, USA, Apr, 2007.
[ | pdf ]
HOP is a new language for programming interactive Web applications. It aims to replace HTML, JavaScript, and server-side scripting languages (such as PHP, JSP, ...) with a unique language that unites client-side interactions and server-side computations. A HOP execution platform is made of two compilers. One that compiles the code executed by the server, and one that compiles the code executed by the client. T his paper presents the latter. In order to ensure compatibility of HOP graphical user interfaces with popular plain Web browsers, the client-side HOP compiler has to generate regular HTML and JavaScript code. Since the HOP language is built on top of the Scheme programming language, compiling HOP to JavaScript is nearly equivalent to compiling Scheme to JavaScript. The compiler we have designed supports the whole Scheme core language. In particular it optimizes tail-recursive calls. We show in this paper that this compiler is efficient because with optimizations for obvious tail recursive calls the generated code runs roughly at the same speed as equivalent hand-written JavaScript code. With support for all tail calls the generated code typically runs at most 2.1 times slower than without. The techniques presented in this paper can be applied to most strict functional languages such as ML and Lisp.
[6]Serrano, M. and Gallesio, E. and Loitsch, F. -- HOP, a language for programming the Web 2.0 -- Proceedings of the First Dynamic Languages Symposium (DLS), Portland, Oregon, USA, Oct, 2006.
[ pdf | html ]
Hop is a new higher-order language designed for programming interactive web applications such as web agendas, web galleries, music players, etc. It exposes a programming model based on two computation levels. The first one is in charge of executing the logic of an application while the second one is in charge of executing the graphical user interface. Hop separates the logic and the graphical user interface but it packages them together and it supports strong collaboration between the two engines. The two execution flows communicate through function calls and event loops. Both ends can initiate communications. The paper presents the main constructions of Hop. It sketches its implementation and it presents an example of a simple web application written in Hop.
[41]Serrano, M. -- The HOP Development Kit -- proceedings of the Seventh ACM sigplan Workshop on Scheme and Functional Programming (invited paper), Portland, Oregon, USA, Sep, 2006.
[ pdf | html ]
Hop, is a language dedicated to programming reactive and dynamic applications on the web. It is meant for programming applications such as web agendas, web galleries, web mail clients, etc. While a previous paper (Hop, a Language for Programming the Web 2.0, available at focused on the linguistic novelties brought by Hop, the present one focuses on its execution environment. That is, it presents Hop's user libraries, its extensions to the HTML-based standards, and its execution platform, the Hop web broker.
[44]Gallesio, E. and Serrano, M. -- Ubiquitous Mail -- Proceedings of the Sixth ACM sigplan Workshop on Scheme and Functional Programming, Tallinn, Estonia, Sep, 2005, pp. 69--76.
[ html ]
Bimap is a tool for synchronizing IMAP servers. It enables two or more IMAP mirrored servers to be modified independently and later on, synchronized. Bimap is versatile so, in addition to synchronizing emails, it can be used for filtering and classifying emails. For the sake of the example, the paper shows automatic emails classification and white-listing programmed with Bimap.

Bimap is implemented in Scheme. The most important parts of its implementation are presented in this paper with the intended goal to demonstrate that Scheme is suited for programming tasks that are usually devoted to scripting languages such as Perl or Python. With additional libraries, Scheme enables compact and efficient implementation of this distributed networked application because the main computations that require efficiency are executed in compiled code and only the user configurations are executed in interpreted code.
[49]Gallesio, E. and Serrano, M. -- Skribe: a Functional Authoring Language -- Journal of Functional Programming, 2005.
[ html ]
Skribe is a functional programming language designed for authoring documents, such as web pages or technical reports. It is built on top of the Scheme programming language. Its concrete syntax is simple and it looks familiar to anyone used to markup languages. Authoring a document with Skribe is as simple as with HTML or LaTeX. Because of the conciseness of its original syntax, it is even possible to use it without noticing that it is a programming language. In Skribe, the ratio "markup/text" is smaller than with the other markup systems we have tested.
[52]Bres, Y. and Serpette, B. and Serrano, M. -- Bigloo.NET: compiling Scheme to .NET CLR -- Journal of Object Technology, 3(9), Oct, 2004.
[ html | issue_2004_09 ]
This paper presents the compilation of the Scheme programming language to .NET. This platform provides a virtual machine, the Common Language Runtime (CLR), that executes bytecode, the Common Intermediate Language (CIL). Since CIL was designed with language agnosticism in mind, it provides a rich set of language constructs and functionalities. As such, the CLR is the first execution environment that offers type safety, managed memory, tail recursion support and several flavors of pointers to functions. Therefore, the CLR presents an interesting ground for functional language implementations.

We discuss how to map Scheme constructs to CIL. We present performance analyses on a large set of real-life and standard Scheme benchmarks. In particular, we compare the speed of these programs when compiled to C, JVM and .NET. We show that in term of speed performance of the Mono implementation of .NET, the best implementing running on both Windows and Linux, still lags behind C and fast JVMs such as the Sun's implementations.
[16]Serrano, M. and Boussinot, F. and Serpette, B. -- Scheme Fair Threads -- 6th Sigplan Int'l Conference on Principles and Practice of Declarative Programming (PPDP), Verona, Italy, Aug, 2004, pp. 203--214.
[ html ]
This paper presents Fair Threads, a new model for concurrent programming. This multi-threading model combines preemptive and cooperative scheduling. User threads execute according to a cooperative strategy. Service threads execute according to a preemptive strategy. User threads may ask services from service threads in order to improve performance by exploiting hardware parallelism and in order to execute non-blocking operations.

Fair threads are experimented within the context of the functional programming language Scheme. This paper also presents the integration in this language. That is, it presents a semantics for Scheme augmented with Fair Threads and the main characteristics of the implementation.
[3]Bres, Y. and Serpette, B. and Serrano, M. -- Compiling Scheme programs to .NET Common Intermediate Language -- 2nd International Workshop on .NET Technologies, Plzen, Czech Republic, May, 2004.
[ pdf ]
We present in this paper the compilation of the Scheme programming language to .Net platform. .Net provides a virtual machine, the Common Language Runtime (CLR), that executes bytecode, the Common Intermediate Language (CIL). Since CIL was designed with language agnosticism in mind, it provides a rich set of language constructs and functionalities. Therefore, the CLR is the first execution environment that offers type safety, managed memory, tail recursion support and several flavors of pointers to functions. As such, the CLR presents an interesting ground for functional language implementations.

We discuss how to map Scheme constructs to CIL. We present performance analyses on a large set of real-life and standard Scheme benchmarks. In particular, we compare the performances of Scheme programs when compiled to C, JVM and .Net. We show that .Net still lags behind C and JVM.
[58]Ciabrini, D. and Serrano, M. -- Bugloo: A Source Level Debugger for Scheme Programs Compiled into JVM Bytecode -- 3th International Lisp Conference, New York, USA, Oct, 2003.
[ ]
[50]Gallesio, E. and Serrano, M. -- Programming Graphical User Interfaces with Scheme -- Journal of Functional Programming, 13(5), Sep, 2003, pp. 839--886.
[ ps.gz ]
This paper presents Biglook, a widget library for an extended version of the Scheme programming language. It uses classes of a Clos-like object layer to represent widgets and Scheme closures to handle graphical events. Combining functional and object-oriented programming styles yields an original application programming interface that advocates a strict separation between the implementation of the graphical interfaces and the user-associated commands, enabling compact source code.

The Biglook implementation separates the Scheme programming interface and the native back-end. This permits different ports for Biglook. The current version uses GTK and Swing graphical toolkits, while the previous release used Tk.
[36]Serrano, M. -- Langage C++, ch. Techniques de l'ingénieur, 249, rue de Crimée, 75925 Paris, Cedex 19, France, 2003.
[ ]
[25]Serpette, B. and Serrano, M. -- Compiling Scheme to JVM bytecode: a performance study -- 7th Sigplan Int'l Conference on Functional Programming (ICFP), Pittsburgh, Pensylvanie, USA, Oct, 2002.
[ ps.gz ]
We have added a Java virtual machine (henceforth JVM) bytecode generator to the optimizing Scheme-to-C compiler Bigloo. We named this new compiler BiglooJVM. We have used this new compiler to evaluate how suitable the JVM bytecode is as a target for compiling strict functional languages such as Scheme. In this paper, we focus on the performance issue. We have measured the execution time of many Scheme programs when compiled to C and when compiled to JVM. We found that for each benchmark, at least one of our hardware platforms ran the BiglooJVM version in less than twice the time taken by the Bigloo version. In order to deliver fast programs the generated JVM bytecode must be carefully crafted in order to benefit from the speedup of just-in-time compilers.
[71]Serrano, M. and Boussinot, F. and Serpette, B. -- Scheme FairThreads -- 2th International Lisp Conference (invited paper), San Francisco, CA, USA, Oct, 2002.
[27]Serrano, M. and Gallesio, E. -- This is Scribe! -- 3th ACM sigplan Workshop on Scheme and Functional Programming, Pittsburgh, Pennsylvania, USA, Jun, 2002.
[ ps.gz | html ]
This paper presents Scribe, a functional programming language for authoring documents. Even if it is a general purpose tool, it best suits the writing of technical documents such as web pages or technical reports, API documentations, etc. Executing Scribe programs can produce documents of various formats such as PostScript, PDF, HTML, Texinfo or Unix man pages. That is, the very same program can be used to produce documents in different formats. Scribe is a full featured programming language but it looks like a markup language à la HTML.
[64]Gallesio, E. and Serrano, M. -- Biglook: a Widget Library for the Scheme Programming Language -- 2002 Usenix annual technical conference, Freenix track, Monterey, Californie, USA, Jun, 2002, pp. 85--97.
[ ps.gz ]
[57]Manuel Serrano (Editor), -- Proceedings of Scheme 2001 -- I3S/RT--2001-12--FR, I3S-CNRS/Univ. of Nice--Sophia Antipolis, Sep, 2001.
[ ]
[18]Serrano, M. and Boehm, H. -- Understanding Memory Allocation of Scheme Programs -- 5th Sigplan Int'l Conference on Functional Programming (ICFP), Montréal, Québec, Canada, Sep, 2000, pp. 245--256.
[ ps.gz ]
Memory is the performance bottleneck of modern architectures. Keeping memory consumption as low as possible enables fast and unobtrusive applications. But it is not easy to estimate the memory use of programs implemented in functional languages, due to both the complex translations of some high level constructs, and the use of automatic memory managers.

To help understand memory allocation behavior of Scheme programs, we have designed two complementary tools. The first one reports on frequency of allocation, heap configurations and on memory reclamation. The second tracks down memory leaks. We have applied these tools to our Scheme compiler, the largest Scheme program we have been developing. This has allowed us to drastically reduce the amount of memory consumed during its bootstrap process, without requiring much development time.

Development tools will be neglected unless they are both conveniently accessible and easy to use. In order to avoid this pitfall, we have carefully designed the user interface of these two tools. Their integration into a real programming environment for Scheme is detailed in the paper.
[34]Serrano, M. -- Vers une programmation fonctionnelle praticable -- Habilitation à diriger des recherches, Université de Nice Sophia-Antipolis, Route des Colles, B.P. 145 -- F-06903 Sophia-Antipolis, CEDEX, Sep, 2000.
[ ps.gz ]
La production de logiciels informatiques ne se résume pas à la réalisation de « gros » programmes nécessitant des années d'effort fournies par des équipes imposantes. Bien souvent, on a besoin de petits programmes, dont la durée de vie est assez courte et qui sont écrits par une ou deux personnes. La course incessante à l'innovation des entreprises informatiques les contraint fréquemment à renoncer aux techniques de génie logiciel pour opter pour des techniques légères favorisant un développement court et souple.

Pour favoriser ce type de réalisations nous avons conçu un environnement de programmation qui repose sur un langage particulièrement concis et sur quelques outils permettant un développement rapide d'applications réalistes (un compilateur optimisant, des outils de mise au point, de navigation, etc.).

Le choix du langage de programmation pour un tel projet est primordial car c'est le langage qui façonne le système. Au risque de paraître hérétique, nous avons choisi Scheme, un langage fonctionnel, parce que cette famille de langages permet une écriture d'une concision presque sans égal.

Scheme est un petit langage. C'est parfois un atout (par exemple pour l'enseignement) mais c'est aussi souvent un handicap. Nous avons donc dû lui adjoindre de nombreuses extensions. Nous en présenterons deux au cours de cette soutenance: un langage de module et une couche objet. Nous nous efforcerons de montrer les liens reliant ces deux constructions et nous montrerons l'exploitation que nous avons faite de certaines caractéristiques de Scheme (comme, par exemple, le typage dynamique) pour augmenter encore l'expressivité de ce langage.

Scheme est connu pour être difficile à implanter (parce que sa concision repose sur un haut niveau d'abstraction sémantique): c'est pourquoi nous avons consacré une grande partie de nos recherches à la compilation de ce langage. Nous présentons quelques uns de ces travaux dans le mémoire. Notre compilateur Scheme occupe une place privilégiée dans notre environnement car c'est lui qui permet la production d'applications efficaces. Toutefois, il arrive que les programmes doivent être travaillés afin que leur performances soient améliorées. Sur les architectures récentes c'est souvent une mauvaise utilisation de la mémoire (allocation, récupération) qui est la cause de performances moyennes. Lorsque le compilateur seul ne parvient pas à optimiser les programmes sources, les utilisateurs de notre environnement peuvent avoir recours à deux outils permettant l'étude de la gestion de la mémoire dans leurs applications.
[51]Serrano, M. -- Bee: an Integrated Development Environment for the Scheme Programming Language -- Journal of Functional Programming, 10(2), May, 2000, pp. 1--43.
[ ps.gz ]
The Bee is an integrated development environment for the Scheme programming language. It provides the user with a connection between Scheme and the C programming language, a symbolic debugger, a profiler, an interpreter, an optimizing compiler that delivers stand alone executables, a source file browser, a project manager, user libraries and online documentation. This article details the facilities of the Bee, its user interface and presents an overview of the implementation of its main components.
[15]Serrano, M. -- Wide classes -- European Conference on Object-Oriented Programming (13th ECOOP), Lisbon, Portugal, Jun, 1999, pp. 391--415.
[ ps.gz ]
This paper introduces the concepts of wide classes and widening as extensions to the object model of class-based languages such as Java and Smalltalk. Widening allows an object to be temporarily widened, that is transformed into an instance of a subclass, a wide class, and, later on, to be shrunk, that is reshaped to its original class. Wide classes share the main properties of plain classes: they have a name, a superclass, they may be instantiated, they have an associated class predicate and an associated type that may be used to override function definitions.

Widening is also useful to implement transient data storage for long-lasting computations. In particular, it helps reducing software data retention. This phenomenon arises when the actual data structures used in a program fail to reflect time-dependent properties of values and can cause excessive memory consumption during the execution.

Wide classes may be implemented for any dynamically-typed class-based programming language with very few modifications to the existing runtime system. We describe the simple and efficient implementation strategy used in the Bigloo runtime system.
[11]Moreau, L. et al. -- Recueil de petits problèmes en Scheme -- Springer-Verlag, 1999.
[ ]
Scheme est l'un des langages les plus utilisés pour l'initiation à la programmation. Simple et régulier tant dans sa syntaxe que dans sa sémantique, Scheme permet de dépasser l'incommodité du point-virgule pour se concentrer, sans interférence nocive, sur le seul processus calculatoire. Si d'excellents ouvrages d'introduction à Scheme existent en français et en anglais, il manquait un livre d'exercices permettant de faire ses gammes en ce langage. Cet ouvrage comporte près de trois cents exercices, classés par thèmes, suivant une progression régulière et illustrant de nombreuses techniques de programmation. Ils procurent un entrainement intensif à la récursion comme principe fondamental de raisonnement et de résolution de problèmes.
[47]Serrano, M. -- C avancé (160 pages) -- 1998--2001.
[46]Serrano, M. -- Compilation: génération de code (230 pages plus un compilateur prototype) -- 1998--2001.
[40]Serrano, M. -- Inline expansion: when and how -- 9th Int'l Symposium on Programming Language Implementation and Logic Programming (PLILP), Southampton, UK, Sep, 1997, pp. 143--147.
[ ps.gz ]
Inline function expansion is an optimization that may improve program performance by removing calling sequences and enlarging the scope of other optimizations. Unfortunately it also has the drawback of enlarging programs. This might impair executable programs performance. In order to get rid of this annoying effect, we present, an easy to implement, inlining optimization that minimizes code size growth by combining a compile-time algorithm deciding when expansion should occur with different expansion frameworks describing how they should be performed. We present the experimental measures that have driven the design of inline function expansion. We conclude with measurements showing that our optimization succeeds in producing faster codes while avoiding code size increase.
[19]Vitek, J. and Serrano, M. and Thanos, D. -- Mobile Object Systems: Towards the Programmable Internet, ch. Security and Communication in Mobile Object Systems -- Springer Verlag, Heidelberg, Apr, 1997, pp. 177-200.
[ ps.gz ]
The rapid growth of computer networks has created an opportunity for developing massively distributed computer systems. Such systems will likely consist of loose communities of heterogeneous machines running different operating systems with different security policies. The challenge is to design a reliable, and yet efficient, infrastructure trustworthy enough for electronic commerce and flexible enough to allow software upgrades as well as new functionality to propagate in a decentralized, inherently insecure, wide area network. Mobile object systems embody a paradigm where computations, i.e. running programs, may move across the network and carry out truly distributed computations. The vision is that computations structured as autonomous systems of objects will roam the network performing complex tasks on the behalf of their human owner. These mobile systems of objects carry their data as well as their code with them during their journey, thus allowing almost unlimited extendability. Such unfettered mobility raises justified security concerns. From the host's stand point first. Can an arbitrary code fragment be entrusted with local resources? To what degree is it possible to control the behaviour of downloaded code? How can secrecy and integrity be preserved? From the sender's stand point next. Is it possible to entrust the network with mobile computations that encode valuable knowledge and are empowered to carry out commercial transactions? Even though it is technically feasible to charge foreign computations for small service such as execution time or storage. The key question whether there is a way to achieve a sufficient level of security for this approach to be viable? Currently, we must answer by the negative. None of the existing mobile computation systems meet the security requirements of electronic commerce. Lack of security fosters a just say no attitude towards mobile computations in portions of the scientific and business community. The proverbial ball is now in the camp of mobile computations research. It is up to us to demonstrate that mobile objects may meet the stringent security criteria of real world applications.

The main contribution of this chapter is the study of security threats inherent to communication in mobile object systems. We will study how mobile object systems communicate. Describe the dangers of traditional communication mechanisms and outline two research directions currently being investigated.
[66]Serrano, M. and Feeley, M. -- Storage Use Analysis and its Applications -- 1fst Sigplan Int'l Conference on Functional Programming (ICFP), Philadelphia, Penn, USA, May, 1996, pp. 50--61.
[ ps.gz ]
In this paper we present a new program analysis method which we call Storage Use Analysis. This analysis deduces how objects are used by the program and allows the optimization of their allocation. This analysis can be applied to both statically typed languages (e.g. ML) and latently typed languages (e.g. Scheme). It handles side-effects, higher order functions, separate compilation and does not require CPS transformation. We show the application of our analysis to two important optimizations: stack allocation and unboxing. The first optimization replaces some heap allocations by stack allocations for user and system data storage (e.g. lists, vectors, procedures). The second optimization avoids boxing some objects. This analysis and associated optimizations have been implemented in the Bigloo Scheme/ML compiler. Experimental results show that for many allocation intensive programs we get a significant speedup. In particular, numerically intensive programs are almost 20 times faster because floating point numbers are unboxed and no longer heap allocated.
[67]Dubé, D. and Feeley, M. and Serrano, M. -- Un GC temps réel semi-compactant -- Montréal, Canada, Jan, 1996.
[ ps.gz ]
[38]P. H. Hartel, et al. -- Pseudoknot: a Float-Intensive Benchmark for Functional Compilers -- Journal of Functional Programming, Juillet1996, pp. 621--655.
[ ps.gz ]
Over 25 implementations of different functional languages are benchmarked using the same program, a floating-point intensive application taken from molecular biology. The principal aspects studied are compile time and execution time for the various implementations that were benchmarked. An important consideration is how the program can be modified and tuned to obtain maximal performance on each language implementation.

With few exceptions, the compilers take a significant amount of time to compile this program, though most compilers were faster than the then current GNU C compiler (GCC version 2.5.8). Compilers that generate C or Lisp are often slower than those that generate native code directly: the cost of compiling the intermediate form is normally a large fraction of the total compilation time.

There is no clear distinction between the runtime performance of eager and lazy implementations when appropriate annotations are used: lazy implementations have clearly come of age when it comes to implementing largely strict applications, such as the Pseudoknot program. The speed of C can be approached by some implementations, but to achieve this performance, special measures such as strictness annotations are required by non-strict implementations.

The benchmark results have to be interpreted with care. Firstly, a benchmark based on a single program cannot cover a wide spectrum of `typical' applications. Secondly, the compilers vary in the kind and level of optimisations offered, so the effort required to obtain an optimal version of the program is similarly varied.
[12]Serrano, M. -- A Fresh Look to Inlining Decision -- 4th International Computer Symposium (invited paper), Mexico city, Mexico, Nov, 1995, pp. 40--52.
[ ps.gz ]
Included in a compiler for functional or object oriented languages, inline function expansion has been reported as one of the most valuable optimizations. Unfortunately, it has an important counterpart: since it duplicates function body, it enlarges the code of the compiled programs as well as the resulting object code. The main contribution of this paper is to present a simple compile time inlining decision algorithm where the code length increasing factor is a constant that can be tuned by the compiler designer and where execution improvements are comparable with other previous sophisticated technics. Our major concern is about functional languages. With these languages, recursive functions are widely used: the second contribution of this paper is the presentation of an original ad hoc inlining framework for recursive functions which is more accurate than function unfolding. Experimental results demonstrate that our inlining technics succeed in producing small and efficient compiled object codes.
[31]Serrano, M. and Weis, P. -- Bigloo: a portable and optimizing compiler for strict functional languages -- 2nd Static Analysis Symposium (SAS), Lecture Notes on Computer Science, Glasgow, Scotland, Sep, 1995, pp. 366--381.
[ ps.gz ]
We present Bigloo, a highly portable and optimizing compiler. Bigloo is the first compiler for strict functional languages that can efficiently compile several languages: Bigloo is the first compiler for full Scheme and full ML, and for these two languages, Bigloo is one of the most efficient compiler now available (Bigloo is available by anonymous ftp at

This high level of performance is achieved by numerous high-level optimizations. Some of those are classical optimizations adapted to higher-order functional languages (e.g. inlining), other optimization schemes are specific to Bigloo (e.g. a new refined closure analysis, an original optimization of imperative variables, and intensive use of higher-order control flow analysis). All these optimizations share the same design guideline: the reduction of heap allocation.
[48]Serrano, M. -- Control Flow Analysis: a Functional Languages Compilation Paradigm -- 10th ACM Symposium on Applied Computing (SAC), Nashville, Tennessee, USA, Feb, 1995, pp. 118-122.
Control flow analysis (cfa) is now well known but is not widely used in real compilers since optimizations that can be achieved via cfa are not so clear. This paper aims at showing that control flow analysis is very valuable in practice by presenting a fundamental optimization based on cfa: the closure representation algorithm, the essential optimizing phase of a lambda-language compiler. Since naïve and regular scheme to represent functions as heap allocated structures is far too inefficient, the main effort of modern functional languages compilers is devoted to minimize the amount of memory allocated for functions. In particular, compilers try to discover when a procedure can safely be handled without any allocation at all. Previously described methods to do so are ad hoc, depending on the language compiled, and not very precise. Using cfa, we present a general approach which produces better results. This refined closure analysis subsumes previously known ones and optimizes more than 80 % of closure on the average. We also present another analysis based on cfa which is useful for dynamically typed languages: the type investigation algorithm. Modifying Shivers' cfa, we realized a type inference algorithm that eliminates more than 60 % of dynamic type tests. These two optimizations are fully integrated into a real compiler, so that we can report reliable measures obtained for real world programs. Time figures show that analyses based on cfa can be very efficient: when the compiler uses the improved closure allocation scheme and the type investigation algorithm, the resulting executable programs run more than two time faster.
[13]Serrano, M. -- Bigloo user's manual -- 0169, Inria-Rocquencourt, France, Dec, 1994.
[ ]
[35]Serrano, M. -- Vers une compilation portable et performante des langages fonctionnels -- Thèse de doctorat d'université, Université Pierre et Marie Curie (Paris 6), Paris, Dec, 1994.
[ ps.gz ]
Cette thèse est consacrée à la compilation portable et performante des langages fonctionnels modernes tels que Scheme et ML. Pour obtenir la portabilité, nous avons opté pour un schéma de compilation qui utilise C comme langage d'assemblage. Le choix de ce langage cible interdit l'utilisation de certaines des techniques traditionnellement efficaces. Nous avons comblé cet handicap en multipliant les analyses et les optimisations de haut niveau. Les travaux présentés dans ce document ont donné lieu à la réalisation d'un compilateur très performant : Bigloo. Distribué depuis plus d'un an sur ftp anonyme, il est maintenant largement utilisé. Toutes les optimisations présentées dans ce document y sont implantées. Nous avons donc pu mesurer l'impact de chacune d'entre elles. Nous présentons en conclusion de cette thèse des mesures de performances qui nous permettent d'affirmer que Bigloo est, actuellement, le compilateur Scheme le plus rapide. En plus de sa rapidité, notre compilateur est extensible à deux niveaux :

• au niveau du langage source : il est possible d'insérer des passes supplémentaires dans le processus de compilation. Plusieurs extensions ont déjà été réalisées. Bigloo est capable, à ce jour, de compiler, en plus de Scheme, Camllight ou Meroon (la couche objet de Scheme conçue par C. Queinnec).

• au niveau des langages externes : Bigloo possède une interface qui permet au programmeur d'avoir accès à un langage externe depuis Scheme (ou ML). Grâce à elle, plusieurs langages peuvent être mélangés pour produire des applications autonomes.

L'utilisation conjointe de nos deux niveaux d'extensibilité nous a permis, à titre d'expérience, de réaliser des programmes exécutables mélangeant Scheme, Camllight et C.
[43]Serrano, M. -- Using Higher Order Control Flow Analysis When Compiling Functional Languages -- 6th International Symposium on Programming Language Implementation and Logic Programming (PLILP), Lecture Notes on Computer Science, (844), Madrid, Spain, Sep, 1994, pp. 447--449.
[10]Hartel, P. et al. -- Pseudoknot: a Float-Intensive Benchmark for Functional Compilers (DRAFT) -- Implementation of Functional Languages, Sep, 1994, pp. 13.1--13.34.
[68]Serrano, M. and Weis, P. -- 1+1 =1: an optimizing Caml compiler -- 2nd ACM Sigplan Workshop on ML and its Applications, Orlando (Florida, USA), 1994, pp. 101--111.
We present a new Caml compiler, which was obtained by an original approach: a simple pipeline between two existing compilers, each one devoted to half of the compilation process. The first compiler is a Caml compiler, it is in charge of the front end, and ensures compatibility. The second compiler is an optimizing Scheme compiler, it constitutes the back end, and ensures efficiency. These are camlc 0.6 byte-code compiler and a Scheme compiler (Bigloo). Using this technology, we were able to write the optimizing compiler in only two man-months. The new compiler is bootstrapped, fully compatible with the camlc compiler, and features interesting inter-module optimizations for curried functions. It produces efficient code, comparable with the one produced by other ML compilers (including SML/NJ). Our new compiler, Bigloo, is freely available at
[69]Serrano, M. -- De l'utilisation des analyses de flot de contrôle dans la compilation des langages fonctionnels -- Cnrs, 1993.
[70]Serrano, M. -- Rgc: un générateur d'analyseurs lexicaux efficaces en Scheme -- Feb, 1992, pp. 235--252.
[ ps.gz ]
Cet article présente Rgc, un générateur d'analyseurs lexicaux rapides, développé pour Scheme. Nous ne décrivons pas ici une maquette mais un produit final efficace. Par ses performances, il est en concurrence directe avec le logiciel Flex. Après mesures, il apparaît que Rgc est entre 5 et 10 % plus rapide que Flex et entre 250 et 260 % plus rapide que Lex. Pour obtenir ce niveau de performance, nous avons réalisé un compilateur spécialisé restreint Scheme->C. De plus, puisque Scheme ne possède pas de primitives rapides de lecture il s'est avéré indispensable de programmer les requêtes systèmes et la gestion des tampons en C. Le code est donc composé de 90 % de Scheme et 10 % de C.

This Html page has been produced by Skribe.
Last update Wed May 27 09:45:01 2020.