<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://invarians.org/index.php?action=history&amp;feed=atom&amp;title=The_Principia_Machina%2FTPC-PY%2Fgen_yardstick_corpus.py</id>
	<title>The Principia Machina/TPC-PY/gen yardstick corpus.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://invarians.org/index.php?action=history&amp;feed=atom&amp;title=The_Principia_Machina%2FTPC-PY%2Fgen_yardstick_corpus.py"/>
	<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;action=history"/>
	<updated>2026-10-21T15:01:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;diff=4861&amp;oldid=prev</id>
		<title>BFP Rauch: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;diff=4861&amp;oldid=prev"/>
		<updated>2026-09-30T02:11:03Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:11, 30 September 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>BFP Rauch</name></author>
	</entry>
	<entry>
		<id>https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;diff=4860&amp;oldid=prev</id>
		<title>BFP Rauch: TPC-PY source gen_yardstick_corpus.py (-), SHA-256 9192bdeb26e7082c; conformed TPS 0.4.0; PROPOSED, not declared (TPC-PY 0.2.0)</title>
		<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;diff=4860&amp;oldid=prev"/>
		<updated>2026-09-30T02:10:58Z</updated>

		<summary type="html">&lt;p&gt;TPC-PY source gen_yardstick_corpus.py (-), SHA-256 9192bdeb26e7082c; conformed TPS 0.4.0; PROPOSED, not declared (TPC-PY 0.2.0)&lt;/p&gt;
