Work

Lightweight Specifications for Parallel Correctness

Year: 2012
Type: dissertation
Abstract: With the spread of multicore processors, it is increasingly necessaryfor programmers to write parallel software. Yet writing correctparallel software with explicit multithreading remains a difficultundertaking. Though many tools exist to help test, debug, and verifyparallel programs, such tools are often hindered by a lack of anyspecification from the programmer of the intended, correct parallelbehavior of his or her software.In this dissertation, we propose three novel lightweightspecifications for the parallelism correctness of multithreadedsoftware: semantic determinism, semantic atomicity, andnondeterministic sequential specifications for parallelismcorrectness. Our determinism specifications enable a programmer tospecify that any run of a parallel program on the same input shoulddeterministically produce the same output, despite thenondeterministic interleaving of the program's parallel threads ofexecution. Key to our determinism specifications are our proposedbridge predicates -- predicates that compare pairs of program statesfrom different executions for semantic equivalence. Our atomicityspecifications use bridge predicates to generalize traditionalatomicity, enabling a programmer to specify that regions of a parallelor concurrent program are, at a high-level, free from harmfulinterference by other threads. Finally, our nondeterministicsequential (NDSeq) specifications enable a programmer to completelyspecify the parallelism correctness of a multithreaded program with asequential but nondeterministic version of the program and, further,enable a programmer to test, debug, and verify functional correctnesssequentially, on the nondeterministic sequential program.We show that our lightweight specifications for parallelismcorrectness enable us to much more effectively specify, test, debug,and verify the use of parallelism in multithreaded software,independent of complex and fundamentally-sequential functionalcorrectness. We show that we can easily write determinism, atomicity,and nondeterministic sequential (NDSeq) specifications for a number ofparallel Java benchmarks. We propose novel testing techniques forchecking that a program conforms to its determinism, atomicity, ornondeterministic sequential specification, and we apply thesetechniques to find a number of parallelism errors in our benchmarks.Further, we propose techniques for automatically inferring a likelydeterminism or NDSeq specification for a parallel program, given ahandful of representative executions.
Language: English
Subfield: Software
Open Access status: green
OpenAlex ID: W6992513215
Cites:
Cited by:
Related to: 10