Adriaan Moors
École Polytechnique Fédérale de Lausanne
Network
Latest external collaboration on country level. Dive into details by clicking on the dots.
Publication
Featured researches published by Adriaan Moors.
generative programming and component engineering | 2008
Christian Hofer; Klaus Ostermann; Tillmann Rendel; Adriaan Moors
The influential pure embedding methodology of embedding domain-specific languages (DSLs) as libraries into a general-purpose host language forces the DSL designer to commit to a single semantics. This precludes the subsequent addition of compilation, optimization or domain-specific analyses. We propose polymorphic embedding of DSLs, where many different interpretations of a DSL can be provided as reusable components, and show how polymorphic embedding can be realized in the programming language Scala. With polymorphic embedding, the static type-safety, modularity, composability and rapid prototyping of pure embedding are reconciled with the flexibility attainable by external toolchains.
conference on object-oriented programming systems, languages, and applications | 2010
Hassan Chafi; Zach DeVito; Adriaan Moors; Tiark Rompf; Arvind K. Sujeeth; Pat Hanrahan; Kunle Olukotun
As heterogeneous parallel systems become dominant, application developers are being forced to turn to an incompatiblemix of low level programming models (e.g. OpenMP, MPI, CUDA, OpenCL). However, these models do little to shield developers from the difficult problems of parallelization, data decomposition and machine-specific details. Most programmersare having a difficult time using these programming models effectively. To provide a programming modelthat addresses the productivity and performance requirements for the average programmer, we explore a domainspecificapproach to heterogeneous parallel programming. We propose language virtualization as a new principle that enables the construction of highly efficient parallel domain specific languages that are embedded in a common host language. We define criteria for language virtualization and present techniques to achieve them.We present two concrete case studies of domain-specific languages that are implemented using our virtualization approach.
conference on object-oriented programming systems, languages, and applications | 2010
Bruno C. d. S. Oliveira; Adriaan Moors
Type classes were originally developed in Haskell as a disciplined alternative to ad-hoc polymorphism. Type classes have been shown to provide a type-safe solution to important challenges in software engineering and programming languages such as, for example, retroactive extension of programs. They are also recognized as a good mechanism for concept-based generic programming and, more recently, have evolved into a mechanism for type-level computation. This paper presents a lightweight approach to type classes in object-oriented (OO) languages with generics using the CONCEPT pattern and implicits (a type-directed implicit parameter passing mechanism). This paper also shows how Scalas type system conspires with implicits to enable, and even surpass, many common extensions of the Haskell type class system, making Scala ideally suited for generic programming in the large.
conference on object-oriented programming systems, languages, and applications | 2008
Adriaan Moors; Frank Piessens
With Java 5 and C# 2.0, first-order parametric polymorphism was introduced in mainstream object-oriented programming languages under the name of generics. Although the first-order variant of generics is very useful, it also imposes some restrictions: it is possible to abstract over a type, but the resulting type constructor cannot be abstracted over. This can lead to code duplication. We removed this restriction in Scala, by allowing type constructors as type parameters and abstract type members. This paper presents the design and implementation of the resulting type constructor polymorphism. Furthermore, we study how this feature interacts with existing object-oriented constructs, and show how it makes the language more expressive.
foundations of software technology and theoretical computer science | 2009
Adriaan Moors
We report on our experiences in redesigning Scalas collection libraries, focussing on the role that type systems play in keeping software architectures coherent over time. Type systems can make software architecture more explicit but, if they are too weak, can also cause code du- plication. We show that code duplication can be avoided using two of Scalas type constructions: higher-kinded types and implicit parameters and conversions.
Proceedings of the ACM SIGPLAN 2012 workshop on Partial evaluation and program manipulation | 2012
Adriaan Moors; Tiark Rompf; Philipp Haller
Scala-Virtualized extends the Scala language to better support hosting embedded DSLs. Embedding a DSL in Scala-Virtualized comes with all the benefits of a shallow embedding thanks to Scalas flexible syntax, without giving up analyzing and manipulating the domain program -- typically exclusive to deep embeddings. Through lightweight modular staging, implemented in standard Scala, the benefits of a deep embedding are recovered with little overhead. Scala-Virtualized lifts more of the languages built-in constructs and static information to complete this support and make it more convenient. We illustrate how Scala-Virtualized makes Scala an even better host for embedded DSLs along three axes of customizing the language: syntax, run-time behavior and static semantics.
Higher-Order and Symbolic Computation archive | 2012
Tiark Rompf; Nada Amin; Adriaan Moors; Philipp Haller
Scala-Virtualized extends the Scala language to better support hosting embedded DSLs. Scala is an expressive language that provides a flexible syntax, type-level computation using implicits, and other features that facilitate the development of embedded DSLs. However, many of these features work well only for shallow embeddings, i.e. DSLs which are implemented as plain libraries. Shallow embeddings automatically profit from features of the host language through linguistic reuse: any DSL expression is just as a regular Scala expression. But in many cases, directly executing DSL programs within the host language is not enough and deep embeddings are needed, which reify DSL programs into a data structure representation that can be analyzed, optimized, or further translated. For deep embeddings, linguistic reuse is no longer automatic.Scala-Virtualized defines many of the language’s built-in constructs as method calls, which enables DSLs to redefine the built-in semantics using familiar language mechanisms like overloading and overriding. This in turn enables an easier progression from shallow to deep embeddings, as core language constructs such as conditionals or pattern matching can be redefined to build a reified representation of the operation itself.While this facility brings shallow, syntactic, reuse to deep embeddings, we also present examples of what we call deep linguistic reuse: combining shallow and deep components in a single DSL in such a way that certain features are fully implemented in the shallow embedding part and do not need to be reified at the deep embedding level.
Archive | 2008
Adriaan Moors; Frank Piessens
19th International Workshop on Foundations of Object-Oriented Languages | 2012
Nada Amin; Adriaan Moors
Proceedings of the International Workshop on Foundations of Object-Oriented Languages (FOOL 2008) | 2008
Adriaan Moors; Frank Piessens