begin model spec
| begin input variables
| | tol : real;
| | | fib_spec.c 1.13--2.11: "input double tol;"
| end input variables;
| begin output variables
| | phi : real;
| | | fib_spec.c 3.13--4.11: "output double phi;"
| end output variables;
| begin process 0
| | main function : main;
| | begin function main
| | | | fib_spec.c 6.0--6.11: "void main()"
| | | begin proper local variables
| | | | i : real;
| | | | | fib_spec.c 7.1--7.10: "double i;"
| | | | j : real = 1;
| | | | | fib_spec.c 8.1--8.14: "double j=1.0;"
| | | | k : real = 1;
| | | | | fib_spec.c 9.1--9.14: "double k=1.0;"
| | | | err : real = tol;
| | | | | fib_spec.c 10.1--10.16: "double err=tol;"
| | | | tmp : real;
| | | | | fib_spec.c 11.1--11.12: "double tmp;"
| | | | p : real = 0;
| | | | | fib_spec.c 12.1--12.14: "double p=0.0;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : CHOICE;
| | | | label : l;
| | | | when tol <= err goto location 1;
| | | | | fib_spec.c 14.3--14.19: "while (err>=tol)"
| | | | when !tol <= err goto location 9;
| | | | | fib_spec.c 14.3--14.19: "while (err>=tol)"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | i = j; goto location 2;
| | | | | fib_spec.c 15.2--15.6: "i=j;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | j = k; goto location 3;
| | | | | fib_spec.c 15.7--15.11: "j=k;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | k = i+j; goto location 4;
| | | | | fib_spec.c 15.12--15.18: "k=i+j;"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | tmp = k/j; goto location 5;
| | | | | fib_spec.c 15.19--15.29: "tmp = k/j;"
| | | end location 4;
| | | begin location 5
| | | | kind : CHOICE;
| | | | when p <= tmp goto location 6;
| | | | | fib_spec.c 16.2--16.13: "if (tmp>=p)"
| | | | when !p <= tmp goto location 7;
| | | | | fib_spec.c 16.2--16.13: "if (tmp>=p)"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | err = tmp-p; goto location 8;
| | | | | fib_spec.c 16.14--16.24: "err=tmp-p;"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | err = p-tmp; goto location 8;
| | | | | fib_spec.c 16.30--16.40: "err=p-tmp;"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | p = tmp; goto location 0;
| | | | | fib_spec.c 17.2--17.10: "p = tmp;"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | phi = p; goto location 10;
| | | | | fib_spec.c 19.1--19.7: "phi=p;"
| | | end location 9;
| | | begin location 10
| | | | kind : RETURN;
| | | | return null; goto location 11;
| | | | | fib_spec.c 20.0--20.0: "}"
| | | end location 10;
| | | begin location 11
| | | | kind : TERMINAL;
| | | end location 11;
| | end function main;
| end process 0;
end model spec.
