Abstract
We present the verification of the machine-level implementation of a conservative variant of the standard mark-sweep garbage collector in a Hoare-style program logic. The specification of the collector is given on a machine-level memory model using separation logic, and is strong enough to preserve the safety property of any common mutator program. Our verification is fully implemented in the Coq proof assistant and can be packed immediately as foundational proof-carrying code package. Our work makes important attempt toward building fully certified production-quality garbage collectors.
Similar content being viewed by others
References
Necula G. Proof-carrying code. In Proc. 24th ACM Symp. Principles of Prog. Lang., New York, ACM Press, January 1997, pp.106–119.
Morrisett G, Walker D, Crary K, Glew N. From system F to typed assembly language. ACM Trans. Prog. Lang. and Sys., 1999, 21(3): 527–568.
Jones R E. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. Chichester: Wiley, July 1996, With a chapter on Distributed Garbage Collection by R. Lins.
Boehm H, Weiser M. Garbage collection in an uncooperative environment. Software Practice and Exp., 1988, 18(9): 807–820.
Feng X Y, Shao Z, Vaynberg A et al. Modular verification of assembly code with stack-based control abstractions. In Proc. 2006 ACM Conf. Prog. Lang. Design and Impl., Ottawa, Canada, June 2006, ACM Press, pp.401–414.
Reynolds J C. Separation logic: A logic for shared mutable data structures. In Proc. 17th IEEE Symp. Logic in Comp. Sci., Washington DC, USA, IEEE Comp. Soc., 2002, pp.55–74.
Coq Development Team. The Coq proof assistant reference manual. Coq release v8.0, October 2005.
Appel A W. Foundational proof-carrying code. In Proc. 16th IEEE Symp. Logic in Comp. Sci., IEEE Comp. Soc., Boston, USA, June 2001, pp.247–258.
Feng X, Ni Z, Shao Z, Guo Y. An open framework for foundational proof-carrying code. In Proc. 3rd ACM SIGPLAN Workshop on Types in Lang. Design and Impl., Nice, France, ACM Press, January 2007, pp.67–78.
McCreight A, Shao Z, Lin C, Li L. A General Framework for Certifying Garbage Collectors and Their Mutators. In Proc. 2007 ACM SIGPLAN Conf. Prog. Lang. Design and Impl., San Diego, CA, USA, June 2007, ACM Press. (Paper to appear)
Lin C, McCreight A, Shao Z, Chen Y, Guo Y. Foundational typed assembly language with certified garbage collection. In Proc. 1st IEEE & IFIP International Symp. Theoretical Aspects of Soft. Eng., Shanghai, China, June 2007, IEEE Comp. Soc. (Paper to appear)
Lin C, Chen Y, Li L, Hua B. Garbage collector verification for proof-carrying code (documents and Coq implementation). 2006, http://ssg.ustcsz.edu.cn/~cxlin/gcpaper/.
C Paulin-Mohring. Inductive definitions in the system Coq—Rules and properties. In Proc. 1st Int. Conf. Typed Lambda Calculi and Applications, Utrecht, The Netherlands, LNCS, Vol.664, Springer-Verlag, 1993, pp.328–345.
MIPS Technologies, Inc. MIPS32™ Architecture for Programmers Volume II: The MIPS32™ Instruction Set. v2.50.
Birkedal L, Torp-Smith N, Reynolds J C. Local reasoning about a copying garbage collector. In Proc. 31st ACM Symp. Principles of Prog. Lang., New York, USA, ACM Press, 2004, pp.220–231.
Howard W A. The formulas-as-types notion of construction. To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism, Academic Press, 1980, pp.479–490.
Marti N, Affeldt R, Yonezawa A. Formal verification of the heap manager of an operating system using separation logic. In Proc. ICFEM2006, Lecture Notes in Computer Science, Volume 4260, Canberra, September 1998, Springer-Verlag, pp.225–244.
Dijkstra E W, Lamport L, Martin A J et al. On-the-fly garbage collection: An exercise in cooperation. Commun. ACM, 1978, 21(11): 966–975.
Ben-Ari M. Algorithms for on-the-fly garbage collection. ACM Trans. Prog. Lang. and Sys., 1984, 6(3): 333–344.
Russinoff D M. A mechanically verified incremental garbage collector. Formal Aspects of Computing, 1994, 6: 359–390.
Jackson P. Verifying a garbage collection algorithm. In Proc. 11th Int. Conf. Theorem Proving in Higher Order Logics, Lecture Notes in Computer Science, Canberra, Australia, Volume 1479, Springer-Verlag, 2006, pp.225–244.
L. Burdy. B vs. Coq to prove a garbage collector. In Proc. 14th Int. Conf. Theorem Proving in Higher Order Logics, Edinburgh, UK, Boulton R J, Jackson P B (eds.), September 2001, pp.85–97.
Wang D C, Appel A W. Type-preserving garbage collectors. In Proc. 28th ACM Symp. Principles of Prog. Lang., New York, USA, ACM Press, 2001, pp.166–178.
Monnier S, Saha B, Shao Z. Principled scavenging. In Proc. 2001 ACM Conf. Prog. Lang. Design and Impl., New York, ACM Press, 2001, pp.81–91.
Hawblitzel C, Huang H, Wittie L, Chen J. A garbage-collecting typed assembly language. In Proc. The Third ACM SIGPLAN Workshop on Types in Language Design and Implementation, Nice, France, ACM Press, January 2007, pp.41–52.
Author information
Authors and Affiliations
Corresponding author
Additional information
Supported by the National Natural Science Foundation of China under Grant No. 60673126 (Verification and Compilation of Software Safety); Intel China Research Center.
Electronic supplementary material
Rights and permissions
About this article
Cite this article
Lin, CX., Chen, YY., Li, L. et al. Garbage Collector Verification for Proof-Carrying Code. J Comput Sci Technol 22, 426–437 (2007). https://doi.org/10.1007/s11390-007-9049-z
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11390-007-9049-z