Changes between Version 2 and Version 3 of AST


Ignore:
Timestamp:
04/18/11 14:06:23 (15 years ago)
Author:
Stephen Siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AST

    v2 v3  
    2929    * name: string
    3030 * 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.
    3133    * void
    3234    * integer
     
    4648       * name
    4749       * 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)
    5167 * 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
    5371   * assert
     72      * expr: Expression
    5473   * assume
     74      * expr: Expression
    5575   * 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.
    5777      * 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)
    5983   * if-then, if-then-else
    6084   * while