Content deleted Content added
Nils Grimsmo (talk | contribs) m Removed a section. Minor fixes. |
Nils Grimsmo (talk | contribs) m > --> < |
||
Line 1:
The programming language UNITY was constructed by K. Mani Chandy and Jayadev Misra for their book ''Parallel Program Design: A Foundation''. It is a rather theoretical language, which tries to focuse on ''what'', and not ''where'', ''when'' or ''how''. The peculiar thing about the language is that it has now flow control. The statements in the program run in a random order, until none of the statements any longer may cause change if run. A correct program converges into a ''fix-point''.
All statements are assignments, and are separated by <code>#</code>. A statement can consist of multiple assignments, on the form <code>a,b,c := x,y,z</code>, or <code>a := x || b := y || c := z</code>. You can also have a ''quantified statement list'', for example <code><# x,y : 0 < x < y < n :: ''statement''></code>, where x and y are chosen randomly among the values that satisfy the quantification. A ''quantified assignment'' is similar. In <code><|| x,y : 0 < x < y < n :: ''statement'' ><code>, the statement is executed simultaneously for ''all'' <code>x</code> and <code>y</code> satisfying <code>0 &
|