Abstract
Previous work on software contracts assumes fixed and statically known boundaries between the parties to a contract. Implementations of contract monitoring systems rely on this assumption to explain the nature of contract violations and to assign blame to violators. In this paper, we explain how to implement arbitrary, nested, and dynamic contract boundaries with two examples. First, we add nestable contract regions to a static, first-order module system. Second, we show that even a dynamic, higher-order, and hierarchical module system can be equipped with software contracts that support precise blame assignment.
This research was partially supported by the US Air Force Office of Scientific Research and the National Science Foundation.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Flatt, M., et al.: PLT Scheme. Reference Manual PLT-TR2009-reference-v4.2.1., PLT Scheme Inc. (January 2009), http://plt-scheme.org/techreports/
Beugnard, A., Jézéquel, J.M., Plouzeau, N., Watkins, D.: Making components contract aware. IEEE Software, 38–45 (June 1999)
Carrillo-Castellon, M., Garcia-Molina, J., Pimentel, E., Repiso, I.: Design by contract in Smalltalk. Journal of Object-Oriented Programming 7(9), 23–28 (1996)
Duncan, A., Hölzle, U.: Adding contracts to Java with Handshake. Technical Report TRCS98-32, The University of California at Santa Barbara (December 1998)
Edwards, S., Shakir, G., Sitaraman, M., Weide, B., Hollingsworth, J.: A framework for detecting interface violations in component-based software. In: Proceedings of the Fifth International Conference on Software Reuse, pp. 46–55. IEEE, Los Alamitos (June 1998)
Helm, R., Holland, I.M., Gangopadhyay, D.: Contracts: specifying behaviorial compositions in object-oriented systems. In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications, pp. 169–180 (1990)
Kim, M., Kannan, S., Lee, I., Sokolsky, O., Viswanathan, M.: Java-MaC: a run-time assurance tool for Java. Electronic Notes in Theoretical Computer Science 55(2), 218–235 (2001)
Kramer, R.: iContract: the Java design by contract tool. In: Proceedings of Technology of Object-Oriented Languages and Systems, pp. 295–307 (August 1998)
Karaorman, M., Hölzle, U., Bruno, J.: jContractor: a reflective Java library to support design by contract. In: Cointe, P. (ed.) Reflection 1999. LNCS, vol. 1616, pp. 175–196. Springer, Heidelberg (1999)
Leavens, G.T., Leino, K.R.M., Poll, E., Ruby, C., Jacobs, B.: JML: notations and tools supporting detailed design in Java. In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications, Companion, pp. 105–106 (2000)
Luckham, D.C.: Programming with Specifications: An Introduction to Anna, a Language for Specifying ADA Programs. Springer, Heidelberg (1990)
Microsoft Corporation: Microsoft C# Language Specifications. Microsoft Press (2001)
Meyer, B.: Applying design by contract. IEEE Computer 25(10), 40–51 (1992)
Weck, W.: Inheritance using contracts and object composition. In: Proceedings of the Workshop on Components-Oriented Programming, pp. 384–388 (1997)
Gomes, B., Stoutamire, D., Vaysman, B., Klawitter, H.: A Language Manual for Sather 1.1 (August 1996)
Plösch, R., Pichler, J.: Contracts: from analysis to C++ implementation. In: Proceedings of Technology of Object-Oriented Languages and Systems, pp. 248–257 (August 1999)
Ruby, C., Leavens, G.T.: Safely creating correct subclasses without seeing superclass code. In: Proceedings of Object-Oriented Programming, Systems, Languages, and Applications, pp. 208–228 (October 2000)
Findler, R.B., Felleisen, M.: Contracts for higher-order functions. In: Proceedings of the International Conference on Functional Programming, pp. 48–59 (October 2002)
Owens, S., Flatt, M.: From structures and functors to modules and units. In: Proceedings of the International Conference on Functional Programming, pp. 87–98 (September 2006)
Flatt, M., Felleisen, M.: Units: Cool modules for HOT languages. In: Proceedings of Programming Language Design and Implementation, pp. 236–248 (June 1998)
Strickland, T.S., Felleisen, M.: Contracts for first-class modules. In: Proceedings of the Fifth Dynamic Languages Symposium, pp. 27–38 (October 2009)
Szyperski, C.: Component Software. Addison-Wesley, Reading (1997)
Flatt, M.: Composable and compilable macros: You want it when?. In: Proceedings of the International Conference on Functional Programming, pp. 72–83 (October 2002)
Culpepper, R., Tobin-Hochstadt, S., Flatt, M.: Advanced macrology and the implementation of Typed Scheme. In: Proceedings of the Scheme Workshop, Université Laval Technical Report DIUL-RT-0701, pp. 1–14 (September 2007)
Leroy, X.: Manifest types, modules, and separate compilation. In: Proceedings of Principles of Programming Languages, pp. 109–122 (January 1994)
Harper, R., Lillibridge, M.: A type-theoretic approach to higher-order modules with sharing. In: Proceedings of Principles of Programming Languages, pp. 123–137 (January 1994)
Flatt, M., Findler, R.B., Felleisen, M.: Scheme with classes, mixins, and traits. In: Proceedings of the Asian Symposium on Programming Languages and Systems, pp. 270–289 (November 2006)
Schärli, N., Ducasse, S., Nierstrasz, O., Black, A.: Traits: Composable units of behavior. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 248–274. Springer, Heidelberg (2003)
Felleisen, M., Findler, R.B., Flatt, M., Krishnamurthi, S.: A functional i/o system or, fun for freshman kids. In: Proceedings of the International Conference on Functional Programming, pp. 47–58 (October 2009)
Findler, R.B., Blume, M.: Contracts as pairs of projections. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 226–241. Springer, Heidelberg (2006)
Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Communications of the ACM 15, 1053–1058 (1972)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Strickland, T.S., Felleisen, M. (2010). Nested and Dynamic Contract Boundaries. In: Morazán, M.T., Scholz, SB. (eds) Implementation and Application of Functional Languages. IFL 2009. Lecture Notes in Computer Science, vol 6041. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-16478-1_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-16478-1_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-16477-4
Online ISBN: 978-3-642-16478-1
eBook Packages: Computer ScienceComputer Science (R0)