Concurrency analysis based on fractional permissions

  • Authors:
  • John Boyland;Yang Zhao

  • Affiliations:
  • The University of Wisconsin - Milwaukee;The University of Wisconsin - Milwaukee

  • Venue:
  • Concurrency analysis based on fractional permissions
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Concurrent programs are hard to write and debug because of the inherent concurrency and indeterminism. The most common runtime errors in concurrent programs are data races and deadlocks. This thesis presents a "fractional permission" type system for a Java-style shared-memory programs. A permission is a linear value associated with some piece of state in a program. Fractions are used to distinguish reads from writes and the permission nesting is used to indicate that some permissions may be nested in some others. With permission analysis, each expression in the program will be statically checked to determine whether it is permitted to be executed under the granted permissions. The permissions come from the design intent expressed by field and method an notations. Besides the traditional pointer annotations (uniqueness, nullity...), a field may have a protector, such that any access to this field should be in the synchronized block holding that protector object. Method annotations include not only the traditional "reads", "writes" effects, but also lock usage annotations including "requires", "uses" and lock ordering. We provide a fractional permission type system as well as the operational semantics for a simple object-oriented language. A consistency property between the static permission environment and the dynamic runtime state is established. The novel technical features of this approach include: (1) A unified permission form is created to represent all annotations in multithreaded programs including uniqueness, nullity, method effects, lock protected state etc.; (2) The previously published permission type system is extended to programs with unstructured parallelism and synchronization; (3) Fields are attached annotations indicating how they can be accessed safely; (4) Lock objects may be ordered based on some levels; (5) Permission nesting is used to simulate the protection mechanism between fields (data groups) and their guards; (6) Formal rules for permission typing, transformation and consistency.