🤖 AI Summary
This work addresses expressiveness limitations of Rust’s memory-safety model in the presence of higher-order functions, parametric types, and shared mutable state. Methodologically, it introduces the first semantic reachability type system grounded in logical relations, built upon a unified semantic model that transcends syntax-directed proof techniques to precisely model higher-order state. Key contributions are: (1) semantic type safety—established even for ill-formed programs; (2) strong termination guarantees for higher-order stateful computations; (3) effect safety—eliminating unobservable mutations; and (4) support for semantic equivalence checking of non-interfering expressions, providing a formal foundation for parallel optimizations. Notably, this is the first application of logical relations to the metatheoretic verification of reachability types, significantly broadening both the scope and reliability of memory-safety reasoning.
📝 Abstract
Reachability types are a recent proposal to bring Rust-style reasoning about memory properties to higher-level languages, with a focus on higher-order functions, parametric types, and shared mutable state -- features that are only partially supported by current techniques as employed in Rust. While prior work has established key type soundness results for reachability types using the usual syntactic techniques of progress and preservation, stronger metatheoretic properties have so far been unexplored. This paper presents an alternative semantic model of reachability types using logical relations, providing a framework in which we study key properties of interest: (1) semantic type soundness, including of not syntactically well-typed code fragments, (2) termination, especially in the presence of higher-order state, (3) effect safety, especially the absence of observable mutation, and, finally, (4) program equivalence, especially reordering of non-interfering expressions for parallelization or compiler optimization.