Reference. Transfinite step-indexing for termination
Step-indexed logical relations are an extremely useful technique for building operational-semantics-based models and program logics for realistic, richly-typed programming languages. They have proven to be indispensable for modeling features like higher-order state , which many languages support but which were difficult to accommodate using traditional denotational models. However, the conventional wisdom is that, because they only support reasoning about finite traces of computation, (unary) step-indexed models are only good for proving safety properties like “well-typed programs don’t go wrong”. There has consequently been very little work on using step-indexing to establish liveness properties, in particular termination. In this paper, we show that step-indexing can in fact be used to prove termination of well-typed programs—even in the presence of dynamically-allocated, shared, mutable, higher-order state—so long as one’s type system enforces disciplined use of such state. Specifically, we consider a language with asynchronous channels, inspired by promises in JavaScript, in which higher-order state is used to implement communication, and linearity is used to ensure termination. The key to our approach is to generalize from natural number step-indexing to transfinite step-indexing , which enables us to compute termination bounds for program expressions in a compositional way. Although transfinite step-indexing has been proposed previously, we are the first to apply this technique to reasoning about termination in the presence of higher-order state.
Cite
Cited by (2)
From Linearity to Borrowing wagner-2025-from
Linear type systems are powerful because they can statically ensure the correct management of resources like memory, but they can also be cumbersome to work with, since even benign uses of a resource require that it be explicitly threaded through during computation. Borrowing , as popularized by Rust, reduces this burden by allowing one to temporarily disable certain resource permissions (e.g., deallocation or mutation) in exchange for enabling certain structural permissions (e.g., weakening or contraction). In particular, this mechanism spares the borrower of a resource from having to explicitly return it to the lender but nevertheless ensures that the lender eventually reclaims ownership of the resource. In this paper, we elucidate the semantics of borrowing by starting with a standard linear type system for ensuring safe manual memory management in an untyped lambda calculus and gradually augmenting it with immutable borrows, lexical lifetimes, reborrowing, and finally mutable borrows. We prove semantic type soundness for our Borrow Calculus ( BoCa ) using Borrow Logic ( BoLo ), a novel domain-specific separation logic for borrowing. We establish the soundness of this logic using a semantic model that additionally guarantees that our calculus is terminating and free of memory leaks. We also show that our Borrow Logic is robust enough to establish the semantic safety of some syntactically ill-typed programs that temporarily break but reestablish invariants.
Transfinite Iris: resolving an existential dilemma of step-indexed separation logic spies-2021-transfinitex
Cites 40 works (2 here)
With notes (2)
Iris from the ground up: A modular foundation for higher-order concurrent separation logic jung_etal_iris_ground_up_2018
Iris is a framework for higher-order concurrent separation logic, which has been implemented in the Coq proof assistant and deployed very effectively in a wide variety of verification projects. Iris was designed with the express goal of simplifying and consolidating the foundations of modern separation logics, but it has evolved over time, and the design and semantic foundations of Iris itself have yet to be fully written down and explained together properly in one place. Here, we attempt to fill this gap, presenting a reasonably complete picture of the latest version of Iris (version 3.1), from first principles and in one coherent narrative.
Iris: Monoids and Invariants as an Orthogonal Basis for Concurrent Reasoning jung-2015-iris
External (38)
- Transfinite step-indexing for termination (technical report / appendix) (2021)
- Simply RaTT: a fitch-style modal calculus for reactive programming without space leaks (2019)
- Time Credits and Time Receipts in Iris (2019)
- RustBelt: securing the foundations of the Rust programming language (2017)
- Modular Termination Verification for Non-blocking Concurrency (2016)
- Transfinite Step-Indexing: Decoupling Concrete and Logical Steps (2016)
- A Model of Countable Nondeterminism in Guarded Type Theory (2014)
- Fair reactive programming (2014)
- Impredicative Concurrent Abstract Predicates (2014)
- Temporal logic with "Until", functional reactive programming with processes, and concrete process categories (2013)
- Higher-order functional reactive programming without spacetime leaks (2013)
- Logical relations for fine-grained concurrency (2013)
- Step-Indexed Relational Reasoning for Countable Nondeterminism (2013)
- Indexed Realizability for Bounded-Time Programming with References and Type Fixpoints (2012)
- LTL types FRP: linear-time temporal logic propositions as types, proofs as functional reactive programs (2012)
- Superficially substructural types (2012)
- Towards a Common Categorical Semantics for Linear-Time Temporal Logic and Functional Reactive Programming (2012)
- Time Bounds for General Function Pointers (2012)
- An Elementary Affine λ-Calculus with Multithreading and Side Effects (2011)
- Ultrametric Semantics of Reactive Programs (2011)
- Logical Step-Indexed Logical Relations (2011)
- Semantic foundations for typed assembly languages (2010)
- A theory of termination via indirection (2010)
- A relational modal logic for higher-order stateful ADTs (2010)
- Typing termination in a higher-order concurrent imperative language (2010)
- A step-indexed model of substructural state (2005)
- L3: A Linear Language with Locations (2005)
- Strong normalisation in the π-calculus (2004)
- Semantics of types for mutable state (2004)
- An indexed model of recursive types for foundational proof-carrying code (2001)
- A poor man's concurrency monad (1999)
- Light linear logic (1995)
- Proofs and types (1989)
- Types, abstraction and parametric polymorphism (1983)
- The impact of applicative programming on multiprocessing (1976)
- Intensional interpretations of functionals of finite type I (1967)
- The Mechanical Evaluation of Expressions (1964)
- Grundbegriffe der Mengenlehre (1906)