Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs

07/25/2023
by   Guannan Wei, et al.
0

Reachability types are a recent proposal that has shown promise in scaling to higher-order but monomorphic settings, tracking aliasing and separation on top of a substrate inspired by separation logic. The prior λ^* reachability type system qualifies types with sets of reachable variables and guarantees separation if two terms have disjoint qualifiers. However, naive extensions with type polymorphism and/or precise reachability polymorphism are unsound, making λ^* unsuitable for adoption in real languages. Combining reachability and type polymorphism that is precise, sound, and parametric remains an open challenge. This paper presents a rethinking of the design of reachability tracking and proposes a solution to the key challenge of reachability polymorphism. Instead of always tracking the transitive closure of reachable variables as in the original design, we only track variables reachable in a single step and compute transitive closures only when necessary, thus preserving chains of reachability over known variables that can be refined using substitution. To enable this property, we introduce a new freshness qualifier, which indicates variables whose reachability sets may grow during evaluation steps. These ideas yield the simply-typed λ^♢-calculus with precise lightweight, i.e., quantifier-free, reachability polymorphism, and the 𝖥_<:^♢-calculus with bounded parametric polymorphism over types and reachability qualifiers. We prove type soundness and a preservation of separation property in Coq.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/16/2022

On Higher-Order Reachability Games vs May Reachability

We consider the reachability problem for higher-order functional program...
research
09/12/2023

Modeling Reachability Types with Logical Relations

Reachability types are a recent proposal to bring Rust-style reasoning a...
research
11/05/2022

Geometry of VAS reachability sets

Vector Addition Systems (VAS) or equivalently petri-nets are a popular m...
research
08/16/2019

Modular Verification of Heap Reachability Properties in Separation Logic

The correctness of many algorithms and data structures depends on reacha...
research
10/02/2020

The Complexity of Boolean State Separation (Technical Report)

For a Boolean type of nets τ, a transition system A is synthesizeable in...
research
09/15/2023

Graph IRs for Impure Higher-Order Languages (Technical Report)

This is a companion report for the OOPSLA 2023 paper of the same title, ...
research
11/29/2018

Combining Refinement of Parametric Models with Goal-Oriented Reduction of Dynamics

Parametric models abstract part of the specification of dynamical models...

Please sign up or login with your details

Forgot password? Click here to reset