Advertisement

An Overview of Larch/C++: Behavioral Specifications for C++ Modules

  • Gary T. Leavens
Part of the The Springer International Series in Engineering and Computer Science book series (SECS, volume 371)

Abstract

An overview of the behavioral interface specification language Larch/C++ is presented. The features of Larch/C++ used to specify the behavior of C++ functions and classes, including subclasses, are described, with examples. Comparisons are made with other object-oriented specification languages. An innovation in Larch/C++ is the use of examples in function specifications.

Keywords

Abstract Model Interface Specification Simulation Function Type Vector Abstract Data Type 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [A87]
    America, P. Inheritance and subtyping in a parallel object-oriented language. In Bezivin, J. et al., editors, EC OOP’ 81, European Conference on Object-Oriented Programming, Paris, France, pages 234–242, New York, N.Y., June 1987. Springer-Verlag. Lecture Notes in Computer Science, Volume 276.Google Scholar
  2. [A91]
    America, P. Designing an object-oriented programming language with behavioural subtyping. In de Bakker, J. W., de Roever, W. P., and Rozenberg, G., editors, Foundations of Object-Oriented Languages, REX School/Workshop, Noordwijkerhout, The Netherlands, May/June 1990, volume 489 of Lecture Notes in Computer Science, pages 60–90. Springer-Verlag, New York, N.Y., 1991.Google Scholar
  3. [AG91]
    Alencar, A. J. and Goguen, J. A. OOZE: An object oriented Z environment. In America, P., editor, ECOOP’ 91: European Conference on Object Oriented Programming, volume 512 of Lecture Notes in Computer Science, pages 180–199. Springer-Verlag, New York, N.Y., 1991.Google Scholar
  4. [AG92]
    Alencar, A. J. and Goguen, J. A. OOZE. In Stepney et al. [SBC92], pages 79–94.Google Scholar
  5. [AG94]
    Alencar, A. J. and Goguen, J. A. Specification in OOZE with examples. In Lano and Haughton [LH94a], pages 158–183.Google Scholar
  6. [BG82]
    Burstall, R. M. and Goguen, J. A. Algebras, theories and freeness: An introduction for computer scientists. In Broy, M. and Schmidt, G., editors, Theoretical Foundations of Programming Methodology: Lecture Notes of an International Summer School directed by F. L. Bauer, E. W. Dijkstra and C. A. R. Hoare, volume 91 of series C, pages 329–348. D. Ridel, Dordrecht, Holland, 1982.Google Scholar
  7. [BMR95]
    Borgida, A., Mylopoulos, J., and Reiter, R. On the frame problem in procedure specifications. IEEE Transactions on Software Engineering, 21(10):785–798, October 1995.CrossRefGoogle Scholar
  8. [C95]
    Chalin, P. On the Language Design and Semantic Foundation of LCL, a Larch/C Interface Specification Language. PhD thesis, Concordia University, 1455 de Maisonneuve Blvd. West, Montreal, Qquebec, Canada, October 1995. Available as CU/DCS TR 95-12.Google Scholar
  9. [CGR96]
    Chalin, P., Grogono, P., and Radhakrishnan, T. Identification of and solutions to shortcomings of LCL, a Larch/C interface specification language. In Proceedings of the FME’96 Symposium. FME’96: Industrial Benefit and Advances in Formal Methods, Formal Methods Europe., 1996. To appear. An earlier version of this paper is available as Concordia University, Department of Computer Science TR 95-09.Google Scholar
  10. [CL94]
    Cheon, Y. and Leavens, G. T. The Larch/Smalltalk interface specification language. A CM Transactions on Software Engineering and Methodology, 3(3):221–253, July 1994.CrossRefGoogle Scholar
  11. [CR92]
    Cusack, E. and Rafsanjani, G. H. B. ZEST. In Stepney et al. [SBC92], pages 113–126.Google Scholar
  12. [DL96]
    Dhara, K. K. and Leavens, G. T. Forcing behavioral subtyping through specification inheritance. In Proceedings of the 18th International Conference on Software Engineering, Berlin, Germany, pages 258–267. IEEE Computer Society Press, March 1996.Google Scholar
  13. [ES90]
    Ellis, M. A. and Stroustrup, B. The Annotated C++ Reference Manual. Addison-Wesley Publishing Co., Reading, Mass., 1990.Google Scholar
  14. [FGJM85]
    Futatsugi, K., Goguen, J. A., Jouannaud, J.-P., and Meseguer, J. Principles of OBJ2. In Conference Record of the Twelfth Annual ACM Symposium on Principles of Programming Languages, pages 52–66. ACM, January 1985.Google Scholar
  15. [GHG+93]_Guttag, J. V., Horning, J. J., Garland, S., Jones, K., Modet, A., and Wing, J. Larch: Languages and Tools for Formal Specification. Springer-Verlag, New York, N.Y., 1993.MATHGoogle Scholar
  16. [GMP90]
    Guaspari, D., Marceau, C, and Polak, W. Formal verification of Ada programs. IEEE Transactions on Software Engineering, 16(9): 1058–1075, September 1990.CrossRefGoogle Scholar
  17. [GTW78]
    Goguen, J. A., Thatcher, J. W., and Wagner, E. G. An initial algebra approach to the specification, correctness and implementation of abstract data types. In Yeh, R. T., editor, Current Trends in Programming Methodology, volume 4, pages 80–149. Prentice-Hall, Inc., Englewood Cliffs, N.J., 1978.Google Scholar
  18. [H69]
    Hoare, C. A. R. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576–583, October 1969.MATHCrossRefGoogle Scholar
  19. [H72]
    Hoare, C. A. R. Proof of correctness of data representations. Ada Informatica, 1(4):271–281, 1972.MATHCrossRefGoogle Scholar
  20. [H92]
    Hesselink, W. H. Programs, Recursion, and Unbounded Choice, volume 27 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, New York, N.Y., 1992.Google Scholar
  21. [H93]
    Hayes, I., editor. Specification Case Studies. International Series in Computer Science. Prentice-Hall, Inc., second edition, 1993.Google Scholar
  22. [J90]
    Jones, C. B. Systematic Software Development Using VDM. International Series in Computer Science. Prentice Hall, Englewood Cliffs, N.J., second edition, 1990.MATHGoogle Scholar
  23. [L89]
    Lamport, L. A simple approach to specifying concurrent systems. Communications of the ACM, 32(1):32–45, January 1989.CrossRefGoogle Scholar
  24. [L91]
    Leavens, G. T. Modular specification and verification of object-oriented programs. IEEE Software, 8(4):72–80, July 1991.CrossRefGoogle Scholar
  25. [L92]
    Lano, K. C. Z++. In Stepney et al. [SBC92], pages 106–112.Google Scholar
  26. [L94]
    Leavens, G. T. Inheritance of interface specifications (extended abstract). In Proceedings of the Workshop on Interface Definition Languages, volume 29(8) of ACM SIGPLAN Notices, pages 129–138, August 1994.CrossRefGoogle Scholar
  27. [L95]
    Leavens, G. T. Larch/C-f-f Reference Manual. Version 4.1. Available in ftp://ftp.cs.iastate.edu/pub/larchc-h-l-/lcpp.ps.gz or on the world wide web at the URL http://www.cs.iastate.edu/~leavens/larchcH-H-.htrnl, December 1995.
  28. [L96]
    Leavens, G. T. LSL math traits. http://www.cs.iastate.edu/~leavens/Math-traits.html, Jan 1996.
  29. [LG86]
    Liskov, B. and Guttag, J. Abstraction and Specification in Program Development The MIT Press, Cambridge, Mass., 1986.MATHGoogle Scholar
  30. [LH94a]
    Lano, K. and Haughton, H., editors. Object-Oriented Specification Case Studies. The Object-Oriented Series. Prentice Hall, New York, N.Y., 1994.MATHGoogle Scholar
  31. [LH94b]
    Lano, K. and Haughton, H. Specifying a concept-recognition system in Z++. In Lano and Haughton [LH94a], chapter 7, pages 137–157.Google Scholar
  32. [LW90]
    Leavens, G. T. and Weihl, W. E. Reasoning about object-oriented programs that use subtypes (extended abstract). In Meyrowitz, N., editor, OOPSLA ECOOP’ 90 Proceedings, volume 25(10) of ACM SIGPLAN Notices, pages 212–223. ACM, October 1990.Google Scholar
  33. [LW94]
    Liskov, B. and Wing, J. A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems, 16(6):1811–1841, November 1994.CrossRefGoogle Scholar
  34. [LW95]
    Leavens, G. T. and Weihl, W. E. Specification and verification of object-oriented programs using supertype abstraction. Ada Informatica, 32(8):705–778, November 1995.MATHGoogle Scholar
  35. [M94]
    Mitra, S. Object-oriented specification in VDM++. In Lano and Haughton [LH94a], chapter 6, pages 130–136.Google Scholar
  36. [MC92]
    Meira, S. L. and Cavalcanti, A. L. C. MooZ case studies. In Stepney et al. [SBC92], pages 37–58.Google Scholar
  37. [MCS94]
    Meira, S. L., Cavalcanti, A. L. C, and Santos, C. S. The Unix filing system: A MooZ specification. In Lano and Haughton [LH94a], chapter 4, pages 80–109.Google Scholar
  38. [RD94]
    Rose, G. and Duke, R. An Object-Z specification of a mobile phone system. In Lano and Haughton [LH94a], chapter 5, pages 110–129.Google Scholar
  39. [R92]
    Rose, G. Object-Z. In Stepney et al. [SBC92], pages 59–77.Google Scholar
  40. [S89]
    Spivey, J. An introduction to Z and formal specifications. Software Engineering Journal, January 1989.Google Scholar
  41. [S91]
    Stroustrup, B. The C++ Programming Language: Second Edition. Addison-Wesley Publishing Co., Reading, Mass., 1991.Google Scholar
  42. [S92]
    Spivey, J. M. The Z Notation: A Reference Manual International Series in Computer Science. Prentice-Hall, New York, N.Y., second edition, 1992.Google Scholar
  43. [SBC92]
    Stepney, S., Barden, R., and Cooper, D., editors. Object Orientation in Z. Workshops in Computing. Springer-Verlag, Cambridge CB2 1LQ, UK, 1992.Google Scholar
  44. [T94a]
    Tan, Y. M. Formal specification techniques for promoting software modularity, enhancing documentation, and testing specifications. Technical Report 619, Massachusetts Institute of Technology, Laboratory for Computer Science, 545 Technology Square, Cambridge, Mass., June 1994.Google Scholar
  45. [T94b]
    Tan, Y. M. Interface language for supporting programming styles. A CM SIGPLAN Notices, 29(8):74–83, August 1994. Proceedings of the Workshop on Interface Definition Languages.CrossRefGoogle Scholar
  46. [T95]
    Tan, Y. M. Formal Specification Techniques for Engineering Modular C Programs, volume 1 of Kluwer International Series in Software Engineering. Kluwer Academic Publishers, Boston, 1995.Google Scholar
  47. [W83]
    Wing, J. M. A two-tiered approach to specifying programs. Technical Report TR-299, Massachusetts Institute of Technology, Laboratory for Computer Science, 1983.Google Scholar
  48. [W87]
    Wing, J. M. Writing Larch interface language specifications. A CM Transactions on Programming Languages and Systems, 9(1):1–24, January 1987.MATHCrossRefGoogle Scholar
  49. [W91]
    Wills, A. Capsules and types in Fresco: Program validation in Smalltalk. In America, P., editor, ECOOP’ 91: European Conference on Object Oriented Programming, volume 512 of Lecture Notes in Computer Science, pages 59–76. Springer-Verlag, New York, N.Y., 1991.Google Scholar
  50. [W92a]
    Wills, A. Refinement in Fresco. In Lano and Houghton [LH94a], chapter 9, pages 184–201.Google Scholar
  51. [W92b]
    Wills, A. Specification in Fresco. In Stepney et al. [SBC92], chapter 11, pages 127–135.Google Scholar

Copyright information

© Kluwer Academic Publishers 1996

Authors and Affiliations

  • Gary T. Leavens
    • 1
  1. 1.Department of Computer ScienceIowa State UniversityAmesUSA

Personalised recommendations