[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/976571.976573acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Reasoning about recursive procedures with parameters

Published: 26 August 2003 Publication History

Abstract

In this paper we extend the model of program variables from the Refinement Calculus [2] in order to be able to reason more algebraically about recursive procedures with parameters and local variables. We extend the meaning of variable substitution or freeness from the syntax to the semantics of program expressions. We give a predicate transformer semantics to recursive procedures with parameters and prove a refinement rule for introduction of recursive procedure calls. We also prove a Hoare total correctness rule for our recursive procedures. These rules have no side conditions and are easier to apply to programs than the ones in the literature. The theory is built having in mind mechanical verification support using theorem provers like PVS [18] or HOL [11].

References

[1]
R. J. Back and V. Preoteasa. Reasoning about recursive procedures with parameters. Technical Report 500, TUCS - Turku Centre for Computer Science, January 2003.]]
[2]
R. J. Back and J. von Wright. Refinement Calculus. A systematic Introduction. Springer, 1998.]]
[3]
R. J. Back and J. von Wright. Compositional action system refinement. In J. Derrick, E. Boiten, J. Woodcock, and J. von Wright, editors, Electronic Notes in Theoretical Computer Science, volume 70. Elsevier Science Publishers, 2002.]]
[4]
O. Celiku and J. von Wright. Theorem prover support for precondition and correctness calculation. In 4th International Conference on Formal Engineering Methods, volume 2495 of Lecture Notes in Computer Science, pages 299--310. Springer-Verlag, October 2002.]]
[5]
A. Church. A formulation of the simple theory of types. J. Symbolic logic, 5:56--68, 1940.]]
[6]
B. A. Davey and H. A. Priestley. Introduction to lattices and order. Cambridge University Press, New York, second edition, 2002.]]
[7]
E. W. Dijkstra. Guarded commands, nondeterminacy and formal derivation of programs. Comm. ACM, 18(8):453--457, 1975.]]
[8]
E. W. Dijkstra. A discipline of programming. Prentice-Hall Inc., Englewood Cliffs, N.J., 1976. With a foreword by C. A. R. Hoare, Prentice-Hall Series in Automatic Computation.]]
[9]
J. E. Donahue. Complementary definitions of programming language semantics. Springer-Verlag, Berlin, 1976. Lecture Notes in Computer Science, Vol. 42.]]
[10]
M. J. C. Gordon. Mechanizing programming logics in higher-order logic. In Birtwistle, G. M. and Subrahmanyam, P. A., editors, Current Trends in Hardware Verification and Automatic Theorem Proving (Proceedings of the Workshop on Hardware Verification), pages 387--439, Banff, Canada, 1988. Springer-Verlag, Berlin.]]
[11]
M. J. C. Gordon and T. F. Melham, editors. Introduction to HOL. Cambridge University Press, Cambridge, 1993. A theorem proving environment for higher order logic, Appendix B by R. J. Boulton.]]
[12]
W. M. Hesselink. Predicate transformers for recursive procedures with local variables. Formal Aspect of Computing, 11:616--336, 1999.]]
[13]
C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576--580, 1969.]]
[14]
T. Kleymann. Hoare Logic and VDM: Machine-Checked Soundness and Completeness Proofs. PhD thesis, Laboratory for Foundations of Computer Science, University of Edinburgh, 1998.]]
[15]
T. Kleymann. Hoare logic and auxiliary variables. Formal Aspect of Computing, 11:541--566, 1999.]]
[16]
L. Laibinis. Mechanised Formal Reasoning About Modular Programs. PhD dissertation, Turku Centre for Computer Science, April 2000.]]
[17]
C. Morgan. Procedures, parameters, and abstraction: separate concerns. Sci. Comput. Programming, 11(1):17--27, 1988.]]
[18]
S. Owre, N. Shankar, J. M. Rushby, and D. W. J. Stringer-Clavert. PVS Language Reference, 1999.]]
[19]
J. C. Reynolds. The Craft of Programming. Prentice-Hall Inc., London, 1981.]]
[20]
J. C. Reynolds. The essence of ALGOL. In Algorithmic languages (Amsterdam, 1981), pages 345--372. North-Holland, Amsterdam, 1981.]]
[21]
M. Staples. A Mechanised Theory of Refinement. PhD dissertation, Computer Laboratory, University of Cambridge, November 1998.]]
[22]
M. Staples. Representing WP semantics in Isabelle/ZF. In Theorem proving in higher order logics (Nice, 1999), volume 1690 of Lecture Notes in Comput Sci., pages 239--254. Springer, Berlin, 1999.]]
[23]
M. Staples. Interfaces for refining recursion and procedures. Formal Aspect of Computing, 12:372--391, 2000.]]
[24]
A. Tarski. A lattice-theoretical fixpoint theorem and its applications. Pacific J. Math., 5:285--309, 1955.]]
[25]
D. von Oheimb. Hoare logic for mutual recursion and local variables. In C. Pandu Rangan, V. Raman, and R. Ramanujam, editors, Foundations of Software Technology and Theoretical Computer Science, volume 1738 of LNCS, pages 168--180. Springer, 1999.]]

Cited By

View all

Index Terms

  1. Reasoning about recursive procedures with parameters

        Recommendations

        Comments

        Please enable JavaScript to view thecomments powered by Disqus.

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        MERLIN '03: Proceedings of the 2003 ACM SIGPLAN workshop on Mechanized reasoning about languages with variable binding
        August 2003
        97 pages
        ISBN:1581138008
        DOI:10.1145/976571
        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Sponsors

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 26 August 2003

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. Hoare logic
        2. predicate transformer semantics
        3. recursive procedures
        4. refinement calculus

        Qualifiers

        • Article

        Conference

        MERLIN03
        Sponsor:

        Upcoming Conference

        ICFP '25
        ACM SIGPLAN International Conference on Functional Programming
        October 12 - 18, 2025
        Singapore , Singapore

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)2
        • Downloads (Last 6 weeks)0
        Reflects downloads up to 15 Jan 2025

        Other Metrics

        Citations

        Cited By

        View all
        • (2016)Unifying Heterogeneous State-Spaces with LensesTheoretical Aspects of Computing – ICTAC 201610.1007/978-3-319-46750-4_17(295-314)Online publication date: 22-Sep-2016
        • (2013)Higher-Order UTP for a Theory of MethodsUnifying Theories of Programming10.1007/978-3-642-35705-3_10(204-223)Online publication date: 2013
        • (2011)Procedures and ContractsRigorous Software Development10.1007/978-0-85729-018-2_8(195-227)Online publication date: 2011
        • (2009)Frame rule for mutually recursive procedures manipulating pointersTheoretical Computer Science10.1016/j.tcs.2009.05.016410:42(4216-4233)Online publication date: 1-Sep-2009
        • (2003)Reasoning about pointers in refinement calculusTenth Asia-Pacific Software Engineering Conference, 2003.10.1109/APSEC.2003.1254398(425-434)Online publication date: 2003

        View Options

        Login options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media