A Flow Extension to Coroutine Types for Deadlock Detection in Go
Qiqi Jason Gu, Lixue Liu, Wei Ke

TL;DR
This paper introduces a Flow extension to Coroutine Types for better modeling of complex coroutine interactions, and develops a type system for deadlock detection in Go, effectively identifying common deadlock patterns.
Contribution
The novel Flow extension allows modeling of multiple receive and yield operations in coroutines, enhancing deadlock detection capabilities in Go programs.
Findings
Recognized 17 channel and goroutine interaction patterns.
Successfully integrated Z3 SMT solver for conditional execution analysis.
Outperformed existing deadlock detectors in accuracy on tested patterns.
Abstract
Coroutines, as an abstract programming construct, are a generalization of functions that can suspend execution part- way for later resumption. Coroutine Types are behavioral types to model interactions of coroutines with a single receiving operation followed by a single yielding operation. Coroutine Types have been applied to model-driven engineering, smart contracts, and test case generation. We contribute a Flow extension to Coroutine Types, so that coroutines with more than one receiving and yielding operation can be modeled. We accordingly revise the reduction rules of Coroutine Types. To show the usefulness of the Flow extension, we contribute a type system that maps expressions of the Go programming language to Coroutine Types. If the reduction result is 0, the two channel operations are paired properly and the program has no deadlocks. We choose Go because it is a popular…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsFormal Methods in Verification · Logic, programming, and type systems · Distributed systems and fault tolerance
