Papers by Michael Sperber
Functional dependencies help resolve many of the ambiguities that result from the use of multi-pa... more Functional dependencies help resolve many of the ambiguities that result from the use of multi-parameter type classes. They eectively enable writing programs at the type-level which significantly enhances the expressive power of Haskell's type sys- tem. Among the applications of this technique are the emulation of dependent types, and precise typechecking for XML and HTML combinator libraries. Unfortunately, the notation
Leitfäden der Informatik, 2001
Proceedings of the 2013 International Conference on Principles and Practices of Programming on the Java Platform Virtual Machines, Languages, and Tools - PPPJ '13, 2013
Star is a functional, multi-paradigm and extensible programming language that runs on the Java pl... more Star is a functional, multi-paradigm and extensible programming language that runs on the Java platform. Starview Inc developed the language as an integral part of the Starview Enterprise Platform, a framework for real-time business applications such as factory scheduling and data analytics. Star borrows from many languages, with obvious heritage from Haskell, ML, and April, but also contains new approaches to some design aspects, such as syntax and syntactic extensibility, actors, and queries. Its texture is quite different from that of other languages on the Java platform. Despite this, the learning curve for Java programmers is surprisingly shallow. The combination of a powerful type system (which includes type inference, constrained polymorphism, and existentials) and syntactic extensibility make the Star well-suited to producing embedded domain-specific languages. This paper gives an overview of the language, and reports on some aspects of its design process, on our experience on using it in industrial projects, and on our experience implementing Star on the Java platform.
Proceedings of the 15th ACM SIGPLAN international conference on Functional programming - ICFP '10, 2010
A student learning how to program learns best when the programming language and programming envir... more A student learning how to program learns best when the programming language and programming environment cater to her specific needs. These needs are different from the requirements of a professional programmer. Consequently, the design of teaching languages poses challenges different from the design of "professional" languages. Using a functional language by itself gives advantages over more popular, professional languages, but fully exploiting these advantages requires careful adaptation to the needs of the studentsas-is, these languages do not support the students nearly as well as they could. This paper describes our experience adopting the didactic approach of How to Design Programs, focussing on the design process for our own set of teaching languages. We have observed students as they try to program as part of our introductory course, and used these observations to significantly improve the design of these languages. This paper describes the changes we have made, and the journey we took to get there. 1 We were wrong about the course on other aspects as well .
ACM SIGPLAN Notices, 2001
Lula is a system for computer-assisted stage lighting design and control. Whereas other systems f... more Lula is a system for computer-assisted stage lighting design and control. Whereas other systems for the same purpose are usually the results of long chains of incremental improvements of historic concepts, Lula represents a complete redesign. Whereas other systems focus on control aspects of lighting, Lula focuses on design and generates control information from it. This approach gives significantly more flexibility to the lighting designer and shortens the design process itself.
Lecture Notes in Computer Science, 1996
Page 1. Self-Applicable Online Partial Evaluation Michael Sperber Wilhelm-Schickard-Iustitut fiir... more Page 1. Self-Applicable Online Partial Evaluation Michael Sperber Wilhelm-Schickard-Iustitut fiir Informatik Universit~t Tiibingen Sand 13, D-72076 Tiibingen, Germany sperber@informatik, uni-tuebingen, de phone +49 (7071) 29-5467, fax +49 (7071) 29-5958 Abstract. ...
We propose a hybrid approach to partial evaluation to achieve self-application of realistic onlin... more We propose a hybrid approach to partial evaluation to achieve self-application of realistic online partial evaluators. Whereas the o ine approach to partial evaluation leads to e cient specializers and self-application, online partial evaluators perform better specialization at the price of eciency. Moreover, no online partial evaluator for a realistic language has been successfully self-applied. We present a binding-time analysis for an online partial evaluator for a higher-order subset of Scheme. The analysis distinguishes between static, dynamic, a n d unknown binding times. Thus, it makes some reduce/residualize decisions o ine while leaving others to the specializer. The analysis does not introduce unnecessary generalizations. We have implemented the binding-time analysis and an online specializer to go with it. After some standard binding-time improvements, our partial evaluator successfully self-applies. Moreover, it is amenable to e ective specialization with an o ine partial evaluator.
One of the flagship applications of partial evaluation is compilation and compiler generation. Ho... more One of the flagship applications of partial evaluation is compilation and compiler generation. However, partial evaluation is usually expressed as a source-to-source transformation for high-level languages, whereas realistic compilers produce object code. We close this gap by composing a partial evaluator with a compiler by automatic means. Our work is a successful application of several meta-computation techniques to build the system, both in theory and in practice. The composition is an application of deforestation or fusion. The result is a run-time code generation system built from existing components. Its applications are numerous. For example, it allows the language designer to perform interpreter-based experiments with a source-to-source version of the partial evaluator before building a realistic compiler which generates object code automatically. Keywords semantics-directed compiler generation, partial evaluation, compilation of higher-order functional languages, run-time c...
Functional dependencies help resolve many of the ambiguities that result from the use of multi-pa... more Functional dependencies help resolve many of the ambiguities that result from the use of multi-parameter type classes. They e#ectively enable writing programs at the type-level which significantly enhances the expressive power of Haskell's type system. Among the applications of this technique are the emulation of dependent types, and precise typechecking for XML and HTML combinator libraries. Unfortunately, the notation presently used for functional dependencies implies that the type-level programs are logic programs, but many of its applications are conceptually functional programs. We propose an alternative notation for functional dependencies which adds a functional-programming notation to Haskell's type classes and makes applications of functional dependencies significantly more readable. We apply the new notation to our examples and study the problems arising due to Haskell's open world assumption and overlapping instances.
Proceedings of the 1995 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation - PEPM '95, 1995
Partial evaluation can turn a general parser into a parser generator. The generated parsers surpa... more Partial evaluation can turn a general parser into a parser generator. The generated parsers surpass those produced by traditional parser generators in speed and compactness. We use an inherently functional approach to implement general LR(k) parsers and specialize them using the partial evaluator Similix. The functional implementation of LR parsing allows for concise implementation of the algorithms themselves and requires only straightforward changes to achieve good specialization results. In contrast, a traditional, stack-based implementation of a general LR parser requires significant structural changes to make it amenable to satisfactory specialization.
Lecture Notes in Computer Science, 1996
Polyvariant expansion is a binding-time-improving transformation for o ine partial evaluation.
The new version of scsh enables concurrent system programming with portable user-level threads. I... more The new version of scsh enables concurrent system programming with portable user-level threads. In scsh, threads behave like processes in many ways. Each thread receives its own set of process resources. Like Unix processes, forked threads can inherit resources from the parent thread. To store these resources scsh uses preserved thread fluids, a special kind of fluid variables. The paper gives a detailed description of an efficient implementation for thread-local process resources. Scsh also provides an interface to the fork system calls which avoids common pitfalls which arise with a userlevel thread system. Scsh contains a binding for fork that forks "only the current thread." 1
Die didaktische Behandlung der Konstruktion von Programmen ist von zentraler Bedeutung in der Anf... more Die didaktische Behandlung der Konstruktion von Programmen ist von zentraler Bedeutung in der Anfängerausbildung im Programmieren: Die meisten Anfänger brauchen Anleitung, um Programmierprobleme erfolgreich eigenständig lösen zu können. Dieses Papier beschreibt zwei solcher Ansätze entlang eines Beispielproblems:
ACM SIGPLAN Notices, 2001
ABSTRACT It is possible to translate code written in Emacs Lisp or another Lisp dialect which use... more ABSTRACT It is possible to translate code written in Emacs Lisp or another Lisp dialect which uses dynamic scoping to a more modern programming language with lexical scoping while largely preserving structure and readability of the code. The biggest obstacle to such an idiomatic translation from Emacs Lisp is the translation of dynamic binding into suitable instances of lexical binding: Many binding constructs in real programs in fact exhibit identical behavior under both dynamic and lexical binding. An idiomatic translation needs to detect as many of these binding constructs as possible and convert them into lexical binding constructs in the target language to achieve readability and efficiency of the target code. The basic prerequisite for such an idiomatic translation is thus a dynamic scope analysis which associates variable occurrences with binding constructs. We present such an analysis. It is an application of the Nielson/Nielson framework for flow analysis to a semantics for dynamic binding akin to Moreau's. Its implementation handles a substantial portion of Emacs Lisp, has been applied to realistic Emacs Lisp code, and is highly accurate and reasonably efficient in practice.
Proceedings of the 2007 International Lisp Conference on - ILC '07, 2009
ABSTRACT In the Revised Reports on Scheme up to R5RS, the language could only be changed by unani... more ABSTRACT In the Revised Reports on Scheme up to R5RS, the language could only be changed by unanimous consent. It has been widely believed that any language changes made in this way would clearly be the right thing. Arguably, this process reached its limits with the Revised5 Report on Scheme: Crucial language additions such as modules, records and exceptions had little chance of reaching unanimous consent, no matter what the specific design. While the editors of the Revised6 Report no longer follow this rule, standardization is still driven by a strong desire to do the right thing. Continuing the tradition of Lisp culture, reaching this goal has been difficult and elusive, as the participants hold different and strongly opinionated ideas about what the right thing is. In the talk, I will review the R6RS process, and attempt to show that R6RS is indeed the right thing for Scheme.
Informatik aktuell, 1997
We have implemented a program generation library for polymorphically typed functional languages w... more We have implemented a program generation library for polymorphically typed functional languages with lazy evaluation. The library combinators perform program generation by partial evaluation, a technique which allows the generation of highly-customized and efficient specialized output programs from general, parameterized input programs. Previously implemented program generation libraries for polymorphically typed languages have either required dynamic typing or been in the context of specially designed program generation languages. In contrast, our library has been implemented in Gofer, a widely available functional language. Moreover, we exploit multi-parameter constructor classes which are part of Gofer's type system to construct program generators that are bindingtime polymorphic. An appropriate polymorphic binding-time analysis can provide the necessary type annotations to specify these properties. However, we designed and implemented a minor extension of Gofer's type reconstruction mechanism that can automatically infer binding times.
ACM SIGPLAN Notices, 1996
Two key steps in the compilation of strict functional languages are the conversion of higher-orde... more Two key steps in the compilation of strict functional languages are the conversion of higher-order functions to data structures (closures) and the transformation to tail-recursive style. We show how to perform both steps at once by applying first-order offline partial evaluation to a suitable interpreter. The resulting code is easy to transliterate to low-level C or native code. We have implemented the compilation to C; it yields a performance comparable to that of other modern Scheme-to-C compilers. In addition, we have integrated various optimizations such as constant propagation, higherorder removal, and arity raising simply by modifying the underlying interpreter. Purely first-order methods suffice to achieve the transformations. Our approach is an instance of semantics-directed compiler generation.
ACM SIGPLAN Notices, 2001
Uploads
Papers by Michael Sperber