skip to main content
10.1145/360204.375719acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

BI as an assertion language for mutable data structures

Published:01 January 2001Publication History

ABSTRACT

Reynolds has developed a logic for reasoning about mutable data structures in which the pre- and postconditions are written in an intuitionistic logic enriched with a spatial form of conjunction. We investigate the approach from the point of view of the logic BI of bunched implications of O'Hearnand Pym. We begin by giving a model in which the law of the excluded middleholds, thus showing that the approach is compatible with classical logic. The relationship between the intuitionistic and classical versions of the system is established by a translation, analogous to a translation from intuitionistic logic into the modal logic S4. We also consider the question of completeness of the axioms. BI's spatial implication is used to express weakest preconditions for object-component assignments, and an axiom for allocating a cons cell is shown to be complete under an interpretation of triplesthat allows a command to be applied to states with dangling pointers. We make this latter a feature, by incorporating an operation, and axiom, for disposing of memory. Finally, we describe a local character enjoyed by specifications in the logic, and show how this enables a class of frame axioms, which say what parts of the heap don't change, to be inferred automatically.

References

  1. 1.Alur, R., and Grosu, R. Modular refinement of hierarchic reactive machines. In POPL {31}.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Borgida, A., Mylopoulos, J., and Reiter, R. On the frame problem in procedure specifications. IEEE Transactions of Software Engineering 21 (1995), 809-838.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Bornat, R. Proving pointer programs in Hoare logic. In Fifth Internationsl Conference on Mathematics of Program Construction, LNCS 1837, Ponte de Lima, Portugal, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.Brookes, S., Main, M., Melton, A., and Mislove, M., Eds. Mathematical Foundations of Programming Semantics, Eleventh Annual Conference (Tulane University, New Orleans, Louisiana, March 29-April 1 1995), vol. 1 of Electronic Notes in Theoretical Computer Science, Elsevier Science.]]Google ScholarGoogle Scholar
  5. 5.Burstall, R. Some techniques for proving correctness of programs which alter data structures. Machine Intelligence 7 (1972), 23-50.]]Google ScholarGoogle Scholar
  6. 6.Calcagno, C., Ishtiaq, S., and O'Hearn, P. Semantic analysis of pointer aliasing, allocation and disposal in Hoare logic. Proceedings of the 2nd international ACM SIGPLAN conference on on Principles and practice of declarative programming, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Cardelli, L., and Ghelli, G. A query language for semistructured data based on the ambient logic. Manuscript, 4 April 2000.]]Google ScholarGoogle Scholar
  8. 8.Cardelli, L., and Gordon, A. D. Anytime, anywhere. modal logics for mobile ambients. In POPL {31}.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.Cervesato, I., and Pfenning, F. A linear logical framework. In Proceedings of the Eleventh Annual Symposium on Logic in Computer Science | LICS'96 (27-30 July 1996), IEEE Computer Society Press, pp. 264-275.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.Cook, S. A. Soundness and completeness of an axiomatic system for program verification. SIAM J. on Computing 7 (1978), 70-90.]]Google ScholarGoogle ScholarCross RefCross Ref
  11. 11.de Boer, F. A WP calculus for OO. In Proceedings of FOSSACS'99 (1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.Girard, J.-Y. Linear logic. Theoretical Computer Science (1987), 1-102.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Girard, J.-Y. Towards a geometry of interaction. In Categories in Computer Science and Logic (1989), American Mathematical Society, pp. 69-108. Contemporary Mathematics Volume 92.]]Google ScholarGoogle Scholar
  14. 14.Guttag, J., Horning, J., and Wing, J. Larch in five easy pieces. TR 5, DEC Systems Research Center, 1985.]]Google ScholarGoogle Scholar
  15. 15.Hoare, C., and He, J. A trace model for pointers and objects. In ECCOP'99 - Object-Oriented Programming, 13th European Conference (1999), R. Guerraoui, Ed., pp. 1-17. Lecture Notes in Computer Science, Vol. 1628, Springer.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.Hoare, C. A. R., and Wirth, N. An axiomatic definition of the programming language Pascal. Acta Informatica 2 (1973), 335-355.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.Honsell, F., Mason, I. A., Smith, S., and Talcott, C. A variable typed logic of effects. Information and Computation 119, 1 (may 1995), 55-90.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.Jenson, J., Jorgensen, M., Klarkund, N., and Schwartzback, M. Automatic verification of pointer programs using monadic second-order logic. In Proceedings of the ACM SIGPLAN'97 Conference on Programming Language Design and Implementation (1997), pp. 225-236. SIGPLAN Notices 32(5).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.Kripke, S. A. Semantical analysis of intuitionistic logic I. In Formal Systems and Recursive Functions, J. N. Crossley and M. A. E. Dummett, Eds. North-Holland, Amsterdam, 1965, pp. 92-130.]]Google ScholarGoogle Scholar
  20. 20.Leino, K. Toward Reliable Modular Programs. Ph.D. thesis, California Institute of Technology, Pasadena, California, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.Miller, D. Observations about using logic as a specification language. In GULP-PRODE'95 - Joint Conference on Declarative Programming (Marina de Vietri, Salerno, Italy, September 1995).]]Google ScholarGoogle Scholar
  22. 22.Moller, B. Calculating with pointer structures. In Proceedings of Mathematics for Software Construction, (1997), Chapman and Hall, pp. 24-48.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.Morris, J. A general axiom of assignment. Assignment and linked data structure. A proof of the Schorr-Waite algorithm. In Theoretical Foundations of Programming Methodology (1982), M. Broy and G. Schmidt, Eds., Reidel, pp. 25-51.]]Google ScholarGoogle ScholarCross RefCross Ref
  24. 24.Necula, G. Proof-carrying code. In In Proceedings of the 24th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Langauges (POPL '97) (1997).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.O'Hearn, P., and Pym, D. The logic of bunched implications. Bulletin of Symbolic Logic 5, 2 (June 99), 215-244.]]Google ScholarGoogle ScholarCross RefCross Ref
  26. 26.O'Hearn, P., Pym, D., and Yang, H. Possible worlds and resources: The semantics of BI. Submitted, October 2000.]]Google ScholarGoogle Scholar
  27. 27.O'Hearn, P., and Yang, H. Local reasoning about pointer programs using bunched implications. In Preparation, 2000.]]Google ScholarGoogle Scholar
  28. 28.O'Hearn, P. W., Power, A. J., Takeyama, M., and Tennent, R. D. Syntactic control of interference revisited. Theoretical Computer Science 228, 1-2 (October 1999), 211-252. Preliminary version in {4} and in {29}, vol 2.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.O'Hearn, P. W., and Tennent, R. D., Eds. Algol-like Languages. Two volumes, Birkhauser, Boston, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30.Oppen, D. C., and Cook, S. A. Proving assertions about programs that manipulate data structures. In Conference Record of Seventh Annual ACM Symposium on Theory of Computation (Albuquerque, New Mexico, 5-7 May 1975), pp. 107-116.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31.Conference Record of the 27th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2000), ACM, New York.]]Google ScholarGoogle Scholar
  32. 32.Pym, D. The semantics and proof theory of the logic of bunched implications. Monograph in Preparation, 2000. See http://www.dcs.qmw.ac.uk/~pym.]]Google ScholarGoogle Scholar
  33. 33.Reiter, R. The frame problem in the situation calculus: a simple solution (sometimes) and a completeness result for goal regression. In V. Lifschitz, editor, Artificial Intelligence and Mathematical Theory of Computation: Papers in Honor of John McCarthy, pages 359-380. Academic Press, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 34.Reynolds, J. C. Syntactic control of interference. In Conference Record of the Fifth Annual ACM Symposium on Principles of Programming Languages (Tucson, Arizona, January 1978), ACM, New York, pp. 39-46. Also in {29}, vol 1.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35.Reynolds, J. C. Intuitionistic reasoning about shared mutable data structure. In Millenial Perspectives in Computer Science, Palgrove, 2000.]]Google ScholarGoogle Scholar
  36. 36.Reynolds, J. C. Lectures on reasoning about shared mutable data structure. IFIP Working Group 2.3 School/Seminar on State-of-the-Art Program Design Using Logic. Tandil, Argentina, September 2000.]]Google ScholarGoogle Scholar
  37. 37.Sagiv, M., Reps, T., and Wilhelm, R. Parametric shape analysis via 3valued logic. In POPL'99.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 38.Smith, F., Walker, D., and Morrisett, G. Alias types. Proceedings of ESOP'99.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 39.Walker, D., and Morrisett, G. Alias types for recursive data structures. Manuscript, April 2000.]]Google ScholarGoogle Scholar
  40. 40.Xu, Z., Miller, B., and Reps, T. Safety checking of machine code. In PLDI'00.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. BI as an assertion language for mutable data structures

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              POPL '01: Proceedings of the 28th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
              January 2001
              304 pages
              ISBN:1581133367
              DOI:10.1145/360204

              Copyright © 2001 ACM

              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]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 1 January 2001

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • Article

              Acceptance Rates

              POPL '01 Paper Acceptance Rate24of126submissions,19%Overall Acceptance Rate824of4,130submissions,20%

              Upcoming Conference

              POPL '25

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader