skip to main content
article

A framework for implementing pluggable type systems

Published:16 October 2006Publication History
Skip Abstract Section

Abstract

Pluggable types have been proposed to support multiple type systems in the same programming language. We have designed and implemented JavaCOP, a program constraint system for implementing practical pluggable type systems for Java. JavaCOP enforces user-defined typing constraints written in a declarative and expressive rule language. We have validated our design by (re)implementing a range of type systems and program checkers. By using a program constraint system to implement pluggable types, programmers are able to check that their programs will operate correctly in restricted environments, adhere to strict programming rules, avoid null pointer errors or scoped memory exceptions, and meet style guidelines, while programming language researchers can easily experiment with novel type systems.

References

  1. C. Andreae. JavaCOP - user-defined constraints on Java programs. Honours Report, Computer Science, Victoria University of Wellington, 2005.]]Google ScholarGoogle Scholar
  2. C. Andreae, Y. Coady, C. Gibba, J. Noble, J. Vitek, and T. Zhao. STARS: Scoped types and aspects for real-time systems. In Proceedings of ECOOP 06, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. K. Arnold, J. Gosling, and D. Holmes. The Java Programming Language Third Edition. Addison-Wesley, Reading, MA, third edition, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Ball and S. K. Rajamani. The SLAM project: Debugging system software via static analysis. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 1--3. ACM Press, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Birka and M. D. Ernst. A practical type system and language for reference immutability. In OOPSLA Proceedings, pages 35--49, New York, NY, USA, 2004. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Bloch. A metadata facility for the Java programming language. Technical Report JSR 175, www.jcp.org, 2002.]]Google ScholarGoogle Scholar
  7. J. Boyland, J. Noble, and W. Retert. Capabilities for sharing: A generalisation of uniqueness and read-only. In ECOOP Proceedings, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G. Bracha. Pluggable type systems. In OOPSLA Workshop on Revival of Dynamic Languages, 2004.]]Google ScholarGoogle Scholar
  9. G. Bracha and D. Ungar. Mirrors: Design principles for meta-level facilities of object-oriented programming languages. In OOPSLA Proceedings, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Cartwright and M. Fagan. Soft typing. In PLDI Proceedings, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Checkstyle Developers. Checkstyle. texttthttp://-checkstyle.-sourceforge.-net, 2005.]]Google ScholarGoogle Scholar
  12. S. Chiba. Load-time structural reflection in Java. In ECOOP Proceedings, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. R. Chidamber and C. F. Kemerer. Towards a metrics suite for object oriented design. In OOPSLA Proceedings, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. B. Chin, S. Markstrum, and T. Millstein. Semantic type qualifiers. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2005), June 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. B. Chin, S. Markstrum, T. Millstein, and J. Palsberg. Inference of user-defined type qualifiers and qualifier rules. In European Symposium on Programming, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. G. Clarke, J. M. Potter, and J. Noble. Ownership types for flexible alias protection. In OOPSLA Proceedings, pages 48--64. ACM Press, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T. Cohen, J. Y. Gil, and I. Maman. JTL - the Java tools language. In OOPSLA Proceedings, Oct. 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Copeland. PMD Applied. Centennial Books, Nov. 2005.]]Google ScholarGoogle Scholar
  19. R. F. Crew. ASTLOG: a language for examining abstract syntax trees. In Proceedings of the USENIX Conference on Domain-Specific Languages, Santa Barbara, Oct. 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Darcy. Pluggable annotation processing API, 2005.]]Google ScholarGoogle Scholar
  21. L. DeMichiel. Enterprise JavaBeans Specification, Version 3.0. SUN Microsystems, 2004.]]Google ScholarGoogle Scholar
  22. C. K. Duby, S. Meyers, and S. P. Reiss. CCEL: A metalanguage for C++. In C++ Conference, pages 99--116, 1992.]]Google ScholarGoogle Scholar
  23. M. Eichberg, M. Mezini, K. Ostermann, and T. Schäfer. Xirc: A kernel for cross-artifact information engineering in software development environments. In Working Conference on Reverse Engineering, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Eichberg, T. Schäfer, and M. Mezini. Using annotations to check structural properties of classes. In FASE, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. T. Ekman and G. Hedin. Rewritable reference attributed grammars. In ECOOP Proceedings, 2004.]]Google ScholarGoogle ScholarCross RefCross Ref
  26. M. Fahndrich and K. R. M. Leino. Declaring and checking non-null types in an object-oriented language. In OOPSLA Proceedings, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C. Flanagan and S. N. Freund. Type-based race detection for Java. In Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pages 219--232. ACM Press, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. J. S. Foster, M. Fähndrich, and A. Aiken. A Theory of Type Qualifiers. In Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 192--203, Atlanta, Georgia, May 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. S. Foster, T. Terauchi, and A. Aiken. Flow-sensitive type qualifiers. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pages 1--12. ACM Press, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. C. Gibbs and Y. Coady. Making real-time abstractions concrete with aspects. In The 3rd Workshop on Java Technologies for Real-time and Embedded Systems, 2005. Held in conjunction with OOPSLA 2005.]]Google ScholarGoogle Scholar
  31. J. Y. Gil and I. Maman. Micro patterns in Java code. In OOPSLA Proceedings, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification Second Edition. The Java Series. Addison-Wesley, Boston, Mass., 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. E. Hajiyev, M. Verbaere, and O. de Moor. Codequest: Scalable source code queries with datalog. In ECOOP Proceedings, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. E. Hajiyev, M. Verbaere, O. de Moor, and K. de Volder. Codequest: Querying source code with datalog. In OOPSLA Companion, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. S. Hallem, B. Chelf, Y. Xie, and D. Engler. A system and language for building system-specific, static analyses. In PLDI Proceedings, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. J. Hogg. Islands: aliasing protection in object-oriented languages. In OOPSLA Proceedings, pages 271--285. ACM Press, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. D. Hovemeyer and W. Pugh. Finding bugs is easy. In OOPSLA Companion, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. A. Igarashi, B. C. Pierce, and P. Wadler. Featherweight Java: a minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems, 23(3):396--450, May 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. D. Janzen and K. D. Volder. Navigating and querying code without getting lost. In AOSD Proceedings, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. S. Marlow and P. Wadler. A practical subtyping system for Erlang. In ICFP Proceedings, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. N. Nystrom, M. R. Clarkson, and A. C. Myers. Polyglot: An extensible compiler framework for Java. In Proceedings of CC 2003: 12'th International Conference on Compiler Construction. Springer-Verlag, Apr. 2003.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. N. Nystrom, X. Qi, and A. C. Myers. J&: software composition with nested intersection. In OOPSLA Proceedings, 2006.]]Google ScholarGoogle Scholar
  43. OVM/J Consortium. The open virtual machine project. http://www.ovmj.org/, 2004.]]Google ScholarGoogle Scholar
  44. A. Potanin, J. Noble, D. Clarke, and R. Biddle. Generic ownership for generic Java. In OOPSLA Proceedings, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. M. Shomrat and A. Yehudai. Obvious or not?: regulating architectural decisions using aspect-oriented programming. In AOSD Proceedings, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. M. Tatsubori, S. Chiba, M.-O. Killijiand, and K. Itano. OpenJava: A class-based macro system for Java. In Reflection and Software Engineering, volume 1826 of LNCS, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. M. S. Tschantz and M. D. Ernst. Javari: adding reference immutability to Java. In OOPSLA Proceedings, pages 211--230, New York, NY, USA, 2005. ACM Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. M. Verbaere, R. Ettinger, and O. de Moor. JunGL: a scripting language for refactoring. In Proceedings of the 28th International Conference on Software Engineering (ICSE), 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. J. Vitek and B. Bokowski. Confined types. In OOPSLA Proceedings, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. A. K. Wright and R. Cartwright. A practical soft type system for scheme. TOPLAS, 19(1):87--152, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. T. Zhao, J. Noble, and J. Vitek. Scoped types for real-time Java. In RTSS Proceedings, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A framework for implementing pluggable type systems

      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

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 41, Issue 10
        Proceedings of the 2006 OOPSLA Conference
        October 2006
        480 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1167515
        Issue’s Table of Contents
        • cover image ACM Conferences
          OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
          October 2006
          514 pages
          ISBN:1595933484
          DOI:10.1145/1167473

        Copyright © 2006 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 16 October 2006

        Check for updates

        Qualifiers

        • article

      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!