Results 1 -
5 of
5
REQUEST-BASED MEDIATED EXECUTION BY
"... 1.1 Why customize a language?................................ 1 1.1.1 Creating domain-specific languages........................ 2 1.1.2 Reusing code in a new context.......................... 3 ..."
Abstract
- Add to MetaCart
1.1 Why customize a language?................................ 1 1.1.1 Creating domain-specific languages........................ 2 1.1.2 Reusing code in a new context.......................... 3
A Few Principles of Macro Design
"... Hygiene facilitates the implementation of reliable macros but does not guarantee it. In this note we review the introspective capabilities of macros, discuss the problems caused by abusing this power, and suggest a few principles for designing well-behaved macros. 1. ..."
Abstract
- Add to MetaCart
Hygiene facilitates the implementation of reliable macros but does not guarantee it. In this note we review the introspective capabilities of macros, discuss the problems caused by abusing this power, and suggest a few principles for designing well-behaved macros. 1.
General Terms
"... Existing macro systems force programmers to make a choice between clarity of specification and robustness. If they choose clarity, they must forgo validating significant parts of the specification and thus produce low-quality language extensions. If they choose robustness, they must write in a style ..."
Abstract
- Add to MetaCart
Existing macro systems force programmers to make a choice between clarity of specification and robustness. If they choose clarity, they must forgo validating significant parts of the specification and thus produce low-quality language extensions. If they choose robustness, they must write in a style that mingles the implementation with the specification and therefore obscures the latter. This paper introduces a new language for writing macros. With the new macro system, programmers naturally write robust language extensions using easy-to-understand specifications. The system translates these specifications into validators that detect misuses—including violations of context-sensitive constraints— and automatically synthesize appropriate feedback, eliminating the need for ad hoc validation code.
Speaking for the Trees: a New (Old) Approach to Languages and Syntax
, 2010
"... The final copy of this thesis has been examined by the signatories, and we find that both the content and the form meet acceptable presentation standards of scholarly work in the above mentioned discipline. iii Prescott, Moss (M.S., Computer Science) ..."
Abstract
- Add to MetaCart
The final copy of this thesis has been examined by the signatories, and we find that both the content and the form meet acceptable presentation standards of scholarly work in the above mentioned discipline. iii Prescott, Moss (M.S., Computer Science)
Computational Effects across Generated Binders Maintaining future-stage lexical scope
"... Code generation is the leading approach to making high-performance software reusable. Effects are indispensable in code generators, whether to report failures or to insert let-statements and ifguards. Extensive painful experience shows that unrestricted effects interact with generated binders in und ..."
Abstract
- Add to MetaCart
Code generation is the leading approach to making high-performance software reusable. Effects are indispensable in code generators, whether to report failures or to insert let-statements and ifguards. Extensive painful experience shows that unrestricted effects interact with generated binders in undesirable ways to produce unexpectedly unbound variables, or worse, unexpectedly bound ones. These subtleties prevent experts in the application domain, not in programming languages, from using and extending the generator. A pressing problem is thus to express the desired effects while regulating them so that the generated code is correct, or at least correctly scoped, by construction. In an imminently practical code-generation framework, we show how to express arbitrary effects, including mutable references and delimited control, that move open code across generated binders. The static types of our generator expressions not only ensure that a well-typed generator produces well-typed and well-scoped code, but also express the lexical scopes of generated binders and prevent mixing up variables with different scopes. This precise notion of lexical scope subsumes the complaints about intuitively wrong example generators in the literature. For the first time, we demonstrate statically safe let-insertion across an arbitrary number of binders. Our framework is implemented as a Haskell library that embeds an extensible typed higher-order domain-specific language. It may be regarded as ‘staged Haskell. ’ The library is convenient to use thanks to the maturity of Haskell, higher-order abstract syntax, and polymorphism over generated type environments.

