skip to main content
10.1145/2695664.2696012acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
short-paper

Meta-programming with well-typed code analysis

Published:13 April 2015Publication History

ABSTRACT

Structure-analyzing metaprograms remain largely type-unsafe. In programming languages that support meta-programming, the type system is not strong enough to guarantee that well-typed metaprograms produce only well-typed programs. Banning facilities for code analysis from the meta-programming toolbox in order to achieve type soundness, robs programmers of useful tools such as ability to specify powerful code transformations. We present code pattern types, types that reason about the structure of programs through pattern matching and supports type safe code analysis.

References

  1. G. Dos Reis. A system for axiomatic programming. In Intelligent Computer Mathematics, CICM 2012, pages 295--305. Springer Berlin Heidelberg, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. V. Gapeyev, M. Y. Levin, and B. C. Pierce. Recursive subtyping revealed. J. Funct. Program., 12(6):511--548, Nov. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Jim and J. Palsberg. Type inference in systems of recursive types with subtyping. Manuscript, 1997.Google ScholarGoogle Scholar
  4. G. Mainland. Explicitly heterogeneous metaprogramming with metahaskell. In Proceedings of the 17th ACM SIGPLAN International Conference on Functional Programming, ICFP '12, pages 311--322, New York, NY, USA, 2012. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. T. Sheard. Accomplishments and research challenges in meta-programming. In In 2nd Int. Workshop on Semantics, Applications, and Implementation of Program Generation, LNCS 2196, pages 2--44. Springer-Verlag, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. W. Taha and T. Sheard. Multi-stage programming with explicit annotations. In Proceedings of the 1997 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation, PEPM '97, pages 203--217, New York, NY, USA, 1997. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Meta-programming with well-typed code analysis

    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
    • Published in

      cover image ACM Conferences
      SAC '15: Proceedings of the 30th Annual ACM Symposium on Applied Computing
      April 2015
      2418 pages
      ISBN:9781450331968
      DOI:10.1145/2695664

      Copyright © 2015 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 13 April 2015

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • short-paper

      Acceptance Rates

      SAC '15 Paper Acceptance Rate291of1,211submissions,24%Overall Acceptance Rate1,650of6,669submissions,25%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader