Definition
Historical design notation is the set of diagrams and tables in an earlier, superseded version of a design document: flow diagrams whose arrows give the order of steps, sequence diagrams that show which party sends which message to which, and state-transition tables whose rows give, for a current state and an input, the required condition and the next state. Each element is a claim about the design at that version. It becomes a fact about an implementation only after it has been checked against the code of a stated version.
Where it fits
Main entry: Assumption versus guarantee (§1.36).
The assumption versus guarantee entry separates what an argument takes as true from what it establishes. A historical diagram is a third thing: a list of claims, each of which needs its own evidence before an argument may rely on it. This entry’s example is invented.
Reading the notation means turning every drawn element into a statement that can be checked. An arrow is a transition with four parts: its trigger, the input or event that starts it; its transition guard §8.34, a condition that must be true for the transition to happen; its effect, the state it changes and the messages it sends; and its position in the order of steps. A table row says the same in words. A design diagram usually draws only the success path, what happens when every check passes. It seldom shows what happens when a guard is false or when power is lost between two steps.
Take an invented flow of three steps joined by arrows: receive an update, then validate it, then activate it. Activation writes a selector, a stored value that tells the start-up code which copy of the software to run. The arrow from validate to activate claims that the selector changes only after validation has succeeded. To check the claim, find every call path in the code that reaches the selector write, and confirm that each passes a successful validation first. Suppose the code instead writes the selector, then validates, then restarts. The code then disagrees with the diagram, and a crash cut shows the harm. A crash cut is a point in the sequence at which power may be lost. At the cut between the selector write and the validation, the device restarts into an update that was never validated.
Limits and common mistakes
A diagram’s arrows describe only the drawn transitions. A match on every drawn arrow does not cover the states and failure orders that the diagram leaves out, so it does not show that the implementation is correct.
A state machine §8.33, a model that lists the states a system can be in and the allowed transitions between them, and a timing plot answer different questions. The state machine defines which behavior is permitted in every run; the timing plot records some runs. A timing plot cannot show that a forbidden transition never happens, and a state machine cannot supply a measured latency.
Words drift between versions. Atomic, key and version can change meaning; the size of a field, such as the length of an authentication §1.6 tag (the short value that shows a message came from a key holder) or the width of an integer, can change; the party that owns a key can change. Check each before reusing an argument that an old diagram supports.
Mark historical material as historical, with its version or date, wherever it is quoted, so that no reader takes it as a description of the current design.
Questions answered
How do you check a diagram against an implementation?
Check a diagram against an implementation by turning each drawn element into a precise claim and then finding, in the code of one fixed version, the code that makes that claim true or false.
Fix both versions: the diagram’s document version, and the code’s version-control revision together with its build configuration. Examine the source closure §13.6 of the build, the complete set of files and settings that produce the program, so that the code read is the code that runs.
List the claims. For each arrow or table row, write down its trigger, its guard (the condition that must hold), its effect (the state changed and the messages sent) and its order relative to the other steps.
For each claim, find the code that tests the guard and the code that performs the effect, and confirm that every path to the effect passes the guard.
Check the other direction: list the code paths that change the state the diagram covers, and flag every path that no arrow describes.
Check what the diagram omits: what each step does when its guard is false, and which state a restart finds if power is lost between any two writes to storage that keeps its content without power. Confirm that every property meant to hold in all states, such as the selector always names a validated copy, holds at each such point.
Back each claim with evidence, such as a test that drives the transition, a record of a real run or a proof, and mark it as matching, different, missing from the code, or present in the code but not in the diagram.
A diagram that passes this check describes the drawn transitions of that one code version, nothing more.
Related entries: Finite-state machine (§8.33), Mechanism versus evidence (§1.37), Source closure (§13.6), State transition guard (§8.34), Crash cuts for a two-slot update (§17.12), Refinement (§3.32).