Commit-Window Observation Contracts for Reactive Entity-Component Systems
Tomoyuki Aotani, Tetsuo Kamina
Abstract
Modern entity-component systems (ECS) runtimes expose structural events (OnAdd, OnSet, and OnRemove), change filters, and continuous queries (CQ) so that systems rerun only where data changed; yet the correctness of the underlying optimizations—coalescing notifications, reordering write-disjoint updates within a commit window, caching CQ membership, iterating to quiescence—has lacked a semantics that states the required commit-window observation contract . We present RxTCoreECS , a calculus that formalizes this contract for reactive ECS by integrating a Core-ECS store-and-scan baseline with a reactive transactional layer. Its key design point is an explicit two-tier notification model: (i) an eventful commit that emits a sequential per-operation trace, and (ii) a net-effect commit that emits a per-cell delta (at most one event per cell per commit window). The target contract is intentionally windowed: observers are order-insensitive within a commit window, and Changed is a dirty-by-write post-membership filter rather than a semantic-equality test. We define a window-local observational equivalence, relative to the incoming queue prefix, that quotients event order only within one commit window, prove schedule independence under write-disjointness, and connect the two layers by a coalescing refinement and a forward simulation theorem. We add a CQ-cache model with correctness lemmas for Added/Removed/Changed deltas, an explicit version/filter alignment theorem exposing the once-per-window bump policy for touched entities and cells, and a fuel-bounded quiescence loop. We prove a reusable all-dirty scan-closure schema under explicit round-refinement and stability obligations. All formal definitions and named results in the paper are mechanized and checked in Rocq.
Ask Lune
Know where this paper stands in minutes, not an afternoon.
Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.
Related papers
- Extending Intel-x86 consistency and persistency: formalising the semantics of Intel-x86 memory types and non-temporal storesAzalea Raad, Luc Maranget, Viktor VafeiadisPOPL 2022 · 24 citations
- Modular verification of op-based CRDTs in separation logicAbel Nieto, Léon Gondelman, Alban Reynaud, Amin Timany et al.OOPSLA 2022 · 16 citations
- Verification under Intel-x86 with PersistencyParosh Aziz Abdulla, Mohamed Faouzi Atig, Ahmed Bouajjani, K. Narayan Kumar et al.PLDI 2024 · 3 citations
- Verifying General-Purpose RCU for Reclamation in Relaxed Memory Separation LogicJaehwang Jung, Sunho Park, Janggun Lee, Jeho Yeon et al.PLDI 2025 · 1 citation
- Compositional Semantics for Shared-Variable ConcurrencyMikhail Svyatlovskiy, Shai Mermelstein, Ori LahavPLDI 2024 · 1 citation
