[HD] EECS3342 F26 - 2026-11-24 (Tuesday) - Lecture 20
Overview
Jackie Wang introduces Lab 4 on tabular expressions, including completeness and disjointness checks, then explains how a system variant can be used to prove that the bridge-controller refinement M1 is free of lifelock. Using the candidate variant 2A + B, the lecture traces how old and new events affect its value and derives two proof obligations for new events: enabled events require a nonnegative pre-state value, and their actions must strictly decrease the variant.
Key takeaways
- For refinement M1, new events I-in and I-out correspond to abstract skip events, so infinitely many such events constitute lifelock without abstract progress.
- A system variant is a proof measure, not a repair: the model still needs suitable guards, and the variant proof obligations must be discharged.
- The two core obligations are that every enabled new event has a nonnegative pre-state variant and that its action strictly decreases the variant.
- For the bridge-controller candidate 2A + B, I-in decreases the value by one because A falls by one while B rises by one; I-out also decreases it by one because B falls while A stays fixed.
- The enabled-event obligation implies by contraposition that a negative variant disables every new event, preventing the current new-event interleaving from continuing.
- Lab 4 uses tabular expressions to specify requirements and asks students to check completeness and disjointness; its adjusted deadline is December 9.
Chapters
- Lab 4 is the course's final lab and introduces tabular expressions, a visual way to express requirements and specifications.
- The suggested reading sequence is the one-page mathematical background, the function-table example, then the problem in Section 3 on page 6.
- Check specifications for completeness and disjointness; the adjusted deadline is midnight on December 9.
- An optional paper applies tabular methods to part of Ontario's Darlington nuclear reactor shutdown system.
- The lecture returns to the bridge-controller refinement and focuses first on proving lifelock freedom.
- It previews relative deadlock freedom, which concerns the relationship between an abstract model and its concrete refinement.
- New events in the refinement correspond to skip events in the abstract model, so they can consume resources without making abstract progress.
- Lifelock, also called divergence here, occurs when new events interleave infinitely often while the abstract model makes no useful progress.
- For the bridge controller, the new events are I-in and I-out; the old events include ML-out and ML-in.
- A system variant is proposed as a proof measure for bounding the number of new-event interleavings, not as a direct model fix.
- If a variant proof obligation cannot be discharged, the model may need changes such as revised event guards or invariants.
- An invariant is a Boolean predicate that must hold after initialization and after every event occurrence.
- A system variant is an integer-valued expression whose value may change across events.
- Unlike a loop variant in an algorithm, the variant discussed here applies to a reactive-system specification.
- An invariant can involve abstract variables, concrete variables, or both, depending on the refinement model.
- To measure new-event interleavings in M1, the variant uses concrete variables A, B, and C rather than abstract-model variables.
- In general a variant is integer-valued and can become negative; the bridge-controller example will use a nonnegative value along its illustrated trace.
- The variant should not stay constant across all events: old events can increase it or leave it unchanged, while new events must strictly decrease it.
- An increase by an old event provides a finite allowance for subsequent new-event interleavings.
- Strict decrease by each new event prevents an infinite sequence as long as the proof obligations ensure new events cannot continue once the variant is negative.
- For M1, the lecture uses the candidate variant 2A + B and evaluates it after each event in a sample trace.
- The trace begins with initialization, followed by two ML-out events, two I-in events, two I-out events, and two ML-in events.
- In the example, ML-out moves the variant from 0 to 2 and then 4; the I-in and I-out events reduce it to 0.
- At variant value 0, the new-event guards are disabled in the illustrated model, while ML-in leaves the value unchanged.
- The bridge-controller state tracks A, B, and C, representing cars on the mainland-to-bridge side, on the island, and on the return side.
- The sample trace yields variant values 0, 2, 4, 3, 2, 1, 0, 0, 0.
- Each I-in moves a car from A to B, reducing 2A + B by one; each I-out moves a car from B to C, also reducing the variant by one.
- The example variant remains nonnegative, although the general proof method permits negative integer values.
- The plotted M1 trace illustrates old events increasing or preserving the variant and new events strictly decreasing it.
- A new-event proof obligation treats the event guard as a precondition, so the variant value there is evaluated before the event action.
- The lecture distinguishes this enabled-state condition from the second obligation, which compares the variant before and after a new event.
- For each new event, combine the axioms, abstract invariant, concrete invariants, and that event's guard to prove the pre-state variant is a natural number.
- For I-in, the guard is A > 0, and the candidate variant is 2A + B.
- The example's assumptions include D > 0, 0 ≤ N ≤ D, A, B, and C as natural numbers, A + B + C = N, and A = 0 or C = 0.
- The obligation says that whenever a new event is enabled, its pre-state variant cannot be negative.
- The second obligation proves V′ < V for every enabled new event, where V′ includes the event's post-state effects.
- For I-in, the actions are A′ = A − 1 and B′ = B + 1.
- Substituting those actions into 2A′ + B′ < 2A + B gives 2(A − 1) + (B + 1) < 2A + B.
- The same decrease obligation must be formulated and proved separately for I-in and I-out.
- The enabled-event obligation can be read contrapositively: if V < 0, the guard of that new event must be false.
- Because the nonnegative pre-state obligation applies to every new event, a negative variant disables all new events and ends their current interleaving.
- Old events can later change the state so that the variant is nonnegative again, but that requires the new-event sequence to be interrupted.
- Students are asked to test A + B as an alternative variant by tracing it and checking whether old events preserve or increase it while new events decrease it.
- For two new events and two obligations, the exercise requires four proof sequences: each obligation for both I-in and I-out.
- A question about whether old events need a separate increase-or-stay-the-same obligation is left for follow-up.
- The lecture site adds inference-rule set 3 and two sequence-proof documents; the next class begins relative deadlock freedom.
Transcript excerpt
0:05 All right. So, the only announcement I want to make will be your lab number four. It has been released right here. Oh, here. Okay. Your lab number four. And I do want to go over a little bit with you just about the background. And also, it's uh quite a different lab compared with lab number one, two, and three you have solved so far. Lab number four is going to be the final one. So, no more lab. Uh, of course, it's going to be covered as well in the exam. Okay, I'll start talking about the exam maybe from next week. So, that'll be pretty much the last uh third lecture. So, something like that. So, if you go to the e-class, you will see that you got lab number four already released right here. So I want to not really go into details but for the
0:54 big picture for lab number four. If you open PDF so you're going to learn about a formal a new notation but it's [snorts] called tabular expression. It's like a fancy term basically just drawing tables and typically just like a 2D table like a two dimensional you got rows you got column etc. Okay, so tabular expression is actually a very visual way to really express your requirements and also specification and just before we go over little bit about the background. So for those of you who might be interested, this is optional. Okay, only for those of you who might be interested uh in how the tabular expression might have been used in the industry. So there is one paper over here that's about how we can apply the tabular expression method to verify a nuclear reactor shutdown
1:43 system. This paper here was published by a professor in McMaster. So the nuclear
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.