&lt;a href=&quot;https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;amp;diff=4860&amp;amp;oldid=4185&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>BFP Rauch</name></author>
	</entry>
	<entry>
		<id>https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;diff=4185&amp;oldid=prev</id>
		<title>BFP Rauch: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;diff=4185&amp;oldid=prev"/>
		<updated>2026-09-28T04:32:53Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:32, 28 September 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>BFP Rauch</name></author>
	</entry>
	<entry>
		<id>https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;diff=4184&amp;oldid=prev</id>
		<title>BFP Rauch: TPC-PY source gen_yardstick_corpus.py (-), SHA-256 b51f0ec9a83216d6; conformed TPS 0.3.0; PROPOSED, not declared (CO-8)</title>
		<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_yardstick_corpus.py&amp;diff=4184&amp;oldid=prev"/>
		<updated>2026-09-27T15:43:18Z</updated>

		<summary type="html">&lt;p&gt;TPC-PY source gen_yardstick_corpus.py (-), SHA-256 b51f0ec9a83216d6; conformed TPS 0.3.0; PROPOSED, not declared (CO-8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;# -*- coding: utf-8 -*-&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;Generator for tpc/vectors/yardstick_corpus.json (TPC step 2, increment 5).&lt;br /&gt;
Expectations are HAND-DERIVED from the synthetic suite and written literally&lt;br /&gt;
below; the generator refuses to write the corpus if the module disagrees.&lt;br /&gt;
Run: cd tpc &amp;amp;&amp;amp; python3 gen_yardstick_corpus.py (Windows: py ...).&lt;br /&gt;
Recovered 2026-09-27 (BASE-GEN; record 0.18.0 section 7) from the TIDY 3&lt;br /&gt;
archive, tidy3_2026-09-25/gen_yardstick_corpus.py, SHA-256&lt;br /&gt;
74edc22c5818f5c8f93f5004b76128e52dd857bbc95ea11289729e891f49eae1, where it&lt;br /&gt;
regenerates the archived corpus byte for byte. Changed in the tree: the&lt;br /&gt;
writer only (ensure_ascii=False, so a hidden character is written as&lt;br /&gt;
itself, as the published corpus carries it; RD-C8-2). No case changed.&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
import copy, json, os, sys&lt;br /&gt;
HERE = os.path.dirname(os.path.abspath(__file__))&lt;br /&gt;
sys.path.insert(0, HERE)&lt;br /&gt;
import tpc_strike as S&lt;br /&gt;
import tpc_yardstick as Y&lt;br /&gt;
&lt;br /&gt;
# The synthetic record suite of increment 3, verbatim (sr9_corpus.json).&lt;br /&gt;
SUITE = json.load(open(os.path.join(HERE, &amp;quot;vectors&amp;quot;, &amp;quot;sr9_corpus.json&amp;quot;), encoding=&amp;quot;utf-8&amp;quot;))[&amp;quot;cases&amp;quot;][0][&amp;quot;input&amp;quot;][&amp;quot;suite&amp;quot;]&lt;br /&gt;
# Hand facts about the suite: a(): R1=1 R2=2 R3=0 R4=0 R5=1 R6=1 R7=0.&lt;br /&gt;
# steps: R1=3 R2=1 R3=1 R4=1 R5=2 R6=2 R7=2. Only R4 fails SR1.&lt;br /&gt;
# DOMAIN: R5=LIM, R6=OTHER, the rest MAIN. L-M pairs: R1|R3, R2|R3, R7|R3.&lt;br /&gt;
assert [SUITE[&amp;quot;records&amp;quot;][r][&amp;quot;steps&amp;quot;] for r in [&amp;quot;R1&amp;quot;, &amp;quot;R2&amp;quot;, &amp;quot;R3&amp;quot;, &amp;quot;R4&amp;quot;, &amp;quot;R5&amp;quot;, &amp;quot;R6&amp;quot;, &amp;quot;R7&amp;quot;]] == [3, 1, 1, 1, 2, 2, 2]&lt;br /&gt;
&lt;br /&gt;
PARAMS = {&amp;quot;STEP_CONVENTION&amp;quot;: &amp;quot;one inference rule is one step&amp;quot;, &amp;quot;K&amp;quot;: &amp;quot;2&amp;quot;, &amp;quot;N_X&amp;quot;: 2, &amp;quot;S_MAX&amp;quot;: 10}&lt;br /&gt;
CONSTS = [{&amp;quot;NAME&amp;quot;: &amp;quot;w_a&amp;quot;, &amp;quot;VALUE&amp;quot;: &amp;quot;1&amp;quot;}, {&amp;quot;NAME&amp;quot;: &amp;quot;w_s&amp;quot;, &amp;quot;VALUE&amp;quot;: &amp;quot;0.5&amp;quot;},&lt;br /&gt;
          {&amp;quot;NAME&amp;quot;: &amp;quot;w_big&amp;quot;, &amp;quot;VALUE&amp;quot;: &amp;quot;1e400&amp;quot;}, {&amp;quot;NAME&amp;quot;: &amp;quot;w_huge&amp;quot;, &amp;quot;VALUE&amp;quot;: &amp;quot;1e308&amp;quot;}]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def tms(*yardsticks):&lt;br /&gt;
    return {&amp;quot;PARAMETERS&amp;quot;: dict(PARAMS), &amp;quot;CONSTANTS&amp;quot;: copy.deepcopy(CONSTS),&lt;br /&gt;
            &amp;quot;YARDSTICKS&amp;quot;: [{&amp;quot;NAME&amp;quot;: n, &amp;quot;KEY&amp;quot;: k, &amp;quot;LIMITING&amp;quot;: l} for n, k, l in yardsticks]}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
T = tms(&lt;br /&gt;
    (&amp;quot;skel&amp;quot;, [&amp;quot;SR1&amp;quot;, &amp;quot;A&amp;quot;, &amp;quot;S&amp;quot;], []),&lt;br /&gt;
    (&amp;quot;comb&amp;quot;, [&amp;quot;SR1&amp;quot;, &amp;quot;WSUM:w_a*A;w_s*S&amp;quot;, &amp;quot;S&amp;quot;], []),&lt;br /&gt;
    (&amp;quot;lim&amp;quot;, [&amp;quot;SR1&amp;quot;, &amp;quot;A&amp;quot;, &amp;quot;S&amp;quot;], [{&amp;quot;DOMAIN&amp;quot;: &amp;quot;LIM&amp;quot;, &amp;quot;KEY&amp;quot;: [&amp;quot;SR1&amp;quot;, &amp;quot;NEG:A&amp;quot;, &amp;quot;S&amp;quot;]}]),&lt;br /&gt;
    (&amp;quot;lim_main&amp;quot;, [&amp;quot;SR1&amp;quot;, &amp;quot;A&amp;quot;], [{&amp;quot;DOMAIN&amp;quot;: &amp;quot;MAIN&amp;quot;, &amp;quot;KEY&amp;quot;: [&amp;quot;SR1&amp;quot;, &amp;quot;NEG:A&amp;quot;]}]),&lt;br /&gt;
    (&amp;quot;field&amp;quot;, [&amp;quot;SR1&amp;quot;, &amp;quot;FIELD:VALUE&amp;quot;], []),&lt;br /&gt;
    (&amp;quot;big&amp;quot;, [&amp;quot;SR1&amp;quot;, &amp;quot;WSUM:w_big*S&amp;quot;], []),&lt;br /&gt;
    (&amp;quot;huge&amp;quot;, [&amp;quot;SR1&amp;quot;, &amp;quot;WSUM:w_huge*A;w_huge*S&amp;quot;], []),&lt;br /&gt;
)&lt;br /&gt;
R = SUITE[&amp;quot;records&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
cases = []&lt;br /&gt;
def case(cid, fn, inp, expect, **extra):&lt;br /&gt;
    c = {&amp;quot;id&amp;quot;: cid, &amp;quot;fn&amp;quot;: fn, &amp;quot;input&amp;quot;: inp}&lt;br /&gt;
    c.update(extra)&lt;br /&gt;
    c[&amp;quot;expect&amp;quot;] = expect&lt;br /&gt;
    cases.append(c)&lt;br /&gt;
&lt;br /&gt;
# ---- keys ------------------------------------------------------------------&lt;br /&gt;
case(&amp;quot;key/skel-R1&amp;quot;, &amp;quot;yardstick_key&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;skel&amp;quot;, &amp;quot;rid&amp;quot;: &amp;quot;R1&amp;quot;, &amp;quot;records&amp;quot;: R}, &amp;quot;[OK,[0,1,3]]&amp;quot;)&lt;br /&gt;
case(&amp;quot;key/skel-R4-fails-SR1&amp;quot;, &amp;quot;yardstick_key&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;skel&amp;quot;, &amp;quot;rid&amp;quot;: &amp;quot;R4&amp;quot;, &amp;quot;records&amp;quot;: R}, &amp;quot;[OK,[1,0,1]]&amp;quot;)&lt;br /&gt;
case(&amp;quot;key/comb-R1&amp;quot;, &amp;quot;yardstick_key&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;comb&amp;quot;, &amp;quot;rid&amp;quot;: &amp;quot;R1&amp;quot;, &amp;quot;records&amp;quot;: R}, &amp;quot;[OK,[0,2.5,3]]&amp;quot;,&lt;br /&gt;
     note=&amp;quot;a + 0.5 s = 1 + 1.5&amp;quot;)&lt;br /&gt;
