Changes between Version 58 and Version 59 of IR


Ignore:
Timestamp:
11/25/15 16:14:44 (10 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR

    v58 v59  
    5151  a: Array[Integer];
    5252L1:
    53   when (\true) x:=3*y; goto L2;
     53  when (\true) assign x, \mul(3,y); goto L2;
    5454L2:
    55   when(\true) a_t:=\dytype(Array[Integer, x+1]); goto L3; // Array[Integer] is refined here using x+1
     55  when(\true) assign a_t, \dytype(Array[Integer, \add(x,1)]); goto L3; // Array[Integer] is refined here using x+1
    5656L3:
    57   when (\true) a:=\new(a_t); goto L4;
     57  when (\true) assign a, \new(a_t); goto L4;
    5858L4:
    5959}
     
    119119
    120120{{{
    121 // type definitions
    122121typedef S=Tuple[Array[Integer]];
    123122
    124 // variable decls
    125123n: Integer;
    126124S_d: Dytype[S];
     
    128126x2: S;
    129127
    130 // statements (leaving out the chooses and whens for brevity)
    131 n:=10;
    132 S_d:=\dytype(Tuple[Array[Integer, n]]);
    133 x1:=\new(S_d);
    134 n:=20;
    135 x2:=\new(S_d);
     128L0:
     129  when (\true) assign n, 10; goto L1;
     130L1:
     131  when (\true) assign S_d, \dytype(Tuple[Array[Integer, n]]); goto L2;
     132L2:
     133  when (\true) assign x1, \new(S_d); goto L3;
     134L3:
     135  when (\true) assign n, 20; goto L4;
     136L4:
     137  when (\true) assign x2, \new(S_d); goto L5;
     138L5:
    136139}}}
    137140
     
    224227== Declarations and Function Definitions ==
    225228
    226 Declarations follow the C notation.   Function prototypes are considered to be declarations similar to variable declarations.
     229Function prototypes are considered to be declarations similar to variable declarations.
    227230
    228231Example of declaration of a function:
    229232{{{
    230 f(Real x, Bool y; Integer);
     233f(x: Real, b: Bool): Float[32,33];
    231234}}}
    232235