Browse wiki

From CERES
Jump to: navigation, search
Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML
Abstract <p>With few exceptions, macros have <p>With few exceptions, macros have traditionally been viewedas operations on syntax trees or even on plain strings. Thisview makes macros seem ad hoc, and is at odds with two desirable features of contemporary typed functional languages:static typing and static scoping. At a deeper level, thereis a need for a simple, usable semantics for macros. Thispaper argues that these problems can be addressed by formally viewing macros as multi-stage computations. Thisview eliminates the need for freshness conditions and testson variable names, and provides a compositional interpretation that can serve as a basis for designing a sound typesystem for languages supporting macros, or even for compilation.To illustrate our approach, we develop and present MacroML, an extension of ML that supports inlining, recursivemacros, and the definition of new binding constructs. Thelatter is subtle, and is the most novel addition in a staticallytyped setting. The semantics of a core subset of MacroML isgiven by an interpretation into MetaML, a statically-typedmulti-stage programming language. It is then easy to showthat MacroML is stage- and type-safe: macro expansiondoes not depend on runtime evaluation, and both stagesdo not “go wrong”.</p>nd both stagesdo not “go wrong”.</p>
Author Steven Ganz + , Amr Sabry + , Walid Taha +
Conference ICFP'01. International Conference on Functional Programming
Diva http://hh.diva-portal.org/smash/record.jsf?searchId=1&pid=diva2:588289
PublicationType Conference Paper  +
Title Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML  +
Year 2001  +
Has queryThis property is a special property in this wiki. Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML + , Publications:Macros as Multi-Stage Computations : Type-Safe, Generative, Binding Macros in MacroML +
Categories Publication  +
Modification dateThis property is a special property in this wiki. 26 June 2014 03:44:52  +
hide properties that link here 
  No properties link to this page.
 

 

Enter the name of the page to start browsing from.