Visible to the public Static Deadlock Detection for Concurrent Go by Global Session Graph Synthesis

TitleStatic Deadlock Detection for Concurrent Go by Global Session Graph Synthesis
Publication TypeConference Paper
Year of Publication2016
AuthorsNg, Nicholas, Yoshida, Nobuko
Conference NameProceedings of the 25th International Conference on Compiler Construction
Date PublishedMarch 2016
PublisherACM
Conference LocationNew York, NY, USA
ISBN Number978-1-4503-4241-4
KeywordsCommunication safety, composability, Concurrent Go, deadlock freedom, graph theory, Human Behavior, malware analysis, pubcrawl, Resiliency, Session types, static analysis, static code analysis, Synthesis, type safety
Abstract

Go is a programming language developed at Google, with channel-based concurrent features based on CSP. Go can detect global communication deadlocks at runtime when all threads of execution are blocked, but deadlocks in other paths of execution could be undetected. We present a new static analyser for concurrent Go code to find potential communication errors such as communication mismatch and deadlocks at compile time. Our tool extracts the communication operations as session types, which are then converted into Communicating Finite State Machines (CFSMs). Finally, we apply a recent theoretical result on choreography synthesis to generate a global graph representing the overall communication pattern of a concurrent program. If the synthesis is successful, then the program is free from communication errors. We have implemented the technique in a tool, and applied it to analyse common Go concurrency patterns and an open source application with over 700 lines of code.

URLhttps://dl.acm.org/doi/10.1145/2892208.2892232
DOI10.1145/2892208.2892232
Citation Keyng_static_2016