Exploiting purity for atomicity
- 31 May 2005
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 31 (4) , 275-291
- https://doi.org/10.1109/tse.2005.47
Abstract
Multithreaded programs often exhibit erroneous behavior because of unintended interactions between concurrent threads. This paper focuses on the noninterference property of atomicity. A procedure is atomic if, for every execution, there is an equivalent serial execution in which the actions of the atomic procedure are not interleaved with actions of other threads. This key property makes atomic procedures amenable to sequential reasoning techniques, which significantly facilitates subsequent validation activities such as code inspection and testing. Several existing tools verify atomicity by using commutativity of actions to show that every execution reduces to a corresponding serial execution. However, experiments with these tools have highlighted a number of interesting procedures that, while intuitively atomic, are not reducible. In this paper, we exploit the notion of pure code blocks to verify the atomicity of such irreducible procedures. If a pure block terminates normally, then its evaluation does not change the program state and, hence, these evaluation steps can be removed from the program trace before reduction. We develop a static typed-based analysis for atomicity based on this insight, and we illustrate this analysis on a number of interesting examples that could not be verified using earlier tools based purely on reduction.Keywords
This publication has 33 references indexed in Scilit:
- Using partial orders to improve automatic verification methodsPublished by Springer Nature ,2005
- Checking Concise Specifications for Multithreaded Software.The Journal of Object Technology, 2004
- Run-Time Analysis for AtomicityElectronic Notes in Theoretical Computer Science, 2003
- Transactions for Software Model CheckingElectronic Notes in Theoretical Computer Science, 2003
- EraserACM Transactions on Computer Systems, 1997
- Linearizability: a correctness condition for concurrent objectsACM Transactions on Programming Languages and Systems, 1990
- Procedures as persistent data objectsACM Transactions on Programming Languages and Systems, 1985
- PS-algolACM SIGPLAN Notices, 1982
- ReductionCommunications of the ACM, 1975
- Towards a Theory of Parallel ProgrammingPublished by Springer Nature ,1972