One VM to rule them all
Thomas Wuerthinger and Doug Simon
July 3rd, 10:45
Current production VMs are designed to target one main language. While they can execute other languages, these are often second-class citizens and their execution performance lags. We present Truffle, a system that allows multiple languages to efficiently execute on top of the Java HotSpot VM. The effort to add new languages is low as it requires only implementing an AST interpreter.
We use the Graal compiler to automatically derive compiled code from the interpreter definitions via partial evaluation. We will show how to add a new guest language and how researchers can experiment with our platform.
The Truffle API is publicly available as part of the Graal OpenJDK project.
Project URL: http://openjdk.java.net/projects/graal/ Contact: Thomas Wuerthinger
From PCs to tablets: Programming the Diffuse Web.
Manuel Serrano
July 4th, 16:15
Personal computing has been radically changed by smartphones and tablets. Within a few years, these new devices have become as numerous as personal computers. They have also almost bridged the performance gap. A modern smartphone is equipped with a hardware that can compete the traditional laptop on many aspects.
Since we permanently carry our phones with us. Since they are always connected to a network and since they are equipped with a vast set of sensors, they allow us to implement new applications that were inconceivable a few years back in the past: the diffuse applications.
However, programming diffuse applications is difficult because it combines all the hardest points of the traditional programming to which it brings new problems of its own. In this course, we will present a new programming language called Hop, specially designed for addressing these problems. We will present the language, its constructs, its semantics, and how to program realistic diffuse applications.
Project URL: http://hop.inria.fr Contact: Manuel Serrano
Reusable and Evolvable DSLs in Neverlang
Walter Cazzola and Edoardo Vacchi
July 4th, 14:15
Domain-specific languages are routinely used every day for purposes such as querying databases, typesetting documents and describing web page contents. Embedding a DSL is often idiomatic to many modern programming languages. Several language workbenches permit to develop a custom DSL from the ground up, but developing a DSL is often, for the largest part, a matter of rearranging the same old concepts in a different way.
We show how to develop extensible DSLs using Neverlang, a JVM-based framework for language development that emphazises code reuse through composition of language features. We show how to implement each feature in a stand-alone module; that is, a separate, conceptually isolated and independent unit that can be compiled and distributed separately.
We demonstrate how Neverlang can be employed to generate compilers andinterpreters that can be extended or restricted at any time, without any further compilation steps.
Project URL: http://neverlang.di.unimi.it Contact: Walter Cazzola
The Smart Programming Assistant
Francesco Logozzo
July 5th, 14:15
The Smart Programming Assistant (SPA) analyzes and suggests repairs to your program while you are typing it. SPA tries to prove your program error-free with respect to a specification (Code Contracts), and if SPA finds errors in your program, it suggests a verified code repair. SPA simplifies correct program development via enhanced IntelliSense and via semantic refactoring, inferring general yet precise contracts for the extracted method. It enables code review by answering deep semantic queries. For example, "If x is null and y is > 0, what happens to z at this other program point?" or "In the new version of your program you are making a stronger assumption on the environment.". The Smart Programming Assistant is built on the top of Code Contracts, which provided a uniform and standard API to specify contracts in .NET (since v4) and tools that consume contracts for documentation generation, dynamic, and static analysis. This project is joint work with M. Barnett, M. Fahndrich, S. Lahiri, T. Ball, and many smart interns and visiting researchers.
Analyzing JavaScript and the Web with WALA
Julian Dolby and Max Schaefer
July 3rd, 14:15
We will present the Watson Libraries for Analysis (WALA) from the perspective of analyzing Web applications, particularly the client side of such applications, i.e. Web pages and associated JavaScript code. As Web applications become more sophisticated on the client side, such analysis becomes more and more important. It also poses particular challenges, as the dynamic nature of JavaScript is exacerbated by rich frameworks that make heavy use of JavaScript's dynamic features to engage in metaprogramming. Specifically, we focus on:
1) The HTML front end that takes Web pages and composes a JavaScript program to analyze. We explain how to model the DOM objects, how to support recording very precise source mappings for JavaScript code, and how different HTML parsers can be integrated into WALA.
2) Code specialization in the front end. As purely static analysis of JavaScript often proves challenging due to the extreme dynamism in the language, we have experimented with techniques that allow specialization of code during IR generation. The mechanism permits arbitrary rewriting of ASTs and multiple different translation for the same method in different contexts.
3) IR specializations for JavaScript. We will discuss ways in which the WALA IR has been specialized to address aspects of JavaScript. We will describe the representation of function calls in particular.
4) Targeted context sensitivity. We will present the support in WALA, such as cartesian product algorithm context sensitivity, allowing analyses to tailor sensitivity to particular functions, object and construct.
Project URL: http://wala.sourceforge.net Contact: Julian Dolby
R: A language for Analyzing Data
Tomas Kalibera
July 4th, 10:45
The R language and runtime was released in 1995 and quickly gained its popularity as a tool for scientific computing. Over the last decade it has become a key platform for implementing data analysis algorithms. Today R has over 5000 open-source packages, an estimated base of 2000 package developers and 2 million end users. For computer scientists, R is a useful tool for analyzing and visualizing experimental results. But most of all it is a challenge for researchers in programming languages and virtual machines. R has function closures with lexical scoping, but also lazy evaluation of function arguments through which one gets read/write access to caller scope. R allows to reflectively access code as text and to turn text into code and evaluate it in any scope. R code can run in synthetically created scopes, e.g. in data sets. R has rich support for vector arithmetics, including arithmetics with missing data. The FastR project aims to provide a faster implementation of R. FastR is implemented in Java and currently can run simple benchmarks with speedups usually about 3x but up to 20x.
Project URL: https://github.com/allr/fastr Contact: Tomas Kalibera
High-Performance DSLs using Scala, LMS and Delite
Tiark Rompf and Arvind Sujeeth
July 5th, 10:45
This tutorial is an introduction to developing domain specific languages (DSLs) for productivity and performance using Scala, LMS and Delite. Lightweight Modular Staging (LMS) is a pragmatic approach to runtime code generation in Scala and Delite is a compiler framework for embedded DSLs that simplifies the process of implementing DSLs for parallel computation and heterogeneous targets.
This tutorial provides an overview of the technology stack, presents existing high-performance DSL built using the framework, and guides the attendees through the process of creating DSLs.