Skip to main content

Executable assertions and separate compilation

  • Conference paper
  • First Online:
Modular Programming Languages (JMLC 1997)

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

Included in the following conference series:

Abstract

The use of executable assertions is widely recognised as a useful programming technique for complex systems. In many cases static analysis of programs allows such assertions to be removed at compile time, thus removing the overhead of the test. The use of interprocedural analysis would often allow a larger number of such tests to be statically removed; intermodular analysis could even improve overall safety of the system. In general, however, such analysis is antithetical to separate compilation and extensible systems.

In this paper we offer a partial solution to this dilemma: We propose that preconditions become part of the interface definition of an encapsulated object. The implementation consequences of this technique are explored.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Diane Corney and John Gough. Type test elimination using typeflow analysis. In Jürg Gutknecht, editor, Proceedings Int. Confr. Programming Languages and System Architectures, volume 782 of Lecture Notes in Computer Science, pages 137–150. Springer Verlag, 1994.

    Google Scholar 

  2. Régis Crelier. Separate Compilation and Module Extension. PhD thesis, Swiss Federal Institute of Technology, Zürich, Switzerland, 1994. Diss. ETH No. 10650.

    Google Scholar 

  3. K John Gough and Herbert Klaeren. Eliminating range checks using static single assignment form. In Proceedings ACSC19, Melbourne, Australia. Australian Computer Science Society, 1996.

    Google Scholar 

  4. Rajiv Gupta. A fresh look at optimizing array bound checking. In Proc. ACM SIGPLAN'90 Confr. Programming Language Design and Implementation, volume 25(6) of SIGPLAN Notices, pages 272–282, 1990.

    Google Scholar 

  5. Rajiv Gupta. Optimizing array bound checks using flow analysis. ACM Letters on Programming Languages and Systems, 2(1–4):135–150, 1993.

    Google Scholar 

  6. ISO. Information Technology — Programming Languages — Modula-2. IS 10154-1. International Standards Organisation, June 1996.

    Google Scholar 

  7. Victoria Markstein, John Cocke, and Peter Markstein. Optimization of range checking. In Proc. of ACM '82 Symposium on Compiler Construction, pages 114–119, 1982.

    Google Scholar 

  8. Bertrand Meyer. Eiffel: The Language. Englewood Cliffs, 1991.

    Google Scholar 

  9. Bertrand Meyer. Applying “Design by Contract”. IEEE Computer, 25(10):40–51, 1992.

    Google Scholar 

  10. QUT. Gardens Point Modula Home Page. http://www.fit.qut.edu.au/CompSci/PLAS/GPM. Information on gardens point compilers, their availability, and documentation.

    Google Scholar 

  11. Rob Strom. Do programmers need seat belts? SIGPLAN Notices, 31(3):6–7, 1996.

    Google Scholar 

  12. N. Wirth and C. A. R. Hoare. A contribution to the development of Algol. Communications of the ACM, 9:413–431, 1966.

    Google Scholar 

  13. Niklaus Wirth. Programming in Modula-2. Springer, 3rd edition, 1985.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hanspeter Mössenböck

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gough, K.J., Klaeren, H. (1997). Executable assertions and separate compilation. In: Mössenböck, H. (eds) Modular Programming Languages. JMLC 1997. Lecture Notes in Computer Science, vol 1204. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-62599-2_29

Download citation

  • DOI: https://doi.org/10.1007/3-540-62599-2_29

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-62599-5

  • Online ISBN: 978-3-540-68328-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics