2012 · 44 citations · 20 references
ComputingComputer ScienceAccess ManagementFormal MethodsProgramming LanguagesData-flow AnalysisType CheckingType SystemsAlias StructureBorrow CheckingConcurrency PrimitivesFormal Language TheoryLanguage CorrectnessPermissions
In object-oriented programming, unique permissions to object references are useful for checking correctness properties such as consistency of typestate and noninterference of concurrency. To be usable, unique permissions must be borrowed --- for example, one must be able to read a unique reference out of a field, use it for something, and put it back. While one can null out the field and later reassign it, this paradigm is ungainly and requires unnecessary writes, potentially hurting cache performance. Therefore, in practice borrowing must occur in the type system, without requiring memory updates. Previous systems support borrowing with external alias analysis and/or explicit programmer management of fractional permissions. While these approaches are powerful, they are also awkward and difficult for programmers to understand. We present an integrated language and type system with unique, immutable, and shared permissions, together with new local permissions that say that a reference may not be stored to the heap. Our system also includes change permissions such as unique>>unique and unique>>none that describe how permissions flow in and out of method formal parameters. Together, these features support common patterns of borrowing, including borrowing multiple local permissions from a unique reference and recovering the unique reference when the local permissions go out of scope, without any explicit management of fractions in the source language. All accounting of fractional permissions is done by the type system "under the hood." We present the syntax and static and dynamic semantics of a formal core language and state soundness results. We also illustrate the utility and practicality of our design by using it to express several realistic examples.
20
Jean-Yves Girard · Theoretical Computer Science · 1987 · 4.1K citations
Ownership types for safe programming
Chandrasekhar Boyapati, Robert Lee, Martin Rinard · 2002 · 571 citations
Enforcing high-level protocols in low-level software
Robert DeLine, Manuel Fähndrich · 2001 · 487 citations
Region-based memory management in cyclone
Dan Grossman, Greg Morrisett, Trevor Jim et al. · 2002 · 407 citations
Checking interference with fractional permissions
2003 · 388 citations