How can we design programs that gracefully handle uncertainty? This paper introduces "guarded commands" as fundamental building blocks for creating alternative and repetitive constructs in nondeterministic program components. These commands allow for program activities where the final state may not be uniquely determined by the initial state. The core of the work lies in presenting a calculus for the formal derivation of programs expressed using these guarded commands. This calculus provides a structured approach to developing and reasoning about nondeterministic programs, enhancing program clarity and reliability. By providing a formal framework for nondeterminacy, this research contributes to the advancement of program design methodologies, particularly for systems where flexibility and adaptability are crucial.
Published in Communications of the ACM, this paper addresses core topics in computer science relevant to the journal's readership. Given the journal's focus on advancements in computer programming and software engineering, the introduction of guarded commands and a calculus for nondeterministic programs aligns with the journal's emphasis on innovative programming techniques.