| Version 4 (modified by , 12 years ago) ( diff ) |
|---|
Contract Reduction Language
Given a process p that is at a state that a call to a system function f is enabled,
if p is chosen in the ample set, then the following represents the set of processes other than
p that have to be in the ample set as well:
$ample{ BOOLEAN EXPRESSION }
where
BOOLEAN EXPRESSIONis composed of the following functions overf's arguments (a, ...).
$reach(a, ...)
returns true iff the memory unit of the object
a(or others if present) is reachable by a given processp'.
$reach_from(a, ...)
returns true iff any of the memory units reachable from the object
a(or others if present) is reachable by a given processp'.
$write(a, ...)
returns true iff the memory unit of the object
a(or others if present) is to be written now or in the future by a given processp'.
$write_from(a, ...)
returns true iff any of the memory units reachable from the object
a(or others if present) is to be written now or in the future by a given processp'.
$ample{$true}
any process exists in the state should be in the ample set
$ample{$false}
any process other than the current process (
$self) need NOT be in the ample set.
Conditional amples set: [COND] $ample{EXPR1} : $ample(EXPR2)
if
CONDis satisfied then processes satisfyingEXPR1should be in the ample set; otherwise,EXPR2is considered.
Absent ample set (DEFAULT case): if no $ample expression is present, then the library enabler needs to calculate the ample set.
Examples:
- The following means that any process that can reach the memory unit of
commshould be in the ample set if the current process ($self) is to be chosen in the ample set.$ample{$reach(comm)} void comm_deque($comm comm, ....);
- The following means that any process that can reach any of the memory units reachable from
aor write any of the memory units reachable fromanow or in the future should be in the ample set if the current process ($self) is to be chosen in the ample set.$ample{$reach_from(a) || $write_from(b)} void strcpy(char *a, char *b);
- The following means that the current process itself can form the ample set.
$ample($false) int $comm_size($comm, ...);
- The following means that if the argument
countis equal to zero, then the current process forms the ample set, otherwise, any process that can reach the memory unit of objectcommshould be in the ample set.[count = 0] $ample{$false} : $ample{$reach(comm)} void comm_deque($comm comm, int count ....);
