ComputingComputer ScienceCompilersData StructuresProgramming LanguagesData TypesType CheckingType SystemsFocusLinear Type SystemsRuntime Type CheckingSafe Access DesignType Aliases
A type system with linearity is useful for checking software protocols andresource management at compile time. Linearity provides powerful reasoning about state changes, but at the price of restrictions on aliasing. The hard division between linear and nonlinear types forces the programmer to make a trade-off between checking a protocol on an object and aliasing the object. Most onerous is the restriction that any type with a linear component must itself be linear. Because of this, checking a protocol on an object imposes aliasing restrictions on any data structure that directly or indirectly points to the object. We propose a new type system that reduces these restrictions with the adoption and focus constructs. Adoption safely allows a programmer to alias objects on which she is checking protocols, and focus allows the reverse. A programmer can alias data structures that point to linear objects and use focus for safe access to those objects. We discuss how we implemented these ideas in the Vault programming language.
14
BI as an assertion language for mutable data structures
Samin Ishtiaq, Peter W. O’Hearn · ACM SIGPLAN Notices · 2011 · 499 citations
Enforcing high-level protocols in low-level software
Robert DeLine, Manuel Fähndrich · 2001 · 487 citations
Linear Types can Change the World
Philip Wadler · 1990 · 389 citations
Parametric shape analysis via 3-valued logic
Mooly Sagiv, Thomas Reps, Reinhard Wilhelm · 1999 · 338 citations