skip to main content
10.1145/1159803.1159817acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Static analysis for syntax objects

Published:16 September 2006Publication History

ABSTRACT

We describe an s-expression based syntax-extension framework much like Scheme macros, with a key additional facility: the ability to define static semantics, such as type systems or program analysis, for the new, user-defined forms or embedded languages, thus allowing us to construct "towers" of language levels. In addition, the static semantics of the languages at two adjacent levels in the tower can be connected, allowing improved reasoning power at a higher (and perhaps more restricted) level to be reflected down to the static semantics of the language level below. We demonstrate our system by designing macros for an assembly language, together with some example static analyses (termination analysis, type inference and control-flow analysis).

References

  1. Alan Bawden. Reification without evaluation. In LFP '88: Proceedings of the 1988 ACM conference on LISP and functional programming, pages 342--349, New York, NY, USA, 1988. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. William Clinger. Macros that work. In POPL '91: Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 155--162, New York, NY, USA, 1991. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. Kent Dybvig, Robert Hieb, and Carl Bruggeman. Syntactic abstraction in scheme. Lisp Symb. Comput., 5(4):295--326, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Robert Bruce Findler, John Clements, Matthew Flatt Cormac Flanagan, Shriram Krishnamurthi, Paul Steckler, and Matthias Felleisen. DrScheme: A progamming environment for Scheme. Journal of Functional Programming, 12(2):159--182, March 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Matthew Flatt. Composable and compilable macros: you want it when? In ICFP '02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, pages 72--83, New York, NY, USA, 2002. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Dan Friedman. Object-oriented style. Invited talk at International LISP Conference, October 2003.]]Google ScholarGoogle Scholar
  7. Daniel P. Friedman, William E. Byrd, and Oleg Kiselyov. The Reasoned Schemer. The MIT Press, Cambridge, MA, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Kathryn E Gray and Matthew Flatt. Compiling Java to PLT Scheme. In Proceedings of the 2004 Scheme Workshop, September 2004.]]Google ScholarGoogle Scholar
  9. Graham Hutton and ErikMeijer. Monadic Parsing in Haskell. Journal of Functional Programming, 8(4):437--444, July 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Kelsey, W. Clinger, and J. Rees (eds.). Revised5 report on the algorithmic language Scheme. Higher-Order and Symbolic Computations, 11(1), August 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Shriram Krishnamurthi, Yan-David Erlich, and Matthias Felleisen. Expressing structural properties as language constructs. In ESOP '99: Proceedings of the 8th European Symposium on Programming Languages and Systems, pages 258--272, London, UK, 1999. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Shriram Krishnamurthi and Matthias Felleisen. Toward a formal theory of extensible software. In SIGSOFT '98/FSE-6: Proceedings of the 6th ACM SIGSOFT international symposium on Foundations of software engineering, pages 88--98, New York, NY, USA, 1998. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Shriram Krishnamurthi, Matthias Felleisen, and Bruce F. Duba. From macros to reusable generative programming. In GCSE '99: Proceedings of the First International Symposium on Generative and Component-Based Software Engineering, pages 105--120, London, UK, 2000. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Daan Leijen and Erik Meijer. Parsec: Direct style monadic parser combinators for the real world. Technical Report UU-CS-2001-27, Department of Computer Science, Universiteit Utrecht, 2001.]]Google ScholarGoogle Scholar
  15. William Maddox. Semantically-sensitive macroprocessing. Technical report, University of California at Berkeley, Berkeley, CA, USA, 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Greg Morrisett, David Walker, Karl Crary, and Neal Glew. From system F to typed assembly language. ACM Trans. Program. Lang. Syst., 21(3):527--568, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Ravi A. Nanavati. Extensible syntax in the presence of static analysis. MasterÆs thesis, Massachusetts Institute of Technology, September 2000.]]Google ScholarGoogle Scholar
  18. Benjamin Pierce, editor. Advanced Topics in Types and Programming Languages. The MIT Press, Cambridge, MA, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Francois Pottier and Didier Remy. The Essence of ML Type Inference, pages 389--489. In Pierce {18}, 2005.]]Google ScholarGoogle Scholar
  20. Olin Shivers. Control-Flow Analysis of Higher-Order Languages, or Taming Lambda. PhD thesis, School of Computer Science, Carnegie Mellon University, Pittsburgh, Pennsylvania, May 1991. Technical Report CMU-CS-91-145.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Olin Shivers. The anatomy of a loop: a story of scope and control. In Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming (ICFP 2005), pages 2--14, Tallinn, Estonia, September 2005. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Randall B. Smith and David Ungar. Programming as an experience: The inspiration for Self. In ECOOP '95: Proceedings of the 9th European Conference on Object-Oriented Programming, pages 303--330, London, UK, 1995. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Walid Taha and Tim Sheard. Multi-stage programming with explicit annotations. In PEPM '97: Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, pages 203--217, New York, NY, USA, 1997. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. David Ungar and Randall B. Smith. Self: The power of simplicity. In OOPSLA '87: Conference proceedings on Object-oriented programming systems, languages and applications, pages 227--242, New York, NY, USA, 1987. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Dale Vaillancourt. ACL2 in DrScheme. http://www.ccs.neu.edu/home/dalev/acl2-drscheme/.]]Google ScholarGoogle Scholar
  26. Mitchell Wand. Complete type inference for simple objects. In Proceedings of the IEEE Symposium on Logic in Computer Science, June 1987.]]Google ScholarGoogle Scholar
  27. Daniel Weise and Roger Crew. Programmable syntax macros. SIGPLAN Not., 28(6):156--165, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Eric Van Wyk, Oege de Moor, Kevin Backhouse, and Paul Kwiatkowski. Forwarding in attribute grammars for modular language design. In CC '02:Proceedings of the 11th International Conference on Compiler Construction, pages 128--142, London, UK, 2002. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Static analysis for syntax objects

                        Recommendations

                        Comments

                        Login options

                        Check if you have access through your login credentials or your institution to get full access on this article.

                        Sign in

                        PDF Format

                        View or Download as a PDF file.

                        PDF

                        eReader

                        View online with eReader.

                        eReader
                        About Cookies On This Site

                        We use cookies to ensure that we give you the best experience on our website.

                        Learn more

                        Got it!