META 2018- Proceedings of the 3rd ACM SIGPLAN International Workshop on Meta-Programming Techniques and Reflection

Full Citation in the ACM Digital Library

Through a glass, darkly (invited talk)

Reflection gives us a mirror into our programs. Using this mirror, we can see our programs’ structures, perhaps their execution, and maybe even reach through the mirror to change what our programs are and what they do.

In this talk, I’ll consider what lives on each side of the mirror and what happens when we cross that boundary. I’ll describe how mirrors let us peer into the middle of our programs, what happens when we reflect on concepts rather than objects, and what happens when we hold up a mirror up to itself. I’ll discuss the way reflection works in the Grace language, and present some prospects for extending it in the future.

SemanticDB: a common data model for Scala developer tools (invited talk)

Nowadays, there is a clear trend towards standards for communication between developer tools. Language Server Protocol (LSP), a protocol that connects programming language implementations and text editors, has gained strong industrial support and at the time of writing has implementations for many programming languages and editors. Build Server Protocol (BSP) follows in LSP’s tracks with an ambition to define a protocol for communication between language servers and build tools.

While lots of work in the open-source community has been invested in unifying user experience (by codifying commonly used operations like go to definition or find all references), relatively less work went into unifying implementor experience. For example, at the moment, there exist five different LSP implementations for Scala. They all implement the same protocol that works with code, but they all use different data structures to represent that code.

In this talk, we will present SemanticDB - a data model for semantic information such as symbols and types about programs in Scala and other languages. We will discuss our experience of building an ecosystem of developers tools around SemanticDB and using these tools on Twitter source code - arguably the largest Scala codebase on the planet.

SemanticDB is joint work between Eugene Burmako, Twitter and Ólafur Páll Geirsson, EPFL who together developed and maintain the open-source specification and implementations at The project has received contributions from the Advanced Scala Tools team at Twitter - Eugene Burmako, Shane Delmore, Max Ovsiankin and Uma Srinivasan - as well as many open-source enthusiasts.

GraalVM: metaprogramming inside a polyglot system (invited talk)

GraalVM is a polyglot virtual machine for running applications written in a variety of languages such as JavaScript, Ruby, Python, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++.

GraalVM enables interoperability between different programming languages in a shared runtime, and can run either standalone or embedded in other software systems such as Node.js, the Oracle RDBMS, and MySQL. In this talk I will give an overview of GraalVM and present how polyglot features such as language interoperability and language-agnostic instrumentation are enabled in GraalVM by means of VM-internal metaprogramming.

Recognizing heterogeneous sequences by rational type expression

We summarize a technique for writing functions which recognize types of heterogeneous sequences in Common Lisp. The technique employs sequence recognition functions, generated at compile time, and evaluated at run-time. The technique we demonstrate extends the Common Lisp type system, exploiting the theory of rational languages, Binary Decision Diagrams, and the Turing complete macro facility of Common Lisp. The resulting system uses meta-programming to move an Omega(2^n) complexity operation from run-time to a compile-time operation, leaving a highly optimized Theta(n) complexity operation for run-time.

Does it make sense to have application-specific code conventions as a complementary approach to code annotations?

Code annotations are extensively used by Java developers, especially in enterprise frameworks and APIs such as Spring and Java EE. Different code elements that frequently share some similarities, sometimes, repeat the annotations. The goal of this paper is to evaluate whether a real-world system could use code conventions as a means to avoid replicating code annotations. We report on a study on the software used for the EMBRACE Space Weather program at INPE to search for similarities.