[HD] EECS3342 F26 - 2026-11-19 (Thursday) - Lecture 19
Overview
Jackie Wang explains how the new concrete events IL_in and IL_out refine the abstract car-traffic model: each preserves the linking invariant A + B + C = N, so each corresponds to an imaginary abstract skip that leaves N unchanged. The lecture derives necessary and redundant event guards, outlines invariant-preservation proof obligations, and introduces divergence or livelock when infinitely many skip-corresponding events occur.
Key takeaways
- Every IL_in should correspond to an earlier ML_out in the event trace, and every IL_out should correspond to an earlier IL_in, although unrelated events may occur between them.
- For IL_in, A > 0 is necessary because the event decrements A, while C = 0 is redundant because it follows from the existing invariants and A > 0.
- For IL_out, both B > 0 and A = 0 are required: B > 0 prevents a negative island count, and A = 0 cannot be proved from the other assumptions.
- The actions for both new events preserve A + B + C, so the abstract count N is unchanged and the refinement correspondence is an imaginary skip with N′ = N.
- Two new events and five invariants create 10 invariant-preservation proof obligations; including the two old events gives 20 checks for the four-event model.
- If unguarded IL_in and IL_out alternate infinitely, their abstract counterparts form an infinite skip sequence, producing livelock or divergence rather than useful progress.
Chapters
- Jackie Wang expects Test 2 grading to finish by the end of the following Friday and plans to provide an update on Tuesday.
- The semester has six lectures remaining including this one, with exam and data-sheet preparation guidance planned for the following week.
- In the M1 refinement model, each IL_in should match an earlier ML_out, and each IL_out should match an earlier IL_in, though other events may interleave.
- IL_in moves a car from the bridge into the island and decrements A while incrementing B, so A > 0 is required to prevent a negative count.
- C = 0 would rule out traffic moving in the opposite direction at the same time, but it is redundant given the existing invariants and the guard A > 0.
- To establish that a proposed guard is redundant, prove it from the event's other guards, the model axiom, and the pre-state invariants.
- IL_out moves a car from the island onto the bridge, decrementing B and incrementing C, so B > 0 is needed before the transition.
- Unlike the proposed C = 0 guard for IL_in, A = 0 is not derivable for IL_out from the axiom, invariants, and B > 0.
- The IL_out guard therefore retains both B > 0 and A = 0; guard necessity must be checked by proof rather than assumed.
- Linking invariant 4 relates concrete counts A, B, and C to abstract count N through A + B + C = N.
- For IL_in, the post-state sum is (A - 1) + (B + 1) + C, which simplifies to the unchanged pre-state sum A + B + C.
- For IL_out, the post-state sum is A + (B - 1) + (C + 1), which also simplifies to N.
- Because IL_in and IL_out leave A + B + C unchanged, the related abstract variable N also remains unchanged across either concrete transition.
- The corresponding abstract action is N′ = N, represented by an artificial event called skip.
- Skip is a reasoning device for refinement and is not added as an actual event to abstract model M0.
- The simulation diagram connects concrete pre-states to abstract pre-states and concrete post-states to abstract post-states through the linking invariant.
- For a concrete IL_in transition, the concrete guard includes A > 0, while the corresponding imaginary abstract skip has no guard and does not change N.
- The concrete actions A′ = A - 1, B′ = B + 1, and C′ = C preserve the relationship to the abstract action N′ = N.
- An event with no guard can be viewed as always enabled, and an event with no action leaves its variables unchanged.
- The imaginary skip has the before-after predicate N′ = N, matching the effect derived for IL_in and IL_out.
- Unlike the commuting diagram for old events, new concrete events have no pre-existing abstract counterpart; skip supplies the correspondence for the refinement argument.
- The example initializes A, B, C, and N to 0, satisfying A + B + C = N.
- After ML_out, the concrete state is (A, B, C) = (1, 0, 0) and the abstract count is N = 1, so the linking invariant still holds.
- After IL_in, the concrete state becomes (0, 1, 0) while skip leaves N = 1, again satisfying 0 + 1 + 0 = 1.
- The two new events, IL_in and IL_out, must each preserve all five invariants, giving 2 × 5 = 10 proof obligations.
- When combined with the two old events, the full four-event concrete model has 4 × 5 = 20 event-invariant checks.
- For IL_in and linking invariant 4, the proof uses the pre-state axiom and invariants, guard A > 0, concrete post-state actions, and abstract skip action N′ = N.
- A complete one-car trip in M1 follows init, ML_out, IL_in, IL_out, and ML_in.
- The corresponding abstract trace replaces IL_in and IL_out with two skips, while retaining init, abstract ML_out, and abstract ML_in.
- A finite number of skips is acceptable; the lecture flags an unbounded number of skip-corresponding transitions as a problem.
- A modified model removes the guards from IL_in and IL_out and weakens the concrete variable constraints, allowing the two events to alternate indefinitely.
- The resulting abstract behavior contains infinitely many skips, a busy-loop-like execution that consumes system activity without useful progress.
- Wang calls this behavior livelock or divergence and previews variance as the concept for preventing it in the next lecture.
- Lab 4 is expected to be released the following day, with its deadline to be adjusted accordingly.
Transcript excerpt
0:05 All right. So nothing in particular to announce. We're just going to go over some stuff about the new events which which we just introduced on Tuesday. For your recent test two from yesterday, one of the TA actually got some family matters. So I will try to reach out to both of them maybe on Monday so I will can start the grading. Hopefully they can get the grading done by the end of next Friday so I should be able to release the result to you. So I'll keep you posted. I should be able to get some updates on Tuesday. Okay. I'll let you know. Other than that, I think we just need five more lectures to finish the semester starting from next week but including today you should be six lectures. And I think I will start talking about more about the exam especially about data sheets maybe from next week. Okay. We can
0:51 you can definitely get started to to get prepared for your exam. I'll start giving you guys some tips about what you should really do. It's never too late to start preparing for the exam. All right? Okay. So let's now move on. So last time we actually spoke about these two new events ILM and also ILL. So it's very important first of all to for you to understand visually what they correspond to about the abstraction that we have in the refinement model M1. So ILM you can think about every ILM should be corresponding to some earlier MLLT. Okay. I'll write it down in one moment. Which which means whenever you got one car that goes from the mainland to the bridge, that car eventually should reach the end of the bridge and go into the island. So
1:39 think about always you should be able to
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.