Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3546918.3546923acmotherconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article
Open access

Towards a Model Checking Framework for a New Collector Framework

Published: 30 November 2022 Publication History

Abstract

Garbage collectors provide memory safety, an important step toward program correctness. However, correctness of the collector itself can be challenging to establish, given both the style in which such systems are written and the weakly-ordered memory accesses of modern hardware. One way to maximize benefits is to use a framework in which effort can be focused on the correctness of small, modular critical components from which various collectors may be composed. Full proof of correctness is likely impractical, so we propose to gain a degree of confidence in collector correctness by applying model checking to critical kernels within a garbage collection framework. We further envisage a model framework, paralleling the framework nature of the collector, in hope that it will be easy to create new models for new collectors. We describe here a prototype model structure, and present results of model checking both stop-the-world and snapshot-at-the-beginning concurrent marking. We found useful regularities of model structure, and that models could be checked within possible time and space budgets on capable servers. This suggests that collectors built in a modular style might be model checked, and further that it may be worthwhile to develop a model checking framework with a domain-specific language from which to generate those models.

References

[1]
Tatsuya Abe, Tomoharu Ugawa, Toshiyuki Maeda1, and Kousuke Matsumoto. 2016. Reducing State Explosion for Software Model Checking with Relaxed Memory Consistency Models. arXiv:1608.05893.
[2]
Stephen M. Blackburn, Perry Cheng, and Kathryn S. McKinley. 2004. Oil and Water? High Performance Garbage Collection in Java with MMTk. In 26th International Conference on Software Engineering. IEEE Computer Society Press, Edinburgh, 137–146. https://doi.org/10.1109/ICSE.2004.1317436
[3]
Howard Bowman, John Derrick, and Richard E. Jones. 1993. Modelling Garbage Collection Algorithms. In International Workshop on Concurrency in Computational Logic, City University, London, 13 December 1993.
[4]
The Chromium Project. 2022. Memory safety. https://www.chromium.org/Home/chromium-security/memory-safety/
[5]
The Coq Development Team. 2017. The Coq Proof Assistant, version 8.7.0. https://doi.org/10.5281/zenodo.1028037
[6]
Adam Sandberg Ericsson, Magnus O. Myreen, and Johannes øAman Pohjola. 2017. A Verified Generational Garbage Collector for CakeML, See ITP [14].
[7]
Adam Sandberg Ericsson, Magnus O. Myreen, and Johannes Åman Pohjola. 2019. A Verified Generational Garbage Collector for CakeML. Journal of Automated Reasoning (JAR) 63 (2019). https://doi.org/10.1007/s10817-018-9487-z
[8]
Anthony C. J. Fox, Magnus O. Myreen, Yong Kiam Tan, and Ramana Kumar. 2017. Verified compilation of CakeML to multiple machine-code targets. In Certified Programs and Proofs (CPP), Yves Bertot and Viktor Vafeiadis (Eds.). ACM, 125–137. https://doi.org/10.1145/3018610.3018621
[9]
Peter Gammie, Antony L. Hosking, and Kai Engelhardt. 2015. Relaxing Safely: Verified On-the-Fly Garbage Collection for x86-TSO. In ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, Portland, OR. https://doi.org/10.1145/2737924.2738006
[10]
Charles Antony Richard Hoare. 1978. Communicating Sequential Processes. Commun. ACM 21(1978), 666–677.
[11]
HOL4 development team. 2022. HOL4 web site. https://hol-theorem-prover.org/
[12]
Gerard J. Holzmann. 2004. The SPIN Model Checker: Primer and Reference Manual. Addison-Wesley.
[13]
Richard L. Hudson and J. Eliot B. Moss. 2001. Sapphire: Copying GC Without Stopping The World. In Joint ACM-ISCOPE Conference on Java Grande. ACM Press, Palo Alto, CA, 48–57. https://doi.org/10.1145/376656.376810
[14]
ITP 2017. 8th International Conference on Interactive Theorem Proving (ITP). IEEE Press, Brasília, Brazil.
[15]
Yong Kiam Tan, Magnus O. Myreen, Ramana Kumar, Anthony Fox, Scott Owens, and Michael Norrish. 2016. A New Verified Compiler Backend for CakeML. In International Conference on Functional Programming (ICFP). ACM Press, 60–73. https://doi.org/10.1145/2951913.2951924
[16]
Yong Kiam Tan, Magnus O. Myreen, Ramana Kumar, Anthony Fox, Scott Owens, and Michael Norrish. 2019. The verified CakeML compiler backend. Journal of Functional Programming 29 (2019), E2. https://doi.org/10.1017/S0956796818000229
[17]
Ramana Kumar, Magnus O. Myreen, Michael Norrish, and Scott Owens. 2014. CakeML: A Verified Implementation of ML. In Principles of Programming Languages (POPL). ACM Press, 179–191. https://doi.org/10.1145/2535838.2535841
[18]
MMTk development team. 2022. MMTk web site. https://mmtk.io
[19]
Man Yue Mo. 2021. Chrome in-the-wild bug analysis: CVE-2021-37975. https://securitylab.github.com/research/in_the_wild_chrome_cve_2021_37975/
[20]
Tobias Nipkow, Lawrence C Paulson, and Markus Wenzel. 2002. Isabelle/HOL: a proof assistant for higher-order logic. Vol. 2283. Springer Science & Business Media.
[21]
Tomoharu Ugawa, Tatsuya Abe, and Toshiyuki Maeda. 2017. Model Checking Copy Phases of Concurrent Copying Garbage Collection with Various Memory Models. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM Press, Vancouver, 26. https://doi.org/10.1145/3133877
[22]
Tomoharu Ugawa, Carl G. Ritson, and Richard E. Jones. 2018. Transactional Sapphire: Lessons in High-Performance, On-the-fly Garbage Collection. ACM Transactions on Programming Languages and Systems 40, 4, Article 15 (Dec. 2018), 56 pages. https://doi.org/10.1145/3226225
[23]
Martin T. Vechev, Eran Yahav, David F. Bacon, and Noam Rinetzky. 2007. CGCExplorer: A Semi-Automated Search Procedure for Provably Correct Concurrent Collectors. In ACM SIGPLAN Conference on Programming Language Design and Implementation(ACM SIGPLAN Notices 42(6)), Jeanne Ferrante and Kathryn S. McKinley (Eds.). ACM Press, San Diego, CA, 456–467. https://doi.org/10.1145/1250734.1250787
[24]
Taiichi Yuasa. 1990. Real-Time Garbage Collection on General-Purpose Machines. Journal of Systems and Software 11, 3 (March 1990), 181–198. https://doi.org/10.1016/0164-1212(90)90084-Y
[25]
Yannick Zakowski, David Cachera, Delphine Demange, Gustavo Petri, David Pichardie, Suresh Jagannathan, and Jan Vitek. 2017. Verifying a Concurrent Garbage Collector using a Rely-Guarantee Methodology, See ITP [14], 496–513. https://doi.org/10.1007/978-3-319-66107-0_31

Cited By

View all
  • (2023)Heap Fuzzing: Automatic Garbage Collection Testing with Expert-Guided Random Events2023 IEEE Conference on Software Testing, Verification and Validation (ICST)10.1109/ICST57152.2023.00019(107-116)Online publication date: Apr-2023

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
MPLR '22: Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes
September 2022
161 pages
ISBN:9781450396967
DOI:10.1145/3546918
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: 30 November 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. concurrent
  2. garbage collection
  3. model checking
  4. snapshot-at-the-beginning
  5. stop-the-world

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

Conference

MPLR '22

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)155
  • Downloads (Last 6 weeks)28
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Heap Fuzzing: Automatic Garbage Collection Testing with Expert-Guided Random Events2023 IEEE Conference on Software Testing, Verification and Validation (ICST)10.1109/ICST57152.2023.00019(107-116)Online publication date: Apr-2023

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media