000226166 001__ 226166
000226166 005__ 20190619023714.0
000226166 0247_ $$2doi$$a10.5075/epfl-thesis-7159
000226166 02470 $$2urn$$aurn:nbn:ch:bel-epfl-thesis7159-5
000226166 02471 $$2nebis$$a10859478
000226166 037__ $$aTHESIS
000226166 041__ $$aeng
000226166 088__ $$a7159
000226166 245__ $$aUnification of Compile-Time and Runtime Metaprogramming in Scala
000226166 269__ $$a2017
000226166 260__ $$bEPFL$$c2017$$aLausanne
000226166 300__ $$a240
000226166 336__ $$aTheses
000226166 502__ $$aProf. James Richard Larus (président) ; Prof. Martin Odersky (directeur de thèse) ; Prof. Viktor Kuncak, Dr Don Syme, Prof. Sam Tobin-Hochstadt (rapporteurs)
000226166 520__ $$aMetaprogramming is a technique that consists in writing programs that treat other programs as data. This paradigm of software development contributes to a multitude of approaches that improve programmer productivity, including code generation, program analysis and domain-specific languages. Many programming languages and runtime systems provide support for metaprogramming.  Programming platforms often distinguish the notions of compile-time and runtime metaprogramming, depending on the phase of the program lifecycle when metaprograms execute. It is common for different lifecycle phases to be hosted in different environ- ments, so it is also common for different kinds of metaprogramming to provide different capabilities to metaprogrammers.  In this dissertation, we present an exploration of the idea of unifying compile-time and runtime metaprogramming in Scala. We focus on the practical aspect of the exploration; most of the described designs are available as popular software products, and some of them have become part of the standard distribution of Scala.  First, guided by the motivation to consolidate disparate metaprogramming techniques available in earlier versions of Scala, we introduce scala.reflect, a unified metaprogram- ming framework that uses a language model derived from the Scala compiler to run metaprograms both at compile time and at runtime.  Secondly, armed by the newfound metaprogramming powers, we describe Scala macros, a language-integrated compile-time metaprogramming facility based on scala.reflect. Thanks to the comprehensive nature of scala.reflect, macros are able to work with both syntactic and semantic information about Scala programs, enabling a wide range of previously impractical or impossible use cases.  Finally, based on our experience and user feedback, we identify key strengths and weaknesses of scala.reflect and macros. We propose scala.meta, a new unified metapro- gramming framework, and inline/meta, a new macro system based on scala.meta, that take the best from their predecessors and address the most important problems.
000226166 6531_ $$aProgramming Languages
000226166 6531_ $$aCompilers
000226166 6531_ $$aMetaprogramming
000226166 6531_ $$aReflection
000226166 6531_ $$aMacros
000226166 700__ $$0246182$$g214505$$aBurmako, Eugene
000226166 720_2 $$aOdersky, Martin$$edir.$$g126003$$0241835
000226166 8564_ $$uhttps://infoscience.epfl.ch/record/226166/files/EPFL_TH7159.pdf$$zn/a$$s1643216$$yn/a
000226166 909C0 $$xU10409$$0252187$$pLAMP
000226166 909CO $$pthesis-public$$pDOI$$pIC$$ooai:infoscience.tind.io:226166$$qGLOBAL_SET$$pthesis$$pthesis-bn2018$$qDOI2
000226166 917Z8 $$x108898
000226166 917Z8 $$x108898
000226166 917Z8 $$x108898
000226166 917Z8 $$x108898
000226166 918__ $$dEDIC$$aIC
000226166 919__ $$aLAMP1
000226166 920__ $$b2017$$a2017-3-6
000226166 970__ $$a7159/THESES
000226166 973__ $$sPUBLISHED$$aEPFL
000226166 980__ $$aTHESIS