= Notes on TASS AST and Translation to Model = == Elements of a TASS AST == * identifiers * type expressions * integer, real, boolean, char, t[], t*, record{...} * function definitions (body) * function declarations (no body) * type definitions (typedef...) * statements * assign * assert * pragma * switch * if-then, if-then-else * while * for * until * break * compound ({...}) * variable declaration section * sequence of statements * variable declaration * with possible initialization expression * possible array extents information and other information modifying type? * static, ...? * expressions (may have side-effects) * literals (including named literals) * variable * +,-,*,/,%,<,<=,>,>=,==,!=,!,&&,|| * x++, x--, x+=a, x*=a, ... * bit-wise operators? * &,* (pointer operations) * cast-to-t * a[i] (array index) * x.a (record navigation) * function invocation f(x) C Example: {{{ #include #include int main(int argc, char *argv[]) { double result = 0.0; int n = atoi(argv[1]); int i; double a[n]; FILE *fp = fopen("data","r"); for (i=0; i 0.000000e+00 1 0 0 0 }}}