Lune

OOPSLA2025顶会

Modular Reasoning about Global Variables and Their Initialization

João C. Pereira, Isaac van Bakel, Patricia Firlejczyk, Marco Eilers, Peter Müller

摘要

Many imperative programming languages offer global variables to implement common functionality such as global caches and counters. Global variables are typically initialized by module initializers (e.g., static initializers in Java), code blocks that are executed automatically by the runtime system. When or in what order these initializers run is typically not known statically and modularly. For instance in Java, initialization is triggered dynamically upon the first use of a class, while in Go, the order depends on all packages of a program. As a result, reasoning modularly about global variables and their initialization is difficult, especially because module initializers may perform arbitrary side effects and may have cyclic dependencies. Consequently, existing modular verification techniques either do not support global state or impose drastic restrictions that are not satisfied by mainstream languages and programs.

In this paper, we present the first practical verification technique to reason formally and modularly about global state and its initialization. Our technique is based on separation logic and uses module invariants to specify ownership and values of global variables. A partial order on modules and methods allows us to reason modularly about when a module invariant may be soundly assumed to hold, irrespective of when exactly the module initializer establishing it runs. Our technique supports both thread-local and shared global state. We formalize it as a program logic in Iris and prove its soundness in Rocq. We make only minimal assumptions about the initialization semantics, making our technique applicable to a wide range of programming languages. We implemented our technique in existing verifiers for Java and Go and demonstrate its effectiveness on typical uses cases of global state as well as a substantial codebase implementing an Internet router.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Initializing Global Objects: Time and Order 引用了 A type-and-effect system for object initialization
  • Initializing Global Objects: Time and Order 引用了 A conceptual framework for safe object initialization: a principled and mechanized soundness proof of the Celsius model
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Sound State Encodings in Translational Separation Logic VerifiersHongyi Ling, Thibault Dardinier, Ellen Arlt, Peter MüllerOOPSLA 2026

它引用的 Paper4

  1. Actris: session-type based reasoning in separation logicJonas Kastberg Hinrichsen, Jesper Bengtson, Robbert KrebbersPOPL 2020 · 44 次引用
  2. A type-and-effect system for object initializationFengyun Liu, Ondrej Lhoták, Aggelos Biboudis, Paolo G. Giarrusso 等OOPSLA 2020 · 8 次引用
  3. A conceptual framework for safe object initialization: a principled and mechanized soundness proof of the Celsius modelClement Blaudeau, Fengyun LiuOOPSLA 2022 · 2 次引用
  4. Initializing Global Objects: Time and OrderFengyun Liu, Ondrej Lhoták, David Hua, Enze XingOOPSLA 2023

相关 Paper

  1. Program Logics à la CarteMax Vistrup, Michael Sammler, Ralf JungPOPL 2025 · 4 次引用
  2. Leaf: Modularity for Temporary Sharing in Separation LogicTravis Hance, Jon Howell, Oded Padon, Bryan ParnoOOPSLA 2023 · 3 次引用
  3. Raven: An SMT-Based Concurrency VerifierEkanshdeep Gupta, Nisarg Patel, Thomas WiesCAV 2025 · 1 次引用
  4. Beyond Backtracking: Connections in Fine-Grained Concurrent Separation LogicIke Mulder, Lukasz Czajka, Robbert KrebbersPLDI 2023 · 2 次引用
  5. Nola: Later-Free Ghost State for Verifying Termination in IrisYusuke Matsushita, Takeshi TsukadaPLDI 2025 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