case(&amp;quot;key/comb-R2&amp;quot;, &amp;quot;yardstick_key&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;comb&amp;quot;, &amp;quot;rid&amp;quot;: &amp;quot;R2&amp;quot;, &amp;quot;records&amp;quot;: R}, &amp;quot;[OK,[0,2.5,1]]&amp;quot;,&lt;br /&gt;
     note=&amp;quot;2 + 0.5; ties R1 on the WSUM, S breaks the tie&amp;quot;)&lt;br /&gt;
case(&amp;quot;key/lim-R5-uses-limiting-key&amp;quot;, &amp;quot;yardstick_key&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;lim&amp;quot;, &amp;quot;rid&amp;quot;: &amp;quot;R5&amp;quot;, &amp;quot;records&amp;quot;: R}, &amp;quot;[OK,[0,-1,2]]&amp;quot;)&lt;br /&gt;
case(&amp;quot;key/lim-R1-uses-main-key&amp;quot;, &amp;quot;yardstick_key&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;lim&amp;quot;, &amp;quot;rid&amp;quot;: &amp;quot;R1&amp;quot;, &amp;quot;records&amp;quot;: R}, &amp;quot;[OK,[0,1,3]]&amp;quot;)&lt;br /&gt;
case(&amp;quot;key/lim_main-R3-no-negative-zero&amp;quot;, &amp;quot;yardstick_key&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;lim_main&amp;quot;, &amp;quot;rid&amp;quot;: &amp;quot;R3&amp;quot;, &amp;quot;records&amp;quot;: R},&lt;br /&gt;
     &amp;quot;[OK,[0,0]]&amp;quot;, note=&amp;quot;NEG of a(R3) = 0 is written 0, never -0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# ---- the harness on declared yardsticks --------------------------------------&lt;br /&gt;
