Skip to main content

CoffeeStrainer: Statically-Checked Constraints on the Definition and Use of Types in Java

  • Conference paper
  • First Online:
Software Engineering — ESEC/FSE ’99 (ESEC 1999, SIGSOFT FSE 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1687))

Abstract

Usually, programming languages are used according to conventions and rules. Although general rules can be enforced by lint-like tools, there is a large class of rules that cannot be built into such tools because they result from particular design decisions or the reuse of existing software. This paper presents a system, called CoffeeStrainer, that statically checks programmer-specified constraints on Java programs. Unlike previous approaches, which only support constraints that apply to definitions of types, CoffeeStrainer additionally supports a second class of constraints which apply to all uses of a type. Both classes of constraints play an important role for object-oriented class libraries and frameworks, which often make assumptions on their correct use.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. B. Bokowski and A. Spiegel. Barat — a front-end for Java. Technical Report TR-B-98-09, Freie Universität Berlin, Institut für Informatik, December 1998.

    Google Scholar 

  2. A. Chowdhury and S. Meyers. Facilitating software maintenance by automated detection of constraint violations. In Proceedings of the 1993 Conference on Software Maintenance, pages 262–71, Que., Canada, 27–30 September 1993. IEEE.

    Google Scholar 

  3. R. F. Crew. ASTLOG: A language for examining abstract syntax trees. In Proceedings of the Conference on Domain-Specific Languages (DSL-97), pages 229–242, Berkeley, October 15–17 1997. USENIX Association.

    Google Scholar 

  4. P. T. Devanbu. GENOA — A customizable, language-and front-end independent code analyzer. In Proceedings of the 14th International Conference on Software Engineering, pages 307–317, May 1992.

    Google Scholar 

  5. C. K. Duby, S. Meyers, and S. P. Reiss. CCEL: A metalanguage for C++. In USENIX C++ Technical Conference Proceedings, pages 99–115, Portland, OR, 10–13 August 1992. USENIX Assoc. Berkeley, CA, USA.

    Google Scholar 

  6. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns Elements of Reusable Object-Oriented Software. Addison-Wesley, Massachusetts, 1995.

    MATH  Google Scholar 

  7. S. C. Johnson. Lint, a C program checker. Computing Science TR, 65, December 1977.

    Google Scholar 

  8. N. Klarlund, J. Koistinen, and M. I. Schwartzbach. Formal design constraints. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, volume 31, 10 of ACM SIGPLAN Notices, pages 370–383, New York, October 6–10 1996. ACM Press.

    Google Scholar 

  9. N. H. Minsky. Law-governed regularities in object systems, part 1: An abstract model. Theory and Practice of Object Sytems, 2(4):283–301, 1996.

    Article  Google Scholar 

  10. N. H. Minsky and P. Pratim Pal. Law-governed regularities in object systems, part 2: A concrete implementation. Theory and Practice of Object Sytems, 3(2):87–101, 1997.

    Article  Google Scholar 

  11. W. Pree. Design Patterns for Object-Oriented Development. Addison-Wesley, 1995.

    Google Scholar 

  12. P. Steyaert, C. Lucas, K. Mens, and T. D’Hondt. Reuse contracts: Managing the evolution of reusable assets. In Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, volume 31, 10 of ACM SIGPLAN Notices, pages 268–285, New York, October 6–10 1996. ACM Press.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bokowski, B. (1999). CoffeeStrainer: Statically-Checked Constraints on the Definition and Use of Types in Java. In: Nierstrasz, O., Lemoine, M. (eds) Software Engineering — ESEC/FSE ’99. ESEC SIGSOFT FSE 1999 1999. Lecture Notes in Computer Science, vol 1687. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48166-4_22

Download citation

  • DOI: https://doi.org/10.1007/3-540-48166-4_22

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66538-0

  • Online ISBN: 978-3-540-48166-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics