A multi-stage language with intensional analysis

This paper presents the definition of a language with reflection primitives. The language is a homogeneous multi-stage language that provides the capacity of code analysis by the inclusion of a pattern matching mechanism that permits inspection of the structure of quoted expressions and their destruction into component subparts. Quoted expressions include an explicit annotation of their context which is used for dynamic inference of type, where a dynamic typing discipline based on Hinze and Cheney's approach is used for typing quoted expressions.This paper follows the approach of Sheard and Pasalic about the use of the meta-language Ωmega as a tool for language design. In this sense, it is shown how to represent the syntax, the static as well as the dynamic semantics of the proposed language in terms of Ωmega constructs.

[1]  Jim Grundy,et al.  A reflective functional language for hardware design and theorem proving , 2005, Journal of Functional Programming.

[2]  S. Doaitse Swierstra,et al.  Typing dynamic typing , 2002, ICFP '02.

[3]  John Matthews,et al.  Semantics of the reFLect language , 2004, PPDP '04.

[4]  James Cheney,et al.  A lightweight implementation of generics and dynamics , 2002, Haskell '02.

[5]  Emir Pasalic,et al.  Meta-programming With Built-in Type Equality (Extended Abstract) , 2004 .

[6]  Emir Pasalic,et al.  Meta-programming with Typed Object-Language Representations , 2004, GPCE.

[7]  Frank Pfenning,et al.  Functional programming with names and necessity , 2004 .

[8]  Simon L. Peyton Jones,et al.  Template meta-programming for Haskell , 2002, Haskell '02.

[9]  Emir Pasalic,et al.  The role of type equality in meta-programming , 2004 .

[10]  Walid Taha,et al.  Multi-Stage Programming: Its Theory and Applications , 1999 .

[11]  Walid Taha,et al.  A Sound Reduction Semantics for Untyped CBN Multi-stage Computation. Or, the Theory of MetaML is Non-trivial (Extended Abstract) , 1999, PEPM.

[12]  de Ng Dick Bruijn Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[13]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[14]  Mitchell Wand,et al.  Reification: Reflection without metaphysics , 1984, LFP '84.

[15]  Walid Taha,et al.  Environment classifiers , 2003, POPL.

[16]  Simon L. Peyton Jones,et al.  Dynamic typing as staged type inference , 1998, POPL '98.

[17]  Walid Taha,et al.  A sound reduction semantics for untyped CBN mutli-stage computation. Or, the theory of MetaML is non-trival (extended abstract) , 1999, PEPM '00.

[18]  Walid Taha,et al.  An Idealized MetaML: Simpler, and More Expressive , 1999, ESOP.

[19]  Tim Sheard,et al.  Accomplishments and Research Challenges in Meta-programming , 2001, SAIG.

[20]  Tim Sheard,et al.  Putting curry-howard to work , 2005, Haskell '05.

[21]  Aleksandar Nanevski Meta-programming with names and necessity , 2002, ICFP '02.

[22]  Pierre Lescanne,et al.  λν, a calculus of explicit substitutions which preserves strong normalisation , 1996, Journal of Functional Programming.

[23]  Walid Taha,et al.  ML-Like Inference for Classifiers , 2004, ESOP.

[24]  Walid Taha,et al.  MetaML and multi-stage programming with explicit annotations , 2000, Theor. Comput. Sci..

[25]  Walid Taha,et al.  A Gentle Introduction to Multi-stage Programming , 2003, Domain-Specific Program Generation.

[26]  Frank Pfenning,et al.  Staged computation with names and necessity , 2005, J. Funct. Program..

[27]  Emir Pasalic,et al.  Meta-programming With Built-in Type Equality , 2008, Electron. Notes Theor. Comput. Sci..