LFP '90 Proceedings of the 1990 ACM conference on LISP and functional programming
Common LISP: the language (2nd ed.)
Common LISP: the language (2nd ed.)
FPCA '89 Proceedings of the fourth international conference on Functional programming languages and computer architecture
The essence of functional programming
POPL '92 Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Imperative functional programming
POPL '93 Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A system of constructor classes: overloading and implicit higher-order polymorphism
FPCA '93 Proceedings of the conference on Functional programming languages and computer architecture
The new hacker's dictionary (3rd ed.)
The new hacker's dictionary (3rd ed.)
Proceedings of the 1992 Glasgow Workshop on Functional Programming
Definitional interpreters for higher-order programming languages
ACM '72 Proceedings of the ACM annual conference - Volume 2
An Interpreter for Extended Lambda Calculus
An Interpreter for Extended Lambda Calculus
The Art of the Interpreter or, The Modularity Complex (Parts Zero, One, and Two)
The Art of the Interpreter or, The Modularity Complex (Parts Zero, One, and Two)
XP: A Common Lisp Pretty Printing System
XP: A Common Lisp Pretty Printing System
POPL '94 Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Monad transformers and modular interpreters
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Proceedings of the first ACM SIGPLAN international conference on Functional programming
A practical soft type system for scheme
ACM Transactions on Programming Languages and Systems (TOPLAS)
Building domain-specific embedded languages
ACM Computing Surveys (CSUR) - Special issue: position statements on strategic directions in computing research
Type specialisation for imperative languages
ICFP '97 Proceedings of the second ACM SIGPLAN international conference on Functional programming
ACM Computing Surveys (CSUR)
First-class polymorphism with type inference
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
DSL implementation using staging and monads
Proceedings of the 2nd conference on Domain-specific languages
Vanilla: An Open Language Framework
GCSE '99 Proceedings of the First International Symposium on Generative and Component-Based Software Engineering
Pragmatic Aspects of Reusable Program Generators
SAIG '00 Proceedings of the International Workshop on Semantics, Applications, and Implementation of Program Generation
A Mixin-Based, Semantics-Based Approach to Reusing Domain-Specific Programming Languages
ECOOP '00 Proceedings of the 14th European Conference on Object-Oriented Programming
Combining Semantics with Non-standard Interpreter Hierarchies
FST TCS 2000 Proceedings of the 20th Conference on Foundations of Software Technology and Theoretical Computer Science
A Language Prototyping Tool Based on Semantic Building Blocks
Computer Aided Systems Theory - EUROCAST 2001-Revised Papers
Modular Domain Specific Languages and Tools
ICSR '98 Proceedings of the 5th International Conference on Software Reuse
Implementing collection classes with monads
Mathematical Structures in Computer Science
A computational formalization for partial evaluation
Mathematical Structures in Computer Science
Pragmatic aspects of reusable program generators
Journal of Functional Programming
TinkerType: a language for playing with formal systems
Journal of Functional Programming
Two-level types and parameterized modules
Journal of Functional Programming
Journal of Functional Programming
Proceedings of the 5th workshop on Software engineering properties of languages and aspect technologies
A history of Haskell: being lazy with class
Proceedings of the third ACM SIGPLAN conference on History of programming languages
DSL implementation using staging and monads
DSL'99 Proceedings of the 2nd conference on Conference on Domain-Specific Languages - Volume 2
A modular monadic action semantics
DSL'97 Proceedings of the Conference on Domain-Specific Languages on Conference on Domain-Specific Languages (DSL), 1997
Constructing language processors with algebra combinators
GPCE '07 Proceedings of the 6th international conference on Generative programming and component engineering
Writing Composable Software with InterpreterLib
SC '09 Proceedings of the 8th International Conference on Software Composition
ML Module Mania: A Type-Safe, Separately Compiled, Extensible Interpreter
Electronic Notes in Theoretical Computer Science (ENTCS)
An architecture for composing embedded domain-specific languages
Proceedings of the 9th International Conference on Aspect-Oriented Software Development
Constructing language processors with algebra combinators
Science of Computer Programming
Monads, zippers and views: virtualizing the monad stack
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Extensible effects: an alternative to monad transformers
Proceedings of the 2013 ACM SIGPLAN symposium on Haskell
Hi-index | 0.00 |
We exhibit a set of functions coded in Haskell that can be used as building blocks to construct a variety of interpreters for Lisp-like languages. The building blocks are joined merely through functional composition. Each building block contributes code to support a specific feature, such as numbers, continuations, functions calls, or nondeterminism. The result of composing some number of building blocks is a parser, an interpreter, and a printer that support exactly the expression forms and data types needed for the combined set of features, and no more.The data structures are organized as pseudomonads, a generalization of monads that allows composition. Functional composition of the building blocks implies type composition of the relevant pseudomonads.Our intent was that the Haskell type resolution system ought to be able to deduce the appropriate data types automatically. Unfortunately there is a deficiency in current Haskell implementations related to recursive data types: circularity must be reflected statically in the type definitions.We circumvent this restriction by applying a purpose-built program simplifier that performs partial evaluation and a certain amount of program algebra. We construct a wide variety of interpreters in the style of Wadler by starting with the building blocks and a page of boiler-plate code, writing three lines of code (one to specify the building blocks and two to (redundantly) specify type compositions), and then applying the simplifier. The resulting code is acceptable Haskell code.We have tested a dozen different interpreters with various combinations of features. In this paper we discuss the overall code structuring strategy, exhibit several building blocks, briefly describe the partial evaluator, and present a number of automatically generated interpreters.