[HD] EECS3342 F26 - 2026-11-26 (Thursday) - Lecture 21
Overview
Jackie Wang develops the relative deadlock-freedom proof obligation for refinement from abstract model M0 to concrete model M1: under the invariants, the disjunction of M0’s event guards must imply the disjunction of M1’s guards. He explains the required sequent-calculus rules and the intuition that refinement may resolve an existing deadlock but must not introduce one, then introduces M2’s two traffic-light variables, environment assumptions, and safety invariants.
Key takeaways
- Relative deadlock freedom for M0 to M1 is proved by showing that, under the axioms and invariants, the disjunction of all M0 guards implies the disjunction of all M1 guards.
- A refinement may enlarge the set of non-deadlocking states by resolving deadlocks, but it cannot omit any state in which the abstract model has an enabled event.
- Sequent-calculus rules depend on formula position: a disjunctive goal can be reduced by negating one alternative into a hypothesis, while a conjunctive goal requires proving both branches.
- M1’s refinement checks include guard strengthening for old events, concrete invariant establishment and preservation, variant-based convergence, and relative deadlock freedom.
- M2 is a superposition refinement because it can access M1’s variables a, b, and c while adding mainland and island traffic-light state variables MLTL and ILTL.
- The M2 safety model assumes cars obey red lights and constrains a green mainland light with c = 0 and a + b < D, while a green island light requires a = 0 and b > 0.
Chapters
- Lab 4 has been released, and a reference paper is available on the eClass site.
- Jackie Wang introduces relative deadlock freedom as a refinement correctness condition for M1 relative to abstract model M0.
- The lecture first develops the proof obligation mechanically, then explains its intuition.
- The hypothesis is the disjunction of all abstract M0 event guards, which expresses when at least one abstract event is enabled.
- The goal is the disjunction of all concrete M1 event guards, expressing when at least one concrete event is enabled.
- The obligation says that whenever M0 does not deadlock in a state, M1 must also have an enabled event in that state.
- The example includes constant D with D ∈ ℕ and D > 0, plus abstract invariant n ∈ ℕ and n ≤ D.
- M1 uses a, b, and c as natural-number variables, with linking invariant a + b + c = n and safety invariant a = 0 or c = 0.
- The abstract guard disjunction includes n < D and n > 0; the concrete goal is the disjunction of M1’s event guards, including guards such as a + b < D and c = 0.
- For a disjunction in the goal, it is sufficient to prove one chosen branch while adding the negation of the other branch as a hypothesis.
- The example transforms H ⊢ P ∨ Q into the equivalent form H, ¬P ⊢ Q.
- Shunting combines nested implications: X implies Y implies Z is equivalent to X and Y implying Z.
- A conjunction on the left of the turnstile can be split into two separate hypotheses.
- A conjunction in the goal requires proving both conjuncts in separate sequents with the same hypotheses.
- The rule direction matters: split goal conjunctions, and use the appropriate left-side rule for hypotheses rather than swapping the two cases.
- Deadlock is undesirable in reactive systems such as the bridge controller being modeled.
- A refinement M1 must not introduce a deadlock in a state where M0 does not deadlock.
- M1 may resolve a deadlock that exists in M0, because changing a bad situation into a non-deadlocking one is an improvement.
- States inside both models’ deadlock-freedom regions are acceptable because both M0 and M1 have enabled events.
- A state inside M1’s region but outside M0’s represents M1 resolving an abstract deadlock, which is also acceptable.
- The inclusion condition permits M1’s enabled-state region to extend beyond M0’s, provided M0’s entire region remains covered.
- A state inside M0’s deadlock-freedom region but outside M1’s means M0 can move while M1 has no enabled event.
- Even one such state violates the implication from the abstract guard disjunction to the concrete guard disjunction.
- The relative deadlock-freedom diagram is emphasized as an important conceptual check, not just a formula to memorize.
- Guard strengthening applies to old events: each concrete guard must imply its corresponding abstract guard under the relevant assumptions.
- Invariant establishment checks the concrete initialization, while invariant preservation covers the events and all five M1 invariants.
- The M1 checklist also includes convergence or livelock reasoning using a variant, plus relative deadlock freedom from abstract to concrete guard disjunctions.
- M2 makes the bridge model more concrete by adding traffic lights at the mainland and island entrances.
- Each light has only two modeled colors, green and red; the description excludes other light states.
- The environment assumptions state that the lights control bridge entry and that cars obey red lights, an assumption needed to make safety reasoning meaningful.
- M0 tracks n, the total number of cars in the compound; M1 represents the system with a, b, and c and does not directly access n in its guards or actions.
- For refinement M1 to M2, M1 is the abstract model and M2 is the concrete model, so a, b, and c are accessible to M2.
- MLTL and ILTL denote the mainland-side and island-side traffic-light states; allowing M2 to access M1’s variables is called superposition.
- M2 introduces a color set containing red and green, with the axiom red ≠ green.
- The first two M2 invariants are typing conditions: MLTL and ILTL must each belong to the two-color set.
- These constants and typing invariants establish the permitted state values for both traffic lights.
- If MLTL is green, M1’s bridge-state variables must satisfy c = 0 and a + b < D, preventing opposing traffic and keeping room below the capacity limit.
- If ILTL is green, the stated conditions are a = 0 and b > 0, preventing a conflict with traffic in the opposite direction and requiring a car on the island side.
- The green-light conditions are modeled as implications: each light may be green only when its associated safety conditions hold, with additional M2 proof obligations deferred to the next classes.
Transcript excerpt
0:05 All right. Nothing in particular to announce. Uh your lab number four has been released. Please take a look. Uh and then there's a reference paper on the e-class site which I mentioned last time. Take a look if you're interested in the subjects. Your written test number two uh I'll keep you posted. Maybe hopefully we'll get it done uh next week for sure. I'll I'll make sure I reach out to the TA and then speak to you about it soon. Okay. All right. So today we're going to deal with another topic for refinements. It's a tricky one so I want to talk about it when you are still fresh. Okay. It's something called relative delta freedom. Okay. This there will be a page where we have to explain the intuition behind relative delta freedom. I would suggest we delay this page until we do a little bit of
0:52 mechanical exercise just to see how we can formulate the proof obligation and to see what new inference rule that we might need very quickly and then we come back to this page. Okay. I'll suggest that order. I think that might be a little bit better. Let's now look at the actual relative delta freedom. So thinking this way. So when you got a refinement model, the refinement model by itself you want to make sure that model there is actually delta free. That's something you want to prove alongside. Okay. But another thing you want to show is since the refinement model doesn't exist in isolation, it has to be somehow relative to the abstract model, in this case M zero. So that's why we got something called relative delta delta freedom. Okay. I will explain about its intuition in just one moment. Okay. Let's do a little bit
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jackie Wang.