Back To Schedule
Room 4 - Expert

Wednesday June 12th, 10:15-11:00

Future-proofing Scala: the TASTY intermediate representation

About this Session

Compiling Scala to JVM bytecode is not trivial and has surprising consequences for binary compatibility (see the talk "Designing libraries for source and binary compatibility"). Compiling all your Scala dependencies from sources sidesteps this but has other disadvantages: it's slow, and because type inference in Scala changes, source compatibility is not guaranteed.

TASTY is a format developed as part of Dotty as a middle-ground by storing the compiler ASTs after type inference. It turns out that this has many uses, come to this talk to find out how it works and what we can do with it!

In this talk I will propose that we formalize the specification of semantic contracts as statements of predicate logic. I will show how these statements of logic can be used in both property-based unit tests and proofs. I will show you new features of ScalaTest that support this approach.

Required Knowledge

Some experience developing Scala libraries is helpful to understand the problem domain, but no specific compiler knowledge is presumed.


Guillaume Martres

PhD student at EPFL working on Dotty, the new Scala compiler.