case(&amp;quot;harness/skel&amp;quot;, &amp;quot;yardstick_harness&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;skel&amp;quot;, &amp;quot;suite&amp;quot;: SUITE}, &amp;quot;[OK,true,true,true,0]&amp;quot;,&lt;br /&gt;
     note=&amp;quot;the strike skeleton declared in the grammar reproduces increment 3&amp;#039;s skeleton fixture&amp;quot;)&lt;br /&gt;
case(&amp;quot;harness/comb&amp;quot;, &amp;quot;yardstick_harness&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;comb&amp;quot;, &amp;quot;suite&amp;quot;: SUITE}, &amp;quot;[OK,true,true,true,0]&amp;quot;)&lt;br /&gt;
case(&amp;quot;checks/lim&amp;quot;, &amp;quot;yardstick_checks&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;lim&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[OK,[true,[]],[true,[],[R5]],[true,[]]]&amp;quot;,&lt;br /&gt;
     note=&amp;quot;R5 (LIM) is keyed by -a: one more assumption lowers its key, exempt inside the declared DOMAIN&amp;quot;)&lt;br /&gt;
case(&amp;quot;checks/lim_main&amp;quot;, &amp;quot;yardstick_checks&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;lim_main&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[OK,[true,[]],[true,[],[R1,R2,R3,R4,R7]],[true,[]]]&amp;quot;,&lt;br /&gt;
     note=&amp;quot;every MAIN record inverted and exempt; R5 (LIM) and R6 (OTHER) keep the main KEY and pass&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# ---- refusals ----------------------------------------------------------------&lt;br /&gt;
case(&amp;quot;refused/naive-key-is-not-well-formed&amp;quot;, &amp;quot;yardstick_harness&amp;quot;,&lt;br /&gt;
     {&amp;quot;tms&amp;quot;: tms((&amp;quot;naive&amp;quot;, [&amp;quot;A&amp;quot;, &amp;quot;S&amp;quot;], [])), &amp;quot;name&amp;quot;: &amp;quot;naive&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[REFUSED,TMS is not well-formed]&amp;quot;, note=&amp;quot;C1 fails by construction: KEY must begin with SR1&amp;quot;)&lt;br /&gt;
case(&amp;quot;refused/more-is-better-is-not-well-formed&amp;quot;, &amp;quot;yardstick_harness&amp;quot;,&lt;br /&gt;
     {&amp;quot;tms&amp;quot;: tms((&amp;quot;more&amp;quot;, [&amp;quot;SR1&amp;quot;, &amp;quot;NEG:A&amp;quot;, &amp;quot;S&amp;quot;], [])), &amp;quot;name&amp;quot;: &amp;quot;more&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[REFUSED,TMS is not well-formed]&amp;quot;, note=&amp;quot;static C2 refuses it at entry&amp;quot;)&lt;br /&gt;
case(&amp;quot;refused/no-such-yardstick&amp;quot;, &amp;quot;yardstick_harness&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;nope&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[REFUSED,no yardstick named nope]&amp;quot;)&lt;br /&gt;
case(&amp;quot;refused/name-escaped&amp;quot;, &amp;quot;yardstick_harness&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;x\u202ey&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[REFUSED,no yardstick named x&amp;lt;U+202E&amp;gt;y]&amp;quot;)&lt;br /&gt;
case(&amp;quot;refused/field-awaits-c16&amp;quot;, &amp;quot;yardstick_harness&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;field&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[REFUSED,FIELD terms await the record field schema (C-16)]&amp;quot;)&lt;br /&gt;
case(&amp;quot;refused/weight-not-finite&amp;quot;, &amp;quot;yardstick_harness&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;big&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[REFUSED,weight w_big is not a finite double]&amp;quot;)&lt;br /&gt;
case(&amp;quot;refused/value-not-finite&amp;quot;, &amp;quot;yardstick_harness&amp;quot;, {&amp;quot;tms&amp;quot;: T, &amp;quot;name&amp;quot;: &amp;quot;huge&amp;quot;, &amp;quot;suite&amp;quot;: SUITE},&lt;br /&gt;
     &amp;quot;[REFUSED,a yardstick value is not finite]&amp;quot;, note=&amp;quot;1e308*a + 1e308*s overflows to infinity&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def dispatch(fn, i):&lt;br /&gt;
    if fn == &amp;quot;yardstick_key&amp;quot;:&lt;br /&gt;
        return Y.yardstick_key(i[&amp;quot;tms&amp;quot;], i[&amp;quot;name&amp;quot;], i[&amp;quot;rid&amp;quot;], i[&amp;quot;records&amp;quot;], i.get(&amp;quot;tfk_assumptions&amp;quot;, []))&lt;br /&gt;
    if fn == &amp;quot;yardstick_checks&amp;quot;:&lt;br /&gt;
        return Y.yardstick_checks(i[&amp;quot;tms&amp;quot;], i[&amp;quot;name&amp;quot;], i[&amp;quot;suite&amp;quot;])&lt;br /&gt;
    if fn == &amp;quot;yardstick_harness&amp;quot;:&lt;br /&gt;
        return Y.yardstick_harness(i[&amp;quot;tms&amp;quot;], i[&amp;quot;name&amp;quot;], i[&amp;quot;suite&amp;quot;])&lt;br /&gt;
    raise KeyError(fn)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
bad = 0&lt;br /&gt;
for c in cases:&lt;br /&gt;
    got = S.canon(dispatch(c[&amp;quot;fn&amp;quot;], c[&amp;quot;input&amp;quot;]))&lt;br /&gt;
    if got != c[&amp;quot;expect&amp;quot;]:&lt;br /&gt;
        bad += 1&lt;br /&gt;
        print(&amp;quot;MISMATCH&amp;quot;, c[&amp;quot;id&amp;quot;], &amp;quot;\n  expect&amp;quot;, c[&amp;quot;expect&amp;quot;], &amp;quot;\n  got   &amp;quot;, got)&lt;br /&gt;
if bad:&lt;br /&gt;
    sys.exit(&amp;quot;refusing to write: %d mismatches&amp;quot; % bad)&lt;br /&gt;
&lt;br /&gt;
corpus = {&lt;br /&gt;
  &amp;quot;meta&amp;quot;: {&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;tpc_yardstick_corpus&amp;quot;, &amp;quot;version&amp;quot;: &amp;quot;0.1.0&amp;quot;,&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;VERIFIED (both residences)&amp;quot;,&lt;br /&gt;
    &amp;quot;conforms_tps&amp;quot;: &amp;quot;0.1.0 revision 4 (TPS 4.5: SR9 C1, C2, C4 on a declared, executable TMS entry; D100.1)&amp;quot;,&lt;br /&gt;
    &amp;quot;module&amp;quot;: &amp;quot;tpc_yardstick 0.1.0 (tpc_zone 0.2.0, tpc_sr9 0.1.0)&amp;quot;,&lt;br /&gt;
    &amp;quot;suite&amp;quot;: &amp;quot;sr9_synthetic_suite 0.1.0, verbatim&amp;quot;,&lt;br /&gt;
    &amp;quot;note&amp;quot;: (&amp;quot;Expectations hand-derived: a() R1=1 R2=2 R3=0 R4=0 R5=1 R6=1 R7=0; steps 3 1 1 1 2 2 2; &amp;quot;&lt;br /&gt;
             &amp;quot;only R4 fails SR1; R5 in LIM, R6 in OTHER. Both residences MUST reproduce every expect.&amp;quot;)&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;cases&amp;quot;: cases&lt;br /&gt;
}&lt;br /&gt;
with open(os.path.join(HERE, &amp;quot;vectors&amp;quot;, &amp;quot;yardstick_corpus.json&amp;quot;), &amp;quot;w&amp;quot;, encoding=&amp;quot;utf-8&amp;quot;,&lt;br /&gt;
          newline=&amp;quot;\n&amp;quot;) as f:&lt;br /&gt;
    f.write(json.dumps(corpus, indent=1, ensure_ascii=False) + &amp;quot;\n&amp;quot;)&lt;br /&gt;
print(&amp;quot;wrote&amp;quot;, len(cases), &amp;quot;yardstick cases; all match hand-derived expectations&amp;quot;)&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>BFP Rauch</name></author>
	</entry>
</feed>