Skip to main content

Mechanical verification of a garbage collector

  • Conference paper
  • First Online:
Parallel and Distributed Processing (IPPS 1999)

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

Included in the following conference series:

Abstract

We describe how the PVS verification system has been used to verify a safety property of a garbage collection algorithm, originally suggested by Ben-Ari. The safety property basically says that “nothing but garbage is ever collected”. Although the algorithm is relatively simple, its parallel composition with a “user” program that (nearly) arbitrarily modifies the memory makes the verification quite challenging. The garbage collection algorithm and its composition with the user program is regarded as a concurrent system with two processes working on a shared memory. Such concurrent systems can be encoded in PVS as state transition systems, very similar to the models of, for example, UNITY and TLA. The algorithm is an excellent test-case for formal methods, be they based on theorem proving or model checking. Various hand-written proofs of the algorithm have been developed, some of which are wrong. David Russinoff has verified the algorithm in the Boyer-Moore prover, and our proof is an adaption of this proof to PVS. We also model check a finite state version of the algorithm in the Stanford model checker Murphi, and we compare the result with the PVS verification.

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. M. Ben-Ari. Algorithms for On-the-Fly Garbage Collection. ACM Toplas, 6, July 1984.

    Google Scholar 

  2. S. Bensalem, Y. Lakhnech, and S. Owre. Computing Abstractions of Infinite State Systems Compositionally and Automatically. In Computer-Aided Verification, CAV’98, number 1427 in Lecture Notes in Computer Science, pages 319–331. Springer-Verlag, 1998.

    Google Scholar 

  3. S. Bensalem, Y. Lakhnech, and S. Owre. In VeSt: A Tool for the Verification of Invariants. In Computer-Aided Verification, CAV’98, number 1427 in Lecture Notes in Computer Science, pages 505–510. Springer-Verlag, 1998.

    Google Scholar 

  4. S. Bensalem, Y. Lakhnech, and H. Saïdi. Powerful Techniques for the Automatic Generation of Invariants. In Rajeev Alur and Thomas A. Henzinger, editors, Computer-Aided Verification, CAV’96, number 1102 in Lecture Notes in Computer Science, pages 323–335, New Brunswick, NJ, July/August 1996. Springer-Verlag.

    Google Scholar 

  5. K.M. Chandy and J. Misra. Parallel Program Design: A Foundation. Addison Wesley, 1988.

    Google Scholar 

  6. J.L.A. Van de Snepscheut. “Algorithms for On-the-Fly Garbage Collection” Revisited. Information Processing Letters, 24, March 1987.

    Google Scholar 

  7. E. W. Dijkstra, L. Lamport, A.J. Martin, C.S. Scholten, and E.F.M. Steffens. On-the-Fly Garbage Collection: An Exercise in Cooperation. ACM, 21, November 1978.

    Google Scholar 

  8. S. Graf and H. Saidi. Construction of Abstract State Graphs with PVS. In Computer-Aided Verification, CAV’97, Lecture Notes in Computer Science. Springer-Verlag, 1997.

    Google Scholar 

  9. K. Havelund, K.G. Larsen, and A. Skou. Formal Verification of an Audio/Video Power Controller using the Real-Time Model Checker UPPAAL. BRICS, Aalborg University, Denmark. Submitted for publication, October 1998.

    Google Scholar 

  10. K. Havelund, M. Lowry, and J. Penix. Formal Analysis of a Space Craft Controller using SPIN. In Proceedings of the 4th SPIN workshop, Paris, France, November 1998.

    Google Scholar 

  11. K. Havelund and N. Shankar. Experiments in Theorem Proving and Model Checking for Protocol Verification. In M-C. Gaudel and J. Woodcock, editors, FME’96: Industrial Benefit and Advances in Formal Methods, volume 1051 of Lecture Notes in Computer Science, pages 662–681. Springer-Verlag, 1996.

    Google Scholar 

  12. K. Havelund and N. Shankar. A Mechanized Refinement Proof for a Garbage Collector. NASA Ames Research Center. To be published, 1998.

    Google Scholar 

  13. K. Havelund, A. Skou, K. G. Larsen, and K. Lund. Formal Modeling and Analysis of an Audio/Video Protocol: An Industrial Case Study Using UPPAAL. In Proc. of the 18th IEEE Real-Time Systems Symposium, pages 2–13, Dec 1997. San Francisco, California, USA.

    Google Scholar 

  14. L. Lamport. The Temporal Logic of Actions. Technical report, Digital Equipment Corporation (DEC) Systems Research Center, Palo Alto, California, USA, April 1994.

    Google Scholar 

  15. R. Melton, D.L. Dill, C. Norris Ip, and U. Stern. Murphi Annotated Reference Manual, Release 3.0. Technical report, Stanford University, Palo Alto, California, USA, July 1996.

    Google Scholar 

  16. S. Owre, S. Rajan, J.M. Rushby, N. Shankar, and M.K. Srivas. PVS: Combining Specification, Proof Checking, and Model Checking. In Rajeev Alur and Thomas A. Henzinger, editors, Computer-Aided Verification, CAV’96, number 1102 in Lecture Notes in Computer Science, pages 411–414, New Brunswick, NJ, July/August 1996. Springer-Verlag.

    Google Scholar 

  17. C. Pixley. An Incremental Garbage Collection Algorithm for Multi-mutator Systems. Distributed Computing, 3, 1988.

    Google Scholar 

  18. D.M. Russinoff. A Mechanically Verified Incremental Garbage Collector. Formal Aspects of Computing, 6:359–390, 1994.

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

José Rolim Frank Mueller Albert Y. Zomaya Fikret Ercal Stephan Olariu Binoy Ravindran Jan Gustafsson Hiroaki Takada Ron Olsson Laxmikant V. Kale Pete Beckman Matthew Haines Hossam ElGindy Denis Caromel Serge Chaumette Geoffrey Fox Yi Pan Keqin Li Tao Yang G. Chiola G. Conte L. V. Mancini Domenique Méry Beverly Sanders Devesh Bhatt Viktor Prasanna

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag

About this paper

Cite this paper

Havelund, K. (1999). Mechanical verification of a garbage collector. In: Rolim, J., et al. Parallel and Distributed Processing. IPPS 1999. Lecture Notes in Computer Science, vol 1586. Springer, Berlin, Heidelberg . https://doi.org/10.1007/BFb0098007

Download citation

  • DOI: https://doi.org/10.1007/BFb0098007

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-65831-3

  • Online ISBN: 978-3-540-48932-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics