ScalaDyno: Making Name Resolution and Type Checking Fault-tolerant

The ScalaDyno compiler plugin allows fast prototyping with the Scala programming language, in a way that combines the benefits of both statically and dynamically typed languages. Static name resolution and type checking prevent partially-correct code from being compiled and executed. Yet, allowing programmers to test critical paths in a program without worrying about the consistency of the entire code base is crucial to fast prototyping and agile development. This is where ScalaDyno comes in: it allows partially-correct programs to be compiled and executed, while shifting compile-time errors to program runtime. The key insight in ScalaDyno is that name and type errors affect limited areas of the code, which can be replaced by instructions to output the respective errors at runtime. This allows byte code generation and execution for partially correct programs, thus allowing Python or JavaScript-like fast prototyping in Scala. This is all done without sacrificing name resolution, full type checking and optimizations for the correct parts of the code -- they are still performed, but without getting in the way of agile development. Finally, for release code or sensitive refactoring, runtime errors can be disabled, thus allowing full static name resolution and type checking typical of the Scala compiler.

Published in:
Proceedings of the Fifth Annual Scala Workshop
Presented at:
Fifth Annual Scala Workshop, Uppsala, Sweden, July 28-29, 2014
New York, NY, USA, ACM

 Record created 2014-08-22, last modified 2018-03-17

Publisher's version:
Download fulltextPDF
Download fulltextPNG
External link:
Download fulltextURL
Rate this document:

Rate this document:
(Not yet reviewed)