Programming with angelic nondeterminism

The work

AuthorsShaon Barman; Rastislav Bodík; Satish Chandra; Joel Galenson; Doug Kimelman; Casey Rodarmor; Nicholas Tung
Typeinproceedings
Year2010
Citekeybarman2010programming

Where it appeared

Published inProceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
PublisherACM
Pages339--352

Abstract

Angelic nondeterminism can play an important role in program development. It simplifies specifications, for example in deriving programs with a refinement calculus; it is the formal basis of regular expressions; and Floyd relied on it to concisely express backtracking algorithms such as N-queens. We show that angelic nondeterminism is also useful during the development of deterministic programs. The semantics of our angelic operator are the same as Floyd’s but we use it as a substitute for yet-to-be-written deterministic code; the final program is fully deterministic. The angelic operator divines a value that makes the program meet its specification, if possible. Because the operator is executable, it allows the programmer to test incomplete programs: if a program has no safe execution, it is already incorrect; if a program does have a safe execution, the execution may reveal an implementation strategy to the programmer. We introduce refinement-based angelic programming, describe our embedding of angelic operators into Scala, report on our implementation with bounded model checking, and describe our experience with two case studies. In one of the studies, we use angelic operators to modularize the Deutsch-Schorr-Waite (DSW) algorithm. The modularization is performed with the notion of a parasitic stack, whose incomplete specification was instantiated for DSW with angelic nondeterminism.

A copy is held

pdf, 580.9 kB. Not published — it may be under copyright. The facts and links here are.

How it got here

How it got hereagent via crossref
Added2026-08-17 00:00 UTC
Approved bya person 2026-08-17 14:03 UTC

Filed under

angels-and-demons

Cite it as

@inproceedings{barman2010programming,
  title        = {Programming with angelic nondeterminism},
  author       = {Shaon Barman and Rastislav Bodík and Satish Chandra and Joel Galenson and Doug Kimelman and Casey Rodarmor and Nicholas Tung},
  year         = {2010},
  booktitle    = {Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages},
  pages        = {339--352},
  publisher    = {ACM},
  doi          = {10.1145/1706299.1706339},
}

This record lives at https://refs.drheap.org/barman2010programming/ and will keep doing so.