Changes between Version 8 and Version 9 of ContractReduction


Ignore:
Timestamp:
07/02/14 15:48:15 (12 years ago)
Author:
zmanchun
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ContractReduction

    v8 v9  
    1919
    2020
     21DEFAULT (when the `$depend` expression is absent): if no `$ample` expression is present, then the library enabler needs to calculate the ample set.
    2122
    22 I think the following can be done just using the ternary operator `?`:
    23 
    24 Conditional amples set: `[COND] $ample{EXPR1} : $ample(EXPR2)`
    25     if `COND` is satisfied then processes satisfying `EXPR1` should be in the ample set;
    26     otherwise, `EXPR2` is considered.
    27 
    28 Absent ample set (DEFAULT case): if no `$ample` expression is present, then the library enabler needs to calculate the ample set.
    29 
    30    
    3123Examples:
    3224- The following means that any process that can reach the memory unit of `comm` should be in the ample set if the current process (`$self`) is to be chosen in the ample set.
    3325{{{
    34 $ample{$reach(comm)}
    35 void comm_deque($comm comm, ....);
     26void comm_deque($comm comm, ....)
     27  $depend $access(void * obj);
     28;
    3629}}}
    3730
    3831- The following means that any process that can reach any of the memory units reachable from `a` or write any of the memory units reachable from `a` now or in the future should be in the ample set if the current process (`$self`) is to be chosen in the ample set.
    3932{{{
    40 $ample{$reach_from(a) || $write_from(b)}
    41 void strcpy(char *a, char *b);
     33void strcpy(char *a, char *b)
     34  $depend $accessRegion(a) || $writeRegion(b);
     35;
    4236}}}
    4337
    4438- The following means that the current process itself can form the ample set.
    4539{{{
    46 $ample($false)
    47 int $comm_size($comm, ...);
     40int $comm_size($comm, ...)
     41  $depend $false;
     42;
    4843}}}
    4944
    5045- The following means that if the argument `count` is equal to zero, then the current process forms the ample set, otherwise, any process that can reach the memory unit of object `comm` should be in the ample set.
    5146{{{
    52 [count = 0] $ample{$false} : $ample{$reach(comm)}
    53 void comm_deque($comm comm, int count ....);
     47void comm_deque($comm comm, int count ....)
     48  $depend count==0 ? $false : $access(comm);
     49;
    5450}}}