Hygienic macros for ACL2

  • Authors:
  • Carl Eastlund;Matthias Felleisen

  • Affiliations:
  • Northeastern University, Boston, MA;Northeastern University, Boston, MA

  • Venue:
  • TFP'10 Proceedings of the 11th international conference on Trends in functional programming
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

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.