Identification Division.
Program-Id. Deadlock.
* from Wilfried Brauer
* about Rabin-Scott automata
* Automatentheorie
* Teubner 1984
Data Division.
Working-Storage Section.
77 z pic S9(4)V9(4).
77 y1 pic S9(4)V9(4).
77 y2 pic S9(4)V9(4).
Linkage Section.
77 x pic S9(4)V9(4).
Procedure Division using x returning z.
* simultaneous moves
move x to y1
move x to y2
M1.
if function p(y1) goto M2
M3.
if function q(y2) goto M4
move y1 to z
stop run
M2.
move function f(y1) to y1
goto M1
M4.
* simultaneous moves
move function g(y1) to y1
move function f(y2) to y2
goto M3
End-Program Deadlock.
¤ Dauer der Verarbeitung: 0.3 Sekunden
¤
*© Formatika GbR, Deutschland