Changes between Version 15 and Version 16 of ContractReduction
- Timestamp:
- 07/21/14 15:55:41 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ContractReduction
v15 v16 48 48 == Ample set and the exact interpretation of $depends == 49 49 50 Fix a state s, a process q, and a statement S.50 Fix a statement S and a process q. 51 51 52 Let T(s,S,q) denote the set of transitions specified by having q execute S from s. We say this is a set because some statements S are nondeterministic, meaning they can generate multiple transitions. Note that T(s,S,q) includes all transitions specified by S, even those that are not enabled. 52 Let T(S,q) denote the set of transitions specified by having q execute S. We say this is a set because some statements S are nondeterministic, meaning they can generate multiple transitions. Note that T(S,q) is independent of the state. In particular, it must include all possible transitions that could be generated by S, even if not all of them are enabled in every state. 53 54 Now fix a state s and assume that the origin of S is the location of q in s. 53 55 54 56 Suppose A(s,S,q) is a set of procs which satisfies the following: 55 57 56 In any execution departing from s, no transition dependent on a transition in T( s,S,q) can occur without a transition from a proc in A(s,S,q) occurring first.58 In any execution departing from s, no transition dependent on a transition in T(S,q) can occur without a transition from a proc in A(s,S,q) occurring first. 57 59 58 60 Then define AMPLE as follows: … … 65 67 choose q in WorkSet; 66 68 WorkSet := WorkSet - {q}; 67 forall statements S emanating from currentlocation of q in s:69 forall statements S with origin the location of q in s: 68 70 foreach r in A(s,S,q): if r is not in AmpleProcs, add r to AmpleProcs and to WorkSet 69 71 end forall; … … 73 75 }}} 74 76 75 Claim: for any process p, if AMPLE(s,p) contains a process with at least one enabled transition in s, then it defines an ample set, i.e., from any execution departing from s, no transition dependent 77 Claim: for any process p, if AMPLE(s,p) contains a process with at least one enabled transition in s, 78 then it defines an ample set, i.e., from any execution departing from s, no transition dependent 76 79 on a transition from a proc in AMPLE(s,p) can occur without a transition from a proc in AMPLE(s,p) occurring first. 77 80 … … 83 86 be any execution prefix starting from s for which t is dependent on a transition from a proc in AMPLE. 84 87 85 ASSUME that none of the t_i are from procs in AMPLE. 88 ASSUME that none of the t_i are from procs in AMPLE. We aim to get a contradiction. 86 89 87 Say t is dependent on transition t0 , and that t0 has statement S0 in process q0, and q0 isin AMPLE.90 Say t is dependent on transition t0 in T(S0,q0), for some statement S0 and process q0 in AMPLE. 88 91 89 Throughout the entire execution prefix (E), q0 remains at the location it had in state s. In particular, S0 emanates 90 from the currentlocation of q0 in s.92 By assumption, throughout the entire execution prefix (E), q0 remains at the location it had in state s. 93 In particular, the origin of S0 is the location of q0 in s. 91 94 92 Since q0 is in AMPLE, that means from the algorithm that defines AMPLE that we must 93 have A(s,S0,q0) is a subset of AMPLE. 95 Since q0 is in AMPLE, it follows from the algorithm that defines AMPLE that A(s,S0,q0) is a subset of AMPLE. 94 96 95 From the contract defining A, we know that no transition dependent on a transition in T(s,S0,q0) can occur without a transition 96 from a proc in A(s,S0,q0) occurring first. Hence for some i, t_i is from a proc in A(s,S0,q0), and therefore t_i is in AMPLE. 97 98 We conclude that no transition dependent on a transition from a proc in AMPLE can occur without a transition from a proc 99 in AMPLE occurring first. QED. 97 From the contract defining A, we know that no transition dependent on a transition in T(S0,q0) can occur without a transition 98 from a proc in A(s,S0,q0) occurring first. Hence for some i, t_i is from a proc in A(s,S0,q0), and therefore t_i is in AMPLE, 99 contradicting the ASSUMPTION. QED. 100 100 101 101
