OAK

Marco: Safe, expressive macros for any language

Metadata Downloads
Author(s)
Lee, ByeongcheolGrimm, RobertHirzel, MartinMcKinley, Kathryn S.
Type
Conference Paper
Citation
26th European Conference on Object-Oriented Programming, ECOOP 2012, pp.589 - 613
Issued Date
2012-06
Abstract
Macros improve expressiveness, concision, abstraction, and language interoperability without changing the programming language itself. They are indispensable for building increasingly prevalent multilingual applications. Unfortunately, existing macro systems are well-encapsulated but unsafe (e.g., the C preprocessor) or are safe but tightly-integrated with the language implementation (e.g., Scheme macros). This paper introduces Marco, the first macro system that seeks both encapsulation and safety. Marco is based on the observation that the macro system need not know all the syntactic and semantic rules of the target language but must only directly enforce some rules, such as variable name binding. Using this observation, Marco off-loads most rule checking to unmodified target-language compilers and interpreters and thus becomes language-scalable. We describe the Marco language, its language-independent safety analysis, and how it uses two example target-language analysis plug-ins, one for C++ and one for SQL. This approach opens the door to safe and expressive macros for any language. © 2012 Springer-Verlag Berlin Heidelberg.
Publisher
Springer
Conference Place
CN
URI
https://scholar.gist.ac.kr/handle/local/23763
공개 및 라이선스
  • 공개 구분공개
파일 목록
  • 관련 파일이 존재하지 않습니다.

Items in Repository are protected by copyright, with all rights reserved, unless otherwise indicated.