5 research outputs found
A correspondence between Scheme and the lambda(,upsilon)-CS-calculus
We study the relationship between the programming language Scheme and the \lambda\sb{v}-CS-calculus. To this end, we define a correspondence between Scheme and \Lambda\sb{CS}-terms--the language of the calculus--where every Scheme term is an abbreviation of a \Lambda\sb{CS}-term. Although Scheme and \Lambda\sb{CS} have constructs that roughly correspond to each other, the relationship is rather complex: the inclusion of domain predicates in Scheme enforces the uniform treatment of all values in Scheme as procedural abstractions. Therefore, we must conclude that \Lambda\sb{CS} cannot express Scheme as a notational definition, but only simulate it through a translation. On the other hand, the embedding reveals Scheme's object-oriented nature relative to \Lambda\sb{CS}, and provides a formal basis for the development and formal investigation of an object-oriented extension of Scheme
A confluent calculus of macro expansion and evaluation
Syntactic abbreviations or macros provide a powerful tool to increase the syntactic expressivity of programming languages. The expansion of these abbreviations can be modeled with substitutions. This paper presents an operational semantics of macro expansion and evaluation where substitutions are handled explicity. The semantics is defined in terms of a confluent, simple, and intuitive ser of rewriting rules. The resulting semantics is also a basis for developing correct implementations