Results 1 
3 of
3
On the Expressive Power of Programming Languages
 Science of Computer Programming
, 1990
"... The literature on programming languages contains an abundance of informal claims on the relative expressive power of programming languages, but there is no framework for formalizing such statements nor for deriving interesting consequences. As a first step in this direction, we develop a formal noti ..."
Abstract

Cited by 131 (4 self)
 Add to MetaCart
The literature on programming languages contains an abundance of informal claims on the relative expressive power of programming languages, but there is no framework for formalizing such statements nor for deriving interesting consequences. As a first step in this direction, we develop a formal notion of expressiveness and investigate its properties. To validate the theory, we analyze some widely held beliefs about the expressive power of several extensions of functional languages. Based on these results, we believe that our system correctly captures many of the informal ideas on expressiveness, and that it constitutes a foundation for further research in this direction. 1 Comparing Programming Languages The literature on programming languages contains an abundance of informal claims on the expressive power of programming languages. Arguments in these contexts typically assert the expressibility or nonexpressibility of programming constructs relative to a language. Unfortunately, pro...
A Theory of Hygienic Macros
"... Abstract. Hygienic macro systems, such as Scheme’s, automatically rename variables to prevent unintentional variable capture—in short, they “just work. ” Yet hygiene has never been formally presented as a specification rather than an algorithm. According to folklore, the definition of hygienic macro ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
Abstract. Hygienic macro systems, such as Scheme’s, automatically rename variables to prevent unintentional variable capture—in short, they “just work. ” Yet hygiene has never been formally presented as a specification rather than an algorithm. According to folklore, the definition of hygienic macro expansion hinges on the preservation of alphaequivalence. But the only known notion of alphaequivalence for programs with macros depends on the results of macro expansion! We break this circularity by introducing explicit binding specifications into the syntax of macro definitions, permitting a definition of alphaequivalence independent of expansion. We define a semantics for a firstorder subset of Schemelike macros and prove hygiene as a consequence of confluence. The subject of macro hygiene is not at all decided, and more research is needed to precisely state what hygiene formally means and [precisely which] assurances it provides. —Oleg Kiselyov [1]
Hygienic Macros for ACL2
"... Abstract. ACL2 is a theorem prover for a purely functional subset of Common Lisp. It inherits Common Lisp’s unhygienic macros, which are used pervasively to eliminate repeated syntactic patterns. The lack of hygiene means that macros do not automatically protect their producers or consumers from acc ..."
Abstract
 Add to MetaCart
Abstract. ACL2 is a theorem prover for a purely functional subset of Common Lisp. It inherits Common Lisp’s unhygienic macros, which are used pervasively to eliminate repeated syntactic patterns. The lack of hygiene means that macros do not automatically protect their producers or consumers from accidental variable capture. This paper demonstrates how this lack of hygiene interferes with theorem proving. It then explains how to design and implement a hygienic macro system for ACL2. An evaluation of the ACL2 code base shows the potential impact of this hygienic macro system on existing libraries and practices. 1 Unhygienic Macros Are Not Abstractions ACL2 [1] is a verification system that combines a firstorder functional subset of Common Lisp with a firstorder theorem prover over a logic of total functions. It has been used to model and verify large commercial hardware and software artifacts. ACL2 supports functions and logical statements over numbers, strings, symbols, and sexpressions. Here is a sample program: (defun double (x) (+xx)) (defthm double⇒evenp (implies (integerp x) (evenp (double x)))) The defun form defines double, a function that adds its input to itself. The defthm form defines double⇒evenp, a conjecture stating that an integer input to double yields an even output. The conjecture is implicitly universally quantified over its free variable x. ACL2 validates double⇒evenp as a theorem, using the definition of double and axioms about implies, integerp, andevenp. From Common Lisp, ACL2 inherits macros, which provide a mechanism for extending the language via functions that operate on syntax trees. According to Kaufmann and Moore [2], “one can make specifications more succinct and easy to grasp... by introducing welldesigned applicationspecific notation. ” Indeed, macros are used ubiquitously in ACL2 libraries: there are macros for pattern matching; for establishing new homogenous list types and heterogenous structure types, including a comprehensive theory of each; for defining quantified claims using skolemization in an otherwise (explicit) quantifierfree logic; and so on. In the firstorder language of ACL2, macros are also used to eliminate repeated syntactic patterns due to the lack of higherorder functions: