Leif Andersen
Email: leif - at - leif.pl
Lab: UMass Boston Programming Languages
Github: LeifAndersen
LinkedIn: Leif Andersen
Matrix: @leifandersen:matrix.org
Mastodon: @leif@toot.leif.pl
Twitter: @LeifAndersen
BlueSky: leif.pl
Bio
I am a software engineer that works in programming languages and compiler development. I've created and continue to maintain domain-specific languages for making hybrid textual-visual programs, and lead the VISr Project. Some additional topics of interest include systems, multimedia, and human-computer interaction.Dissertation
- Title: Adding Visual and Interactive Syntax to Textual ProgramsAbstract:
Many programming problems call for turning geometric thoughts into code: tables, hierarchical structures, nests of objects, trees, graphs, etc. Linear text does not do justice to such thoughts. But, it has been the dominant programming medium for the past and will remain so for the foreseeable future. While visual languages are a better medium for these thoughts, they lack the flexibility offered by linear text. Hybrid visual-textual languages offer the best of both worlds. Programs written in a hybrid language can employ visuals when appropriate, while retaining the flexibility of text. Previous attempts at creating hybrid media have all been extra-linguistic; instead of supporting visual-interactive elements as language constructs, these media tied programming to one specific IDE. The biggest downside of such approaches is that programmers are unable to edit the textual portion of their programs using their preferred text editor. This dissertation presents VISr (Visual and Interactive Syntax realized), a technique for adding a mechanism to existing programming languages that empowers programmers to extend it with domain-specific, visual and interactive elements. It presents two such realizations: one for Racket and one for ClojureScript. The dissertation also introduces two IDEs that can render interactive syntax elements as graphical-user interfaces. Specifically, it explains how to adapt DrRacket to visual-interactive syntax; and it introduces a new, browser-based IDE, specifically created for hybrid visual-textual programming: elIDE. In support of the design, this dissertation also presents evidence of the usefulness and usability of VISr. The evidence comes from a user-facing evaluation and several case-studies of programs created using interactive-syntax extensions, including one extended case study using interactive-syntax extensions for video production.
View...
Papers
- Making Hybrid Languages: A RecipeAuthors: Leif Andersen, Cameron Moy, Stephen Chang, Matthias FelleisenAbstract:
The dominant programming languages support only linear text to express ideas. Visual languages offer graphical representations for entire programs, when viewed with special tools. Hybrid languages, with support from existing tools, allow developers to express their ideas with a mix of textual and graphical syntax tailored to an application domain. This mix puts both kinds of syntax on equal footing and, importantly, the enriched language does not disrupt a programmer’s typical workflow. This paper presents a recipe for equipping exist- ing textual programming languages as well as accompanying IDEs with a mechanism for creating and using graphical interactive syntax. It also presents the first hybrid language and IDE created using the recipe.
View... - Adding Interactive Visual Syntax to Textual CodeAuthors: Leif Andersen, Michael Ballantyne, Matthias FelleisenAbstract:
Many programming problems call for turning geometrical thoughts into code: tables, hierarchical structures, nests of objects, trees, forests, graphs, and so on. Linear text does not do justice to such thoughts. But, it has been the dominant programming medium for the past and will remain so for the foreseeable future. This paper proposes a novel mechanism for conveniently extending textual programming languages with problem-specific visual syntax. It argues the necessity of this language feature, demonstrates the feasibility with a robust prototype, and sketches a design plan for adapting the idea to other languages.
View... - Super 8 Languages for Making MoviesAuthors: Leif Andersen, Stephen Chang, Matthias FelleisenAbstract:
The Racket doctrine tells developers to create languages (as libraries) to narrow the gap between the terminology of a problem domain and general programming constructs. This pearl illustrates this doctrine with the creation of a relatively simple domain-specific language for editing videos. To produce the video proceedings of a conference, for example, video professionals traditionally use ``non-linear'' GUI editors to manually edit each talk, despite the repetitive nature of the process. As it turns out, the task of video editing naturally splits into a declarative phase and an imperative rendering phase at the end. Hence it is natural to create a functional-declarative language for the first phase, which reduces a lot of manual labor. The implementation of this user-facing DSL, dubbed Video, utilizes a second, internal DSL to implement the second phase, which is an interface to a general, low-level C library. Finally, we inject type checking into our Video language via another DSL that supports programming in the language of type formalisms. In short, the development of the video editing language cleanly demonstrates how the Racket doctrine naturally leads to the creation of language hierarchies, analogous to the hierarchies of modules found in conventional functional languages.
View... - Feature-Specific ProfilingAuthors: Leif Andersen, Vincent St-Amour, Jan Vitek, Matthias FelleisenAbstract:
While high-level languages come with significant readability and maintainability benefits, their performance remains difficult to predict. For example, programmers may unknowingly use language features inappropriately, which cause their programs to run slower than expected. To address this issue, we introduce feature-specific profiling, a technique that reports performance costs in terms of linguistic constructs. Festure-specific profilers help programmers find expensive uses of specific features of their language. We describe the architecture of a profiler that implements our approach, explain prototypes of the profiler for two languages with different characteristics and implementation strategies, and provide empirical evidence for the approach's general usefulness as a performance debugging tool.
View... - Feature-Specific ProfilingAuthors: Vincent St-Amour, Leif Andersen, Matthias FelleisenAbstract:
High-level languages come with significant readability and maintainability benefits. Their performance costs, however, are usually not predictable, at least not easily. Programmers may accidentally use high-level features in ways that compiler writers could not anticipate, and they may thus produce underperforming programs as a result. This paper introduces feature-specific profiling, a profiling technique that reports performance costs in terms of linguistic constructs. With a feature-specific profiler, a programmer can identify specific instances of language features that are responsible for performance problems. After explaining the architecture of our feature-specific profiler, the paper presents the evidence in support of adding feature-specific profiling to the programmer’s toolset.
View... - Concrete and Abstract Interpretation: Better TogetherAuthors: Maria Jenkins, Leif Andersen, Thomas Gilray, Matthew MightAbstract:
Recent work in abstracting abstract machines provides a methodology for deriving sound static analyzers from a concrete semantics by way of abstract interpretation. Consequently, the concrete and abstract semantics are closely related by design. We apply Galois-unions as a framework for combining both concrete and abstract semantics, and explore the benefits of being able to express both in a single semantics. We present a methodology for creating such a unified representation using operational semantics and implement our approach with and A-normal form (ANF) λ-calculus for a CESK style machine in PLT Redex.
View... - Multi-core Parallelization of Abstract Abstract MachinesAuthors: Leif Andersen, Matthew MightAbstract:
It is straightforward to derive well-known higher-order flow analyses as abstract interpretations of well-known abstract machines. In this paper, we explore multi-core parallel evaluation of one such abstract abstract machine, the CES machine. The CES machine is a variant of CESK machines that runs Continuation Passing Style (CPS) λ-calculus. Using k-CFA, the concrete semantics for a CES machine can be turned into abstract semantics. Analyzing a program for this machine is a state graph walk, which can be run in parallel to increase performance.
View...
Talks
- Adding Interactive Visual Syntax to Textual Code
- VISr: Visual and Interactive Syntax
- A Language for Making Movies
- Super 8 Languages for Making Movies (Functional Pearl)
- Movies as Programs: The Story of a Racket
Software
- Visual and Interactive Syntax realized for ClojureScript
- Video Programming Language
- S-Markup Language
- Nanopass Compiler Framework
- Racket