Changes between Version 14 and Version 15 of C to tass-AST xml
- Timestamp:
- 04/10/11 20:20:48 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
C to tass-AST xml
v14 v15 16 16 17 17 18 Preprocessing: first, the file is preprocessed to create a stream of tokens with original source information.18 Preprocessing: before an AST is created, the source file(s) are preprocessed to create a stream of tokens with complete source information. This stream is fed to the parser which creates the AST. 19 19 20 20 All AST nodes have source information. … … 30 30 * assign 31 31 * assert 32 * pragma 32 * assume 33 * pragma (any kind of pragma, represented as just a string) 33 34 * string 34 35 * assert, assume, invariant, input, output, ... 35 * switch36 * case statement (select) 36 37 * if-then, if-then-else 37 38 * while … … 51 52 * static, ...? 52 53 * expressions (may have side-effects) 53 * literals (including named literals) 54 * literals (including named literals): integers, reals, strings, chars 54 55 * variable 55 56 * operators: +,-,*,/,%,<,<=,>,>=,==,!=,!,&&,\|\| … … 62 63 * function invocation f(x) 63 64 * initializers 65 * sizeof (type, expression, or string literal) 66 * startOf(a): &a[0] -- that is the Cil way of converting an array to pointer to first element 67 64 68 65 69 == Processing Stages == … … 69 73 Stages 70 74 1. All variables, types, etc., are represented simply as identifiers 71 1. Symbol table information is used to annotatethe AST75 1. Symbol table information is associated to the identifiers in the AST 72 76 1. (Static) types are created and associated to every expression 73 77 1. Variable objects are created and inserted into AST 74 1. Variables may be moved around to facilitate translation to model, .... 78 1. Side effects are removed by introducing temp variables 79 1. Local variables are all lifted to outermost scope 75 80 76 81
