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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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.
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.
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.
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.
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.
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns Elements of Reusable Object-Oriented Software. Addison-Wesley, Massachusetts, 1995.
S. C. Johnson. Lint, a C program checker. Computing Science TR, 65, December 1977.
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.
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.
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.
W. Pree. Design Patterns for Object-Oriented Development. Addison-Wesley, 1995.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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