Content deleted Content added
Links added Tags: Mobile edit Mobile web edit Advanced mobile edit |
m formatting fix |
||
Line 2:
{{Programming paradigms}}
A '''nondeterministic programming''' language is a [[programming language|language]] which can specify, at certain points in the [[Computer program|program]] (called "choice points"), various alternatives for [[Control flow|program flow]]. Unlike an [[Conditional (programming)|if-then statement]], the method of choice between these alternatives is not directly specified by the programmer; the program must decide at [[
One method of choice is embodied in [[backtracking]] systems (such as [[Amb (evaluator)|Amb]],<ref>https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-28.html#%_sec_4.3.3</ref> or unification in [[Prolog]]), in which some alternatives may "fail," causing the program to backtrack and try other alternatives. If all alternatives fail at a particular choice point, then an entire branch fails, and the program will backtrack further, to an older choice point. One complication is that, because any choice is tentative and may be remade, the system must be able to restore old program states by undoing side-effects caused by partially executing a branch that eventually failed.
|