Advertisement

Exception Handling with Multi-Exit Statements

  • Ralph-Johan Back
Part of the Informatik-Fachberichte book series (INFORMATIK, volume 25)

Abstract

A new language construct, the multi-exit statement, is proposed. This provides a clean way of handling exceptional situations in programs, and makes the programs easy to prove correct. The multi-exit statement is intended to support the program construction technique recently proposed by John REYNOLDS and Martin van EMDEN which is based on considering programs as state transition diagrams. Proof rules for showing the total correctness of multi-exit statements will be given which provide a new axiomatisation of goto-statements. This axiomatisation is based on the symbolic execution technique. It conforms closely to the intuition of the programmer making manual proofs of the program correctness easy to perform.

Zusammenfassung

Ein neues Sprachkonstrukt, die Multi-exit-Anweisung, wird vorgeschlagen. Es erlaubt, die Behandlung von Ausnahmesituationen in Programmen in einer sauberen Weise vorzunehmen, und macht die Korrektheit von Programmen leicht beweisbar. Es ist beabsichtigt, mit der Multi-exit-Anweisung die kürzlich von John REYNOLDS und Martin van EMDEN vorgeschlagene Programmkonstruktionstechnik zu unterstützen, die darauf beruht, daß Programme als Zustandsübergangsdiagramme angesehen werden. Es werden Beweisregeln zum Zeigen der totalen Korrektheit von Multi-exit-Anweisungen angegeben, die eine neue Art der Axiomatisierung von Sprunganweisungen erlauben. Diese Art der Axiomatisierung beruht auf der Technik der symbolischen Programmausführung. Sie entspricht sehr stark der Intuition des Programmierers, wodurch es für einen Programmierer leicht wird, manuell Korrektheitsbeweise zu führen.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    ARBIB, M.A. & ALAGIC, S., Proof rules for goto’s, Acta Informatica 11, 139–148, 1979.CrossRefGoogle Scholar
  2. 2.
    BACK, R.J.R., Program construction by situation analysis, Computing Centre of University of Helsinki, Research report 6, 1978.Google Scholar
  3. 3.
    BACK, R.J.R., & KOSKENNIEMI, K., Constructing verifiable programs: a language proposal, in preparation.Google Scholar
  4. 4.
    BACK, R.J.R., & KOSKENNIEMI, K., Constructing verifiable programs: a case study, in preparation.Google Scholar
  5. 5.
    de BRUIN, A., Goto statements: semantics and deduction systems (preprint). Report IW 74/79, Mathematisch Centrum, 1979.zbMATHGoogle Scholar
  6. 6.
    CLINT, M. & HOARE, C.A.R., Program proving: jumps and functions. Acta Informatica 1, 214–224, 1972.CrossRefGoogle Scholar
  7. 7.
    van EMDEN, M.H., Programming with verification conditions, IEEE Transactions on Software Engineering, SE-5,2, 1979.Google Scholar
  8. 8.
    GOODENOUGH, J.B., Exception handling: issues and a proposed notation. Comm. of ACM, 18,12,683–696, 1975.MathSciNetCrossRefGoogle Scholar
  9. 9.
    HANTLER, S.L. & KING, J.C., An introduction to proving the correctness of programs, Computing Surveys 8, 3, 331–353, 1976.MathSciNetzbMATHCrossRefGoogle Scholar
  10. 10.
    HEHNER, E., Do considered od: a contribution to the programming calculus, Acta Information 11, 287–304, 1979.zbMATHCrossRefGoogle Scholar
  11. 11.
    ICHBIAH, J.D & al, Rationale for the design of the ADA programming language, Sigplan Notices 14, 6, 1979.Google Scholar
  12. 12.
    KOWALTOWSKI, T., Axiomatic approach to side effects and general jumps, Acta Informatica 7, 357–360, 1977.MathSciNetzbMATHCrossRefGoogle Scholar
  13. 13.
    LEVIN, R., Program structures for exceptional condition handling, Dept. of Computer Science, Carnegie-Mellon University, 1977.Google Scholar
  14. 14.
    REYNOLDS, J.C., Programming with transition diagrams, In Gries, D. (ed.) Programming Methodology, Springer Verlag, Berlin, 1978.Google Scholar
  15. 15.
    WANG, A., An axiomatic basis for proving total correctness of goto-programs, BIT 16, 88–102, 1976.zbMATHCrossRefGoogle Scholar
  16. 16.
    WIRTH, N., Modula-2, Institut fur Informatik, ETH, Zurich, 1979.Google Scholar
  17. 17.
    ZAHN, C.T., A control structure for natural top-down structured programming, Symposium on Programming Languages, Paris 1974.Google Scholar

Copyright information

© Springer-Verlag Berlin · Heidelberg 1980

Authors and Affiliations

  • Ralph-Johan Back
    • 1
  1. 1.Computing CentreUniversity of HelsinkiHelsinki 25Finland

Personalised recommendations