Changes between Version 8 and Version 9 of ContractReduction
- Timestamp:
- 07/02/14 15:48:15 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ContractReduction
v8 v9 19 19 20 20 21 DEFAULT (when the `$depend` expression is absent): if no `$ample` expression is present, then the library enabler needs to calculate the ample set. 21 22 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 31 23 Examples: 32 24 - 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. 33 25 {{{ 34 $ample{$reach(comm)} 35 void comm_deque($comm comm, ....); 26 void comm_deque($comm comm, ....) 27 $depend $access(void * obj); 28 ; 36 29 }}} 37 30 38 31 - 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. 39 32 {{{ 40 $ample{$reach_from(a) || $write_from(b)} 41 void strcpy(char *a, char *b); 33 void strcpy(char *a, char *b) 34 $depend $accessRegion(a) || $writeRegion(b); 35 ; 42 36 }}} 43 37 44 38 - The following means that the current process itself can form the ample set. 45 39 {{{ 46 $ample($false) 47 int $comm_size($comm, ...); 40 int $comm_size($comm, ...) 41 $depend $false; 42 ; 48 43 }}} 49 44 50 45 - 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. 51 46 {{{ 52 [count = 0] $ample{$false} : $ample{$reach(comm)} 53 void comm_deque($comm comm, int count ....); 47 void comm_deque($comm comm, int count ....) 48 $depend count==0 ? $false : $access(comm); 49 ; 54 50 }}}
