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.