begin model inter-b
| begin input variables
| | E : real;
| | | inter-b-tass.c 1.13--2.8: "inputfloat E;"
| end input variables;
| begin output variables
| | res : real;
| | | inter-b-tass.c 4.13--5.10: "outputfloat res;"
| end output variables;
| begin process 0
| | main function : main;
| | begin function main
| | | | inter-b-tass.c 13.0--13.11: "void main()"
| | | begin proper local variables
| | | | T : Record[; x:real, y:real][3];
| | | | | inter-b-tass.c 15.2--15.13: "paire T[3];"
| | | | U : real[3];
| | | | | inter-b-tass.c 16.2--16.13: "float U[3];"
| | | | compteur : int;
| | | | | inter-b-tass.c 17.2--17.15: "int compteur;"
| | | end proper local variables;
| | | start location : 0;
| | | begin location 0
| | | | kind : ASSIGNMENT;
| | | | U[0] = (real)3; goto location 1;
| | | | | inter-b-tass.c 19.2--19.11: "U[0] = 3;"
| | | end location 0;
| | | begin location 1
| | | | kind : ASSIGNMENT;
| | | | U[1] = 29/20; goto location 2;
| | | | | inter-b-tass.c 20.2--20.14: "U[1] = 1.45;"
| | | end location 1;
| | | begin location 2
| | | | kind : ASSIGNMENT;
| | | | U[2] = 1/5; goto location 3;
| | | | | inter-b-tass.c 21.2--21.13: "U[2] = 0.2;"
| | | end location 2;
| | | begin location 3
| | | | kind : ASSIGNMENT;
| | | | T[0].x = 1/10; goto location 4;
| | | | | inter-b-tass.c 23.2--23.15: "T[0].x = 0.1;"
| | | end location 3;
| | | begin location 4
| | | | kind : ASSIGNMENT;
| | | | T[1].x = 29/5; goto location 5;
| | | | | inter-b-tass.c 24.2--24.15: "T[1].x = 5.8;"
| | | end location 4;
| | | begin location 5
| | | | kind : ASSIGNMENT;
| | | | T[2].x = (real)32; goto location 6;
| | | | | inter-b-tass.c 25.2--25.14: "T[2].x = 32;"
| | | end location 5;
| | | begin location 6
| | | | kind : ASSIGNMENT;
| | | | T[0].y = (real)0; goto location 7;
| | | | | inter-b-tass.c 27.2--27.13: "T[0].y = 0;"
| | | end location 6;
| | | begin location 7
| | | | kind : ASSIGNMENT;
| | | | T[1].y = (T[1].x)*U[0]; goto location 8;
| | | | | inter-b-tass.c 28.2--28.25: "T[1].y = T[1].x * U[0];"
| | | end location 7;
| | | begin location 8
| | | | kind : ASSIGNMENT;
| | | | T[2].y = (T[1].y)+(((T[2].x)-(T[1].x))*U[1]); goto location 9;
| | | | | inter-b-tass.c 29.2--29.45: "T[2].y = T[1].y + (T[2].x - T[1].x) * U[1];"
| | | end location 8;
| | | begin location 9
| | | | kind : ASSIGNMENT;
| | | | compteur = 0; goto location 10;
| | | | | inter-b-tass.c 34.2--34.15: "compteur = 0;"
| | | end location 9;
| | | begin location 10
| | | | kind : CHOICE;
| | | | when compteur < 3 && (T[compteur+1].x) <= E goto location 11;
| | | | | inter-b-tass.c 35.2--35.48: "while ((compteur<3) && (E >= T[compteur+1].x))"
| | | | when !(compteur < 3 && (T[compteur+1].x) <= E) goto location 12;
| | | | | inter-b-tass.c 35.2--35.48: "while ((compteur<3) && (E >= T[compteur+1].x))"
| | | end location 10;
| | | begin location 11
| | | | kind : ASSIGNMENT;
| | | | compteur = compteur+1; goto location 10;
| | | | | inter-b-tass.c 36.4--36.15: "compteur++;"
| | | end location 11;
| | | begin location 12
| | | | kind : ASSIGNMENT;
| | | | res = ((E-(T[compteur].x))*U[compteur])+(T[compteur].y); goto location 13;
| | | | | inter-b-tass.c 38.2--38.54: "res = (E-T[compteur].x)*U[compteur] + T[compteur].y;"
| | | end location 12;
| | | begin location 13
| | | | kind : RETURN;
| | | | return null; goto location 14;
| | | | | inter-b-tass.c 39.0--39.0: "}"
| | | end location 13;
| | | begin location 14
| | | | kind : TERMINAL;
| | | end location 14;
| | end function main;
| end process 0;
end model inter-b.
