shared: Reaching a shared node. Definition: shared(x,A,F,M) = (\exists v: reach(x,v,A,F,M) & lshared(v,A,F,M)). Wp: wlp(M := M[i <- c], shared(x,A,F,M)) = (expanding) wlp(M := M[i <- c], (\exists v: reach(x,v,A,F,M) & lshared(v,A,F,M))) = (distributing wlp through \exists, possible because of deterministic,terminating assignment) (\exists v: wlp(M := M[i <- c],reach(x,v,A,F,M)) & wlp(M := M[i <- c],lshared(v,A,F,M))) So if A(i), then = (applying previous wlp calculations) (\exists v: reach(x,v,A,F,M) & lshared(v,Ai,F,M)) = (rewriting) shared(x,A,F,M) And if ~A(i), then = (applying previous wlp calculations) (\exists v: [reach(x,v,Ai,F,M) | (reach(x,i,Ai,F,M) & reach(c,v,Ai,F,M))] & [reach1_to(v,Ai,F,M) & F*(c,v,A) | lshared(v,Ai,F,M)]) = (expanding, distributing \exists over |) (\exists v: reach(x,v,Ai,F,M) & reach1_to(v,Ai,F,M) & F*(c,v,A)) | (\exists v: reach(x,v,Ai,F,M) & lshared(v,Ai,F,M)) | (\exists v: reach(x,i,Ai,F,M) & reach(c,v,Ai,F,M) & reach1_to(v,Ai,F,M) & F*(c,v,A)) | (\exists v: reach(x,i,Ai,F,M) & reach(c,v,Ai,F,M) & lshared(v,Ai,F,M)) = (simplifying; lemma 0) (\exists v: reach(x,v,Ai,F,M) & reach1_to(v,Ai,F,M) & F*(c,v,A)) | shared(x,Ai,F,M) | (\exists v: reach(x,i,Ai,F,M) & reach(c,v,Ai,F,M) & reach1_to(v,Ai,F,M) & F*(c,v,Ai)) | reach(x,i,Ai,F,M) & shared(c,Ai,F,M) = (using F*(c,v,Ai) => reach(c,v,Ai,F,M)) (\exists v: reach(x,v,Ai,F,M) & reach1_to(v,Ai,F,M) & F*(c,v,A)) | shared(x,Ai,F,M) | reach(x,i,Ai,F,M) & (\exists v: reach1_to(v,Ai,F,M) & F*(c,v,Ai)) | reach(x,i,Ai,F,M) & shared(c,Ai,F,M) [] (Note: F*(c,v,Ai) can be determined as a finite conditional expression using the type of c. So the \exists quantifications above are really finite quantifications that can be expanded out)