Testing Message-Passing Concurrency

📅 2025-05-08
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This paper addresses the fundamental problem of consistency checking for execution histories in message-passing concurrency (e.g., Go/Rust channels): given a partial execution trace, determine whether it can be extended to a complete, semantically valid history satisfying channel semantics. We establish the first systematic parameterized complexity framework for this long-standing open problem, characterizing how thread count, channel count, and channel capacity jointly affect decidability. Innovatively extending consistency verification from shared-memory to channel-based models, we precisely delineate its solvability boundary: we devise near-optimal polynomial-time algorithms when either channel capacity or thread count is bounded, and prove NP-hardness and PSPACE-hardness under minimal parameter combinations. Our constraint-based modeling and automated verification techniques enable efficient tool implementation, providing a theoretical foundation for formal verification of channel-based concurrent programs.

Technology Category

Application Category

📝 Abstract
A key computational question underpinning the automated testing and verification of concurrent programs is the emph{consistency question} -- emph{given a partial execution history, can it be completed in a consistent manner?} Due to its importance, consistency testing has been studied extensively for memory models, as well as for database isolation levels. A common theme in all these settings is the use of shared-memory as the primal mode of interthread communication. On the other hand, modern programming languages, such as Go, Rust and Kotlin, advocate a paradigm shift towards channel-based (i.e., message-passing) communication. However, the consistency question for channel-based concurrency is currently poorly understood. In this paper we lift the study of fundamental consistency problems to channels, taking into account various input parameters, such as the number of threads executing, the number of channels, and the channel capacities. We draw a rich complexity landscape, including upper bounds that become polynomial when certain input parameters are fixed, as well as hardness lower bounds. Our upper bounds are based on novel algorithms that can drive the verification of channel consistency in automated verification tools. Our lower bounds characterize minimal input parameters that are sufficient for hardness to arise, and thus shed light on the intricacies of testing channel-based concurrency. In combination, our upper and lower bounds characterize the boundary of emph{tractability/intractability} of verifying channel consistency, and imply that our algorithms are often (nearly) optimal.
Problem

Research questions and friction points this paper is trying to address.

Study consistency in message-passing concurrency models
Analyze complexity of channel-based consistency verification
Develop algorithms for automated channel consistency testing
Innovation

Methods, ideas, or system contributions that make the work stand out.

Study consistency in message-passing concurrency models
Develop algorithms for automated channel consistency verification
Establish complexity bounds for channel-based concurrency testing