Changes between Version 106 and Version 107 of IR


Ignore:
Timestamp:
12/01/15 11:23:45 (10 years ago)
Author:
zmanchun
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR

    v106 v107  
    338338 * updates `i`,`j`,... to be the value of the next tuple in `dom` after `<i,j,...>`
    339339 * if `i`, or `j`, ... is undefined, then `i`, `j`, ... are updated to be the value of the first tuple in `dom`
    340 * `FOR_ENTER dom, <i,j,...>;`: updates `<i,j,...>` to be the next element in domain
    341  * **FIX ME**
     340 * The CIVL-C code `$for(int i,j,k: dom) S;` is translated into the following:
     341{{{
     342var i: Integer;
     343var j: Integer;
     344...
     345ASSIGN "i", new(Integer);
     346ASSIGN "j", new(Integer);
     347...
     348begin choose
     349  when(hasnext(dom, <i,j,...>)) NEXT(dom, <i,j,...>); goto L1;
     350  when(not(hasnext(dom, <i,j,...>))) ; goto L2;
     351end choose
     352L1:
     353  S; goto L2;
     354L2:
     355  ...
     356}}}
     357
    342358
    343359==  Function Definitions ==