TitleVerifying determinism in sequential programs
Publication TypeConference Paper
Year of Publication2021
AuthorsMudduluru R, Waataja J, Millstein S, Ernst MD
Conference NameICSE 2021, Proceedings of the 43rd International Conference on Software Engineering
Pagination37-49
Date or Month PublishedMay
Conference LocationMadrid, Spain
AbstractWhen a program is nondeterministic, it is difficult to test and debug. Nondeterminism occurs even in sequential programs: e.g., by iterating over the elements of a hash table. \par We have created a type system that expresses determinism specifications in a program. The key ideas in the type system are type qualifiers for nondeterminism, order-nondeterminism, and determinism; type well-formedness rules to restrict collection types; and enhancements to polymorphism that improve precision when analyzing collection operations. While state-of-the-art nondeterminism detection tools rely on observing output from specific runs, our approach soundly verifies determinism at compile time. \par We implemented our type system for Java. Our type checker, the Determinism Checker, warns if a program is nondeterministic or verifies that the program is deterministic. In case studies of 90097 lines of code, the Determinism Checker found 87 previously-unknown nondeterminism errors, even in programs that had been heavily vetted by developers who were greatly concerned about nondeterminism errors. In experiments, the Determinism Checker found all of the non-concurrency-related nondeterminism that was found by state-of-the-art dynamic approaches for detecting flaky tests.
Downloadshttps://homes.cs.washington.edu/~mernst/pubs/determinism-tr210201.pdf extended version (PDF) https://github.com/t-rasmud/checker-framework/tree/nondet-checker implementation https://doi.org/10.5281/zenodo.4536285 experimental data
Citation KeyMudduluruWME2021