Specifying Reusable Components

  • Nadia Polikarpova
  • Carlo A. Furia
  • Bertrand Meyer
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6217)


Reusable software components need expressive specifications. This paper outlines a rigorous foundation of model − basedcontracts, a method to equip classes with strong contracts that support accurate design, implementation, and formal verification of reusable components. Model-based contracts conservatively extend the classic Design by Contract approach with a notion of model, which underpins the precise definitions of such concepts as abstract object equivalence and specification completeness. Experiments applying model-based contracts to libraries of data structures suggest that the method enables accurate specification of practical software.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abrial, J.-R.: The B-book. Cambridge University Press, Cambridge (1996)MATHCrossRefGoogle Scholar
  2. 2.
    Barnett, M., DeLine, R., Fähndrich, M., Jacobs, B., Leino, K.R.M., Schulte, W., Venter, H.: The Spec# programming system: Challenges and directions. In: Meyer, B., Woodcock, J. (eds.) VSTTE 2005. LNCS, vol. 4171, pp. 144–152. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  3. 3.
    Chalin, P.: Are practitioners writing contracts? In: Rigorous Development of Complex Fault-Tolerant Systems, pp. 100–113 (2006)Google Scholar
  4. 4.
  5. 5.
    Gougen, J.A., Thatcher, J.W., Wagner, E.G.: An initial algebra approach to the specification, correctness, and implementation of abstract data types. In: Current Trends in Programming Methodology, pp. 80–149. Prentice-Hall, Englewood Cliffs (1978)Google Scholar
  6. 6.
    Guttag, J.V., Horning, J.J.: The algebraic specification of abstract data types. Acta Inf. 10, 27–52 (1978)MATHMathSciNetGoogle Scholar
  7. 7.
    Hoare, C.A.R.: Proof of correctness of data representations. Acta Inf. 1, 271–281 (1972)MATHCrossRefGoogle Scholar
  8. 8.
    Leavens, G.T., Cheon, Y., Clifton, C., Ruby, C., Cok, D.R.: How the design of JML accommodates both runtime assertion checking and formal verification. Sci. Comput. Program. 55(1-3), 185–208 (2005)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Meyer, B.: Object-oriented software construction, 2nd edn. Prentice Hall, Englewood Cliffs (1997)MATHGoogle Scholar
  10. 10.
    Meyer, B., Fiva, A., Ciupa, I., Leitner, A., Wei, Y., Stapf, E.: Programs that test themselves. Computer 42(9), 46–55 (2009)CrossRefGoogle Scholar
  11. 11.
    Polikarpova, N., Furia, C.A., Meyer, B.: Specifying reusable components, Extended version, http://arxiv.org/abs/1003.5777
  12. 12.
    Schoeller, B.: Making classes provable through contracts, models and frames. PhD thesis, ETH Zurich (2007)Google Scholar
  13. 13.
    Schoeller, B., Widmer, T., Meyer, B.: Making specifications complete through models. In: Architecting Systems with Trustworthy Components, pp. 48–70 (2004)Google Scholar
  14. 14.
  15. 15.
    Zee, K., Kuncak, V., Rinard, M.C.: Full functional verification of linked data structures. In: PLDI 2008, pp. 349–361. ACM, New York (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Nadia Polikarpova
    • 1
  • Carlo A. Furia
    • 1
  • Bertrand Meyer
    • 1
  1. 1.Chair of Software EngineeringETH ZurichSwitzerland

Personalised recommendations