Changes between Version 2 and Version 3 of AST
- Timestamp:
- 04/18/11 14:06:23 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AST
v2 v3 29 29 * name: string 30 30 * type node 31 * identifier 32 * this is a type that is just a name, e.g., resulting from a C typedef. This will node will eventually be replaced by a more specific type tree once type definitions are processed. 31 33 * void 32 34 * integer … … 46 48 * name 47 49 * sequence of elements 48 * function declaration node (no body) 49 * function definition node (body) 50 * type definition node (typedef...) 50 * variable definition 51 * scope 52 * name (together with scope, this uniquely identifies the variable) 53 * type 54 * variable declaration: each declaration has an associated definition. There can be many decls associated to one def. This is a linking thing: a single variable that is to be used in several files will be defined in one file but be declared in all 55 * scope 56 * name 57 * type 58 * function definition: a function with a body. As with variables, one def. can have many decls, but each decl is associated to at most one definition. 59 * name 60 * list of formal names and types 61 * return type 62 * statement (body) 63 * function declaration: no body, just "prototype" in C 64 * type definition node 65 * name: string 66 * theType: type (type being assigned a name) 51 67 * statements (may have label) 52 * assign (translate x+=a, x*=a, ...) 68 * assign: lhs:=rhs; Note statements like x+=a, x*=a will be immediately translated to x:=x+1, x:=x*a, etc. 69 * lhs: LeftHandSideExpression 70 * rhs: expression 53 71 * assert 72 * expr: Expression 54 73 * assume 74 * expr: Expression 55 75 * pragma (any kind of pragma, represented as just a string) 56 * string 76 * string: this is an initial form, where the text of the pragma is uninterpreted. After a certain processing stage, TASS pragmas will be parsed and replaced with more specific nodes. Non-tass pragmas will just remain as strings and will be ignored by TASS. 57 77 * assert, assume, invariant, input, output, ... 58 * case statement (select) 78 * switch statement: this can be used to model C's switch 79 * expression: expression that is evaluated 80 * list of cases 81 * value 82 * statement (or something like that) 59 83 * if-then, if-then-else 60 84 * while
