Expressing Imperative Programs Functionally (3 of 4)
lInterpretation of the functions thus introduced:
lGiven the argument values as the state, the function produces the value that the program would eventually produce if it were started in that state at the indicated arc.
x = 1;
a = 1;
a = a*x;
x = x+1;
x <= n
yes
no
input n
output a
fac(n)
f1(a, n, x)
f2(a, n, x)
f1(a, n, x)
This arc is regarded as the same as the one above.