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.
Preview
Unable to display preview. Download preview PDF.
References
M. Ben-Ari. Algorithms for On-the-Fly Garbage Collection. ACM Toplas, 6, July 1984.
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.
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.
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.
K.M. Chandy and J. Misra. Parallel Program Design: A Foundation. Addison Wesley, 1988.
J.L.A. Van de Snepscheut. “Algorithms for On-the-Fly Garbage Collection” Revisited. Information Processing Letters, 24, March 1987.
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.
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.
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.
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.
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.
K. Havelund and N. Shankar. A Mechanized Refinement Proof for a Garbage Collector. NASA Ames Research Center. To be published, 1998.
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.
L. Lamport. The Temporal Logic of Actions. Technical report, Digital Equipment Corporation (DEC) Systems Research Center, Palo Alto, California, USA, April 1994.
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.
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.
C. Pixley. An Incremental Garbage Collection Algorithm for Multi-mutator Systems. Distributed Computing, 3, 1988.
D.M. Russinoff. A Mechanically Verified Incremental Garbage Collector. Formal Aspects of Computing, 6:359–390, 1994.
Author information
Authors and Affiliations
Editor information
Rights 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