MobilityReadingGroup

π-calculus, Session Types research at Imperial College

Static Race Detection and Mutex Safety and Liveness for Go Programs
Julia GABET, Nobuko YOSHIDA
To appear in
34th European Conference on Object-Oriented Programming (ECOOP 2020)

Go is a popular concurrent programming language thanks to its ability to efficiently combine concurrency and systems programming. In Go programs, a number of concurrency bugs can be caused by a mixture of data races and communication problems. In this paper, we develop a theory based on behavioural types to statically detect data races and deadlocks in Go programs. We first specify lock safety/liveness and data race properties over a Go program model, using the happens-before relation defined in the Go memory model. We represent these properties of programs in a μ-calculus model of types, and validate them using type-level model-checking. We then extend the framework to account for Go’s channels, and implement a static verification tool which can detect concurrency errors. This is, to the best of our knowledge, the first static verification framework of this kind for the Go language, uniformly analysing concurrency errors caused by a mix of shared memory accesses and asynchronous message-passing communications.

@inproceedings{GY2020,
  author = {Julia Gabet and Nobuko Yoshida},
  title = {{Static Race Detection and Mutex Safety and Liveness for Go Programs}},
  booktitle = {34th European Conference on Object-Oriented Programming},
  pages = {--},
  year = 2020
}
@inproceedings{GY2020,
  author = {Julia Gabet and Nobuko Yoshida},
  title = {{Static Race Detection and Mutex Safety and Liveness for Go Programs}},
  booktitle = {34th European Conference on Object-Oriented Programming},
  pages = {--},
  doi = "10.4230/LIPIcs.ECOOP.2020.4",
  year = 2020
}