Type Inference for Deadlock Detection in a Multithreaded Polymorphic Typed Assembly Language

Vasco T. Vasconcelos
(University of Lisbon)
Francisco Martins
(University of Lisbon)
Tiago Cogumbreiro
(University of Lisbon)

We previously developed a polymorphic type system and a type checker for a multithreaded lock-based polymorphic typed assembly language (MIL) that ensures that well-typed programs do not encounter race conditions. This paper extends such work by taking into consideration deadlocks. The extended type system verifies that locks are acquired in the proper order. Towards this end we require a language with annotations that specify the locking order. Rather than asking the programmer (or the compiler's backend) to specifically annotate each newly introduced lock, we present an algorithm to infer the annotations. The result is a type checker whose input language is non-decorated as before, but that further checks that programs are exempt from deadlocks.

In Alastair R. Beresford and Simon Gay: Proceedings Second International Workshop on Programming Language Approaches to Concurrency and Communication-cEntric Software (PLACES 2009), York, UK, 22nd March 2009, Electronic Proceedings in Theoretical Computer Science 17, pp. 95–109.
Published: 6th February 2010.

ArXived at: http://dx.doi.org/10.4204/EPTCS.17.8 bibtex PDF

Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org