What does Beyond Distillation conclude, in numbers, about “The Front-End Statechart: Reachability, Deadlock and an Interface Gate on Every Path”?
Answer: With five orthogonal regions, each drawn once in a statechart, there are 17 states and 27 transitions. Flattened into a single machine, there are 360 states and 2,652 transitions. Two coupling constraints across regions (payment may leave idle only when the cart is locked; paid or refunded requires consent first) cut the legal states to 144, a share of 0.4000.
Scope of the numbers: Parameters are illustrative and all calculations are generated by the book's programs. This is general business analysis, not investment, legal or medical advice, and the code it generates is teaching material deployed to no site.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.4000, 144, 17, 2652, 27, 360
| regions | 5 |
| statechart states | 17 |
| statechart transitions | 27 |
| flat states | 360 |
| flat transitions | 2,652 |
| flat states meeting couplings 144 | |
| share meeting couplings | 0.4000 |
| adding regions of 3 states with 4 transitions each: | |
| extra chart states flat states flat transitions | |
| 1 | 20 1,080 9,396 |
| 2 | 23 3,240 32,508 |
| 3 | 26 9,720 110,484 |
Show the full program
# Chapter 3. p33: why a front-end organ is written as a statechart.
# Five orthogonal regions (cart, sign-in, language, payment, consent) are
# drawn once each in a statechart; a flat machine needs their product.
# Local transitions are counted per region; in the flat machine every
# local transition is copied once per state of the other regions. Two
# coupling invariants (payment can leave idle only with a locked cart;
# paid needs consent) cut the valid product. Region sizes illustrative.
import itertools
import math
REGIONS = [
("cart", ["empty", "filled", "locked"], 4),
("auth", ["guest", "member", "expired"], 4),
("lang", ["zh", "en", "ms", "th"], 12),
("pay", ["idle", "pending", "paid", "failed", "refunded"], 6),
("consent", ["unset", "accepted"], 1),
]
def valid(combo):
cart, auth, lang, pay, consent = combo
if pay != "idle" and cart != "locked":
return False
if pay in ("paid", "refunded") and consent != "accepted":
return False
return True
if __name__ == "__main__":
sizes = [len(r[1]) for r in REGIONS]
flat = math.prod(sizes)
chart_states = int(math.fsum(sizes))
chart_tr = int(math.fsum(r[2] for r in REGIONS))
flat_tr = 0
for i, r in enumerate(REGIONS):
flat_tr += r[2] * (flat // sizes[i])
print("regions {}".format(len(REGIONS)))
print("statechart states {}".format(chart_states))
print("statechart transitions {}".format(chart_tr))
print("flat states {:,}".format(flat))
print("flat transitions {:,}".format(flat_tr))
combos = list(itertools.product(*[r[1] for r in REGIONS]))
ok = [c for c in combos if valid(c)]
print("flat states meeting couplings {}".format(len(ok)))
print("share meeting couplings {:.4f}".format(len(ok) / flat))
print("adding regions of 3 states with 4 transitions each:")
print(" extra chart states flat states flat transitions")
for extra in (1, 2, 3):
s2 = sizes + [3] * extra
t2 = [r[2] for r in REGIONS] + [4] * extra
f2 = math.prod(s2)
ft = 0
for i in range(len(s2)):
ft += t2[i] * (f2 // s2[i])
print(" {:>5} {:>12} {:>11,} {:>16,}".format(
extra, int(math.fsum(s2)), f2, ft))Single source and citation
Fan, Y. (2026). Beyond Distillation: Executable Business-Organ Synthesis, Generative Code Crystallisation and Living-System Bootstrapping (Version 1.0.0), Chapter 3: The Front-End Statechart: Reachability, Deadlock and an Interface Gate on Every Path. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-378 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026378,
author = {Fan, Yafu},
title = {Beyond Distillation: Executable Business-Organ Synthesis, Generative Code Crystallisation and Living-System Bootstrapping},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Ceiling of Distillation: Compression Keeps, Synthesis Generates
- Chapter 2 · The Pricing Engine: Constraint Solving, Invariants and Property Tests
- Chapter 4 · The Objection Tree: Coverage, Depth and the Order of Repairs
- Chapter 5 · The Live Probe: CUSUM, False-Alarm Run Lengths and Writing Back into the Mother Book
- Chapter 6 · Crystallinity and Bootstrapping: Mutation Testing, a Composite Index and the Limits of Self-Fingerprinting
- Chapter 7 · Classical Sources East and West: the Kaogongji's Four Conditions, the Laozi's Generative Sequence and Aristotle's Four Causes
- Chapter 8 · The Empirical Loop: Field Tools and Checker Specifications