begin model multierr
| begin input variables
| | n : int;
| | | multierr.c 6.13--7.6: "inputint n;"
| | extent : int;
| | | multierr.c 8.13--9.11: "inputint extent;"
| end input variables;
| begin output variables
| end output variables;
| begin process 0
| | main function : main;
| | begin function main
| | | | multierr.c 11.0--11.11: "void main()"
| | | begin proper local variables
| | | | m : int = 10/n;
| | | | | multierr.c 14.1--14.14: "int m = 10/n;"
| | | | a : real[extent];
| | | | | multierr.c 17.1--17.18: "double a[extent];"
| | | | q : pointer(1)<real> = &a[0];
| | | | | multierr.c 19.1--19.19: "double *q = &a[0];"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSERTION;
| | | | assert 1 <= n;  goto location 1;
| | | | | multierr.c 22.1--22.13: "assert n>=1;"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | a[3] = 157/50; goto location 2;
| | | | | multierr.c 25.1--25.13: "a[3] = 3.14;"
| | | end location 1;
| | | begin location 2
| | | | kind : INVOCATION;
| | | | leak(); goto location 3;
| | | | | multierr.c 28.1--28.8: "leak();"
| | | end location 2;
| | | begin location 3
| | | | kind : INVOCATION;
| | | | free(q); goto location 4;
| | | | | multierr.c 32.1--32.9: "free(q);"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSERTION;
| | | | assert 1==1;  goto location 5;
| | | | | multierr.c 34.1--34.13: "assert 1==1;"
| | | end location 4;
| | | begin location 5
| | | | kind : RETURN;
| | | | return null; goto location 6;
| | | | | multierr.c 35.0--35.0: "}"
| | | end location 5;
| | | begin location 6
| | | | kind : TERMINAL;
| | | end location 6;
| | end function main;
| | begin function leak
| | | | multierr.c 38.0--38.11: "void leak()"
| | | begin proper local variables
| | | | p : pointer(1)<real>;
| | | | | multierr.c 39.1--39.11: "double *p;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ALLOCATE;
| | | | p = (real*) malloc(10*sizeof(real)); goto location 1;
| | | | | multierr.c 41.1--41.40: "p = (double*)malloc(10*sizeof(double));"
| | | end location 0;
| | | begin location 1
| | | | kind : RETURN;
| | | | return null; goto location 2;
| | | | | multierr.c 42.0--42.0: "}"
| | | end location 1;
| | | begin location 2
| | | | kind : TERMINAL;
| | | end location 2;
| | end function leak;
| | begin function free
| | | | null
| | | begin formal parameters
| | | | pointer : pointer(2)<void>;
| | | | | null
| | | end formal parameters;
| | end function free;
| end process 0;
end model multierr.
