<?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_conditions_corpus.py</id>
	<title>The Principia Machina/TPC-PY/gen conditions 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_conditions_corpus.py"/>
	<link rel="alternate" type="text/html" href="https://invarians.org/index.php?title=The_Principia_Machina/TPC-PY/gen_conditions_corpus.py&amp;action=history"/>
	<updated>2026-10-21T16:59:56Z</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_conditions_corpus.py&amp;diff=4821&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_conditions_corpus.py&amp;diff=4821&amp;oldid=prev"/>
		<updated>2026-09-30T02:11:02Z</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;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&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;4&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;!-- diff cache key pma_cutover_20261020t051351z-soft_:diff:1.41:old-4820:rev-4821 --&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_conditions_corpus.py&amp;diff=4820&amp;oldid=prev</id>
		<title>BFP Rauch: TPC-PY source gen_conditions_corpus.py (0.1.0), SHA-256 216dd10dc7516e9d; 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_conditions_corpus.py&amp;diff=4820&amp;oldid=prev"/>
		<updated>2026-09-30T02:10:58Z</updated>

		<summary type="html">&lt;p&gt;TPC-PY source gen_conditions_corpus.py (0.1.0), SHA-256 216dd10dc7516e9d; conformed TPS 0.4.0; PROPOSED, not declared (TPC-PY 0.2.0)&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;gen_conditions_corpus 0.1.0 (agent TQ, increment 12): writes&lt;br /&gt;
vectors/conditions_corpus.json, the vectors of tpc_strike 0.3.0&amp;#039;s&lt;br /&gt;
conditions_of, comparison_set and sr8_groups (tpm_record_functions 0.2.0&lt;br /&gt;
section 9; D196.1; RD-RS-29, RD-RS-33, RD-RS-36), answered through&lt;br /&gt;
tpc_record&amp;#039;s run_case (tpc_strike imports nothing of tpc_record).&lt;br /&gt;
&lt;br /&gt;
VECTORS FIRST: every expectation below is a literal of this generator,&lt;br /&gt;
written from the specification before the functions existed, in TPM&amp;#039;s&lt;br /&gt;
canonical JSON (the writer cj below). The TFK is the tree&amp;#039;s example&lt;br /&gt;
spring_draft.json (E_x&amp;#039;s DOF x free; E_z&amp;#039;s DOF z the TARGET of the FIX&lt;br /&gt;
CONSTRAINT C_NOZ). Standard library only; run from tpc/.&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
import copy&lt;br /&gt;
import json&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
HERE = os.path.dirname(os.path.abspath(__file__))&lt;br /&gt;
CORPUS_VERSION = &amp;quot;0.1.0&amp;quot;&lt;br /&gt;
CASES = []&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def cj(v):&lt;br /&gt;
    if v is True:&lt;br /&gt;
        return &amp;quot;true&amp;quot;&lt;br /&gt;
    if v is False:&lt;br /&gt;
        return &amp;quot;false&amp;quot;&lt;br /&gt;
    if v is None:&lt;br /&gt;
        return &amp;quot;null&amp;quot;&lt;br /&gt;
    if type(v) is int:&lt;br /&gt;
        return str(v)&lt;br /&gt;
    if type(v) is str:&lt;br /&gt;
        out = [&amp;#039;&amp;quot;&amp;#039;]&lt;br /&gt;
        for ch in v:&lt;br /&gt;
            if ch == &amp;#039;&amp;quot;&amp;#039;:&lt;br /&gt;
                out.append(&amp;#039;\\&amp;quot;&amp;#039;)&lt;br /&gt;
            elif ch == &amp;quot;\\&amp;quot;:&lt;br /&gt;
                out.append(&amp;quot;\\\\&amp;quot;)&lt;br /&gt;
            elif ord(ch) &amp;lt; 0x20:&lt;br /&gt;
                out.append(&amp;quot;\\u%04x&amp;quot; % ord(ch))&lt;br /&gt;
            else:&lt;br /&gt;
                out.append(ch)&lt;br /&gt;
        out.append(&amp;#039;&amp;quot;&amp;#039;)&lt;br /&gt;
        return &amp;quot;&amp;quot;.join(out)&lt;br /&gt;
    if type(v) is list:&lt;br /&gt;
        return &amp;quot;[&amp;quot; + &amp;quot;,&amp;quot;.join(cj(x) for x in v) + &amp;quot;]&amp;quot;&lt;br /&gt;
    if type(v) is dict:&lt;br /&gt;
        return &amp;quot;{&amp;quot; + &amp;quot;,&amp;quot;.join(cj(k) + &amp;quot;:&amp;quot; + cj(v[k]) for k in sorted(v)) + &amp;quot;}&amp;quot;&lt;br /&gt;
    raise TypeError(type(v))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def add(name, fn, args, expected):&lt;br /&gt;
    CASES.append({&amp;quot;name&amp;quot;: name, &amp;quot;fn&amp;quot;: fn, &amp;quot;args&amp;quot;: args, &amp;quot;expected&amp;quot;: expected})&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def refused(*p):&lt;br /&gt;
    return cj([&amp;quot;REFUSED&amp;quot;, [list(x) for x in sorted(set(tuple(x) for x in p))]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
with open(os.path.join(HERE, &amp;quot;examples&amp;quot;, &amp;quot;spring_draft.json&amp;quot;), encoding=&amp;quot;utf-8&amp;quot;) as _f:&lt;br /&gt;
    TFK = json.load(_f)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def res(rid, regime=&amp;quot;M&amp;quot;, quantity=&amp;quot;E_x&amp;quot;, value=&amp;quot;0.01&amp;quot;, unit=&amp;quot;m&amp;quot;, at=None, assumptions=(), cites=(), **kv):&lt;br /&gt;
    r = {&amp;quot;ID&amp;quot;: rid, &amp;quot;CLASS&amp;quot;: &amp;quot;RESULT&amp;quot;, &amp;quot;GRADE&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;, &amp;quot;STATUS&amp;quot;: &amp;quot;UNMARKED&amp;quot;, &amp;quot;REGIME&amp;quot;: regime,&lt;br /&gt;
         &amp;quot;QUANTITY&amp;quot;: quantity, &amp;quot;VALUE&amp;quot;: value, &amp;quot;UNIT&amp;quot;: unit, &amp;quot;ASSUMPTIONS&amp;quot;: list(assumptions),&lt;br /&gt;
         &amp;quot;CITES&amp;quot;: list(cites)}&lt;br /&gt;
    if regime == &amp;quot;M&amp;quot;:&lt;br /&gt;
        r[&amp;quot;U_C&amp;quot;] = &amp;quot;0.001&amp;quot;&lt;br /&gt;
    if at is not None:&lt;br /&gt;
        r[&amp;quot;AT&amp;quot;] = at&lt;br /&gt;
    r.update(kv)&lt;br /&gt;
    return r&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def pt(dof, v, u):&lt;br /&gt;
    return {&amp;quot;DOF&amp;quot;: dof, &amp;quot;VALUE&amp;quot;: v, &amp;quot;UNIT&amp;quot;: u}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SIT2 = {&amp;quot;ID&amp;quot;: &amp;quot;RR-2&amp;quot;, &amp;quot;CLASS&amp;quot;: &amp;quot;ASSUMPTION&amp;quot;, &amp;quot;GRADE&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;, &amp;quot;SITUATION&amp;quot;: &amp;quot;INITIAL&amp;quot;, &amp;quot;DOF&amp;quot;: &amp;quot;x&amp;quot;,&lt;br /&gt;
        &amp;quot;VALUE&amp;quot;: &amp;quot;0.01&amp;quot;, &amp;quot;UNIT&amp;quot;: &amp;quot;m&amp;quot;, &amp;quot;ASSUMPTIONS&amp;quot;: [], &amp;quot;CITES&amp;quot;: []}&lt;br /&gt;
SIT3 = dict(SIT2, ID=&amp;quot;RR-3&amp;quot;, SITUATION=&amp;quot;BOUNDARY&amp;quot;)&lt;br /&gt;
PLAIN4 = {&amp;quot;ID&amp;quot;: &amp;quot;RR-4&amp;quot;, &amp;quot;CLASS&amp;quot;: &amp;quot;ASSUMPTION&amp;quot;, &amp;quot;GRADE&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;, &amp;quot;PROPOSITION&amp;quot;: &amp;quot;p&amp;quot;,&lt;br /&gt;
          &amp;quot;ASSUMPTIONS&amp;quot;: [], &amp;quot;CITES&amp;quot;: []}&lt;br /&gt;
M10 = res(&amp;quot;RR-10&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;s&amp;quot;)], assumptions=[&amp;quot;RR-2&amp;quot;])&lt;br /&gt;
M11 = res(&amp;quot;RR-11&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;ms&amp;quot;)], assumptions=[&amp;quot;RR-2&amp;quot;])&lt;br /&gt;
M12 = res(&amp;quot;RR-12&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;s&amp;quot;)], assumptions=[&amp;quot;RR-2&amp;quot;])&lt;br /&gt;
M13 = res(&amp;quot;RR-13&amp;quot;, assumptions=[&amp;quot;RR-2&amp;quot;])&lt;br /&gt;
M14 = res(&amp;quot;RR-14&amp;quot;, assumptions=[&amp;quot;RR-2&amp;quot;])&lt;br /&gt;
L15 = res(&amp;quot;RR-15&amp;quot;, regime=&amp;quot;L&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;s&amp;quot;)], assumptions=[&amp;quot;RR-2&amp;quot;])&lt;br /&gt;
L16 = res(&amp;quot;RR-16&amp;quot;, regime=&amp;quot;L&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;s&amp;quot;)], assumptions=[&amp;quot;RR-2&amp;quot;])&lt;br /&gt;
L17 = res(&amp;quot;RR-17&amp;quot;, regime=&amp;quot;L&amp;quot;, assumptions=[&amp;quot;RR-2&amp;quot;])&lt;br /&gt;
del L17[&amp;quot;VALUE&amp;quot;], L17[&amp;quot;UNIT&amp;quot;], L17[&amp;quot;QUANTITY&amp;quot;]&lt;br /&gt;
REG = [SIT2, SIT3, PLAIN4, M10, M11, M12, M13, M14, L15, L16, L17]&lt;br /&gt;
WORDS = dict((r[&amp;quot;ID&amp;quot;], &amp;quot;PROVISIONAL&amp;quot;) for r in REG)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def co(name, records, rid, expected):&lt;br /&gt;
    add(name, &amp;quot;conditions_of&amp;quot;, {&amp;quot;records&amp;quot;: records, &amp;quot;id&amp;quot;: rid}, expected)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
co(&amp;quot;CO01 an M record&amp;#039;s situation and point&amp;quot;, REG, &amp;quot;RR-10&amp;quot;, cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-2&amp;quot;], [[&amp;quot;t&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;none&amp;quot;]]]]))&lt;br /&gt;
co(&amp;quot;CO02 the point in ms normalized to SI&amp;quot;, REG, &amp;quot;RR-11&amp;quot;, cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-2&amp;quot;], [[&amp;quot;t&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;none&amp;quot;]]]]))&lt;br /&gt;
co(&amp;quot;CO03 AT absent: no point&amp;quot;, REG, &amp;quot;RR-13&amp;quot;, cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-2&amp;quot;], []]]))&lt;br /&gt;
co(&amp;quot;CO04 the closure through CITES&amp;quot;, REG + [res(&amp;quot;RR-18&amp;quot;, assumptions=[&amp;quot;RR-3&amp;quot;, &amp;quot;RR-4&amp;quot;], cites=[&amp;quot;RR-10&amp;quot;],&lt;br /&gt;
                                                at=[pt(&amp;quot;t&amp;quot;, &amp;quot;1000&amp;quot;, &amp;quot;ms&amp;quot;)])], &amp;quot;RR-18&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-2&amp;quot;, &amp;quot;RR-3&amp;quot;], [[&amp;quot;t&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;none&amp;quot;]]]]))&lt;br /&gt;
co(&amp;quot;CO05 a plain ASSUMPTION is no situation&amp;quot;, REG + [res(&amp;quot;RR-19&amp;quot;, assumptions=[&amp;quot;RR-4&amp;quot;])], &amp;quot;RR-19&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[], []]]))&lt;br /&gt;
co(&amp;quot;CO06 identifiers outside the records ignored&amp;quot;, REG + [res(&amp;quot;RR-19&amp;quot;, assumptions=[&amp;quot;RR-2&amp;quot;, &amp;quot;RR-99&amp;quot;],&lt;br /&gt;
                                                              cites=[&amp;quot;RR-98&amp;quot;])], &amp;quot;RR-19&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-2&amp;quot;], []]]))&lt;br /&gt;
co(&amp;quot;CO07 points sorted by DOF&amp;quot;, REG + [res(&amp;quot;RR-19&amp;quot;, at=[pt(&amp;quot;x&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;cm&amp;quot;), pt(&amp;quot;t&amp;quot;, &amp;quot;1.5&amp;quot;, &amp;quot;s&amp;quot;)])], &amp;quot;RR-19&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[], [[&amp;quot;t&amp;quot;, &amp;quot;15e-1&amp;quot;, &amp;quot;none&amp;quot;], [&amp;quot;x&amp;quot;, &amp;quot;2e-2&amp;quot;, &amp;quot;none&amp;quot;]]]]))&lt;br /&gt;
VER = {&amp;quot;ID&amp;quot;: &amp;quot;RR-30&amp;quot;, &amp;quot;CLASS&amp;quot;: &amp;quot;VERIFICATION&amp;quot;, &amp;quot;GRADE&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;, &amp;quot;REGIME&amp;quot;: &amp;quot;M&amp;quot;, &amp;quot;TARGET&amp;quot;: &amp;quot;RR-18&amp;quot;,&lt;br /&gt;
       &amp;quot;ASSUMPTIONS&amp;quot;: [&amp;quot;RR-3&amp;quot;], &amp;quot;CITES&amp;quot;: [], &amp;quot;AT&amp;quot;: [pt(&amp;quot;t&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;s&amp;quot;)]}&lt;br /&gt;
co(&amp;quot;CO08 a VERIFICATION: its TARGET&amp;#039;s premises with its own AT (RD-RS-36)&amp;quot;,&lt;br /&gt;
   REG + [res(&amp;quot;RR-18&amp;quot;, assumptions=[&amp;quot;RR-3&amp;quot;], cites=[&amp;quot;RR-10&amp;quot;]), VER], &amp;quot;RR-30&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-2&amp;quot;, &amp;quot;RR-3&amp;quot;], [[&amp;quot;t&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;none&amp;quot;]]]]))&lt;br /&gt;
co(&amp;quot;CO09 a kind recorded: a point in Hz&amp;quot;, REG + [res(&amp;quot;RR-19&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;Hz&amp;quot;)])], &amp;quot;RR-19&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[], [[&amp;quot;t&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;Hz1&amp;quot;]]]]))&lt;br /&gt;
co(&amp;quot;CO10 REC-73 an ASSUMPTION&amp;quot;, REG, &amp;quot;RR-2&amp;quot;,&lt;br /&gt;
   refused([&amp;quot;REC-73&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;conditions_of reads a RESULT or a VERIFICATION&amp;quot;]))&lt;br /&gt;
co(&amp;quot;CO11 REC-52 not in the records&amp;quot;, REG, &amp;quot;RR-77&amp;quot;, refused([&amp;quot;REC-52&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;record RR-77 is not in the register&amp;quot;]))&lt;br /&gt;
co(&amp;quot;CO12 list-form members ignored&amp;quot;, REG + [[&amp;quot;RR-90&amp;quot;, &amp;quot;HOLD&amp;quot;, &amp;quot;x&amp;quot;]], &amp;quot;RR-10&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-2&amp;quot;], [[&amp;quot;t&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;none&amp;quot;]]]]))&lt;br /&gt;
co(&amp;quot;CO13 REC-50 records not a register&amp;quot;, {&amp;quot;RR-1&amp;quot;: {}}, &amp;quot;RR-1&amp;quot;,&lt;br /&gt;
   refused([&amp;quot;REC-50&amp;quot;, &amp;quot;-&amp;quot;, &amp;#039;records {&amp;quot;RR-1&amp;quot;:{}} is not a register&amp;#039;]))&lt;br /&gt;
co(&amp;quot;CO14 REC-50 an AT point that does not normalize&amp;quot;,&lt;br /&gt;
   REG + [res(&amp;quot;RR-19&amp;quot;, at=[{&amp;quot;DOF&amp;quot;: &amp;quot;t&amp;quot;, &amp;quot;VALUE&amp;quot;: &amp;quot;x&amp;quot;, &amp;quot;UNIT&amp;quot;: &amp;quot;s&amp;quot;}])], &amp;quot;RR-19&amp;quot;,&lt;br /&gt;
   refused([&amp;quot;REC-50&amp;quot;, &amp;quot;-&amp;quot;, &amp;#039;AT [{&amp;quot;DOF&amp;quot;:&amp;quot;t&amp;quot;,&amp;quot;UNIT&amp;quot;:&amp;quot;s&amp;quot;,&amp;quot;VALUE&amp;quot;:&amp;quot;x&amp;quot;}] is not a list of points that normalize&amp;#039;]))&lt;br /&gt;
co(&amp;quot;CO15 a VERIFICATION whose TARGET is not in the records: no situation&amp;quot;,&lt;br /&gt;
   [SIT2, dict(VER, TARGET=&amp;quot;RR-88&amp;quot;)], &amp;quot;RR-30&amp;quot;, cj([&amp;quot;OK&amp;quot;, [[], [[&amp;quot;t&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;none&amp;quot;]]]]))&lt;br /&gt;
co(&amp;quot;CO16 REC-52 an identifier that is not a string&amp;quot;, REG, 7, refused([&amp;quot;REC-52&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;record 7 is not in the register&amp;quot;]))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def cs(name, records, words, quantity, expected):&lt;br /&gt;
    add(name, &amp;quot;comparison_set&amp;quot;, {&amp;quot;records&amp;quot;: records, &amp;quot;words&amp;quot;: words, &amp;quot;tfk&amp;quot;: TFK, &amp;quot;quantity&amp;quot;: quantity}, expected)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cs(&amp;quot;CS01 E_x: equal conditions, both with AT (TEST); AT empty (INSPECT); L against M listed; never L-L&amp;quot;,&lt;br /&gt;
   REG, WORDS, &amp;quot;E_x&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-10&amp;quot;, &amp;quot;RR-11&amp;quot;, &amp;quot;TEST&amp;quot;], [&amp;quot;RR-10&amp;quot;, &amp;quot;RR-15&amp;quot;, &amp;quot;TEST&amp;quot;], [&amp;quot;RR-10&amp;quot;, &amp;quot;RR-16&amp;quot;, &amp;quot;TEST&amp;quot;],&lt;br /&gt;
              [&amp;quot;RR-11&amp;quot;, &amp;quot;RR-15&amp;quot;, &amp;quot;TEST&amp;quot;], [&amp;quot;RR-11&amp;quot;, &amp;quot;RR-16&amp;quot;, &amp;quot;TEST&amp;quot;], [&amp;quot;RR-13&amp;quot;, &amp;quot;RR-14&amp;quot;, &amp;quot;INSPECT&amp;quot;]]]))&lt;br /&gt;
cs(&amp;quot;CS02 a HELD record is not standing, not listed&amp;quot;, REG, dict(WORDS, **{&amp;quot;RR-11&amp;quot;: &amp;quot;HELD&amp;quot;}), &amp;quot;E_x&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-10&amp;quot;, &amp;quot;RR-15&amp;quot;, &amp;quot;TEST&amp;quot;], [&amp;quot;RR-10&amp;quot;, &amp;quot;RR-16&amp;quot;, &amp;quot;TEST&amp;quot;], [&amp;quot;RR-13&amp;quot;, &amp;quot;RR-14&amp;quot;, &amp;quot;INSPECT&amp;quot;]]]))&lt;br /&gt;
Z20 = res(&amp;quot;RR-20&amp;quot;, quantity=&amp;quot;E_z&amp;quot;, value=&amp;quot;0&amp;quot;, unit=&amp;quot;m&amp;quot;)&lt;br /&gt;
Z21 = res(&amp;quot;RR-21&amp;quot;, quantity=&amp;quot;E_z&amp;quot;, value=&amp;quot;0.001&amp;quot;, unit=&amp;quot;m&amp;quot;)&lt;br /&gt;
cs(&amp;quot;CS03 a FIXed DOF, AT empty: TEST&amp;quot;, REG + [Z20, Z21], dict(WORDS, **{&amp;quot;RR-20&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;,&lt;br /&gt;
                                                                      &amp;quot;RR-21&amp;quot;: &amp;quot;ESTABLISHED&amp;quot;}), &amp;quot;E_z&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-20&amp;quot;, &amp;quot;RR-21&amp;quot;, &amp;quot;TEST&amp;quot;]]]))&lt;br /&gt;
H22 = res(&amp;quot;RR-22&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;Hz&amp;quot;)])&lt;br /&gt;
H23 = res(&amp;quot;RR-23&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;2&amp;quot;, &amp;quot;s-1&amp;quot;)])&lt;br /&gt;
cs(&amp;quot;CS04 Hz against s-1 in AT: CONVENTION&amp;quot;, [H22, H23], {&amp;quot;RR-22&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;, &amp;quot;RR-23&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;},&lt;br /&gt;
   &amp;quot;E_x&amp;quot;, cj([&amp;quot;OK&amp;quot;, [[&amp;quot;RR-22&amp;quot;, &amp;quot;RR-23&amp;quot;, &amp;quot;CONVENTION&amp;quot;]]]))&lt;br /&gt;
cs(&amp;quot;CS05 same situation, different AT: not paired&amp;quot;, [SIT2, M10, M12], WORDS, &amp;quot;E_x&amp;quot;, cj([&amp;quot;OK&amp;quot;, []]))&lt;br /&gt;
cs(&amp;quot;CS06 different situations: not paired&amp;quot;, [SIT2, SIT3, M10, res(&amp;quot;RR-24&amp;quot;, at=[pt(&amp;quot;t&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;s&amp;quot;)],&lt;br /&gt;
                                                                 assumptions=[&amp;quot;RR-3&amp;quot;])],&lt;br /&gt;
   dict(WORDS, **{&amp;quot;RR-24&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;}), &amp;quot;E_x&amp;quot;, cj([&amp;quot;OK&amp;quot;, []]))&lt;br /&gt;
cs(&amp;quot;CS07 a record absent from words does not stand&amp;quot;, REG, {&amp;quot;RR-10&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;}, &amp;quot;E_x&amp;quot;, cj([&amp;quot;OK&amp;quot;, []]))&lt;br /&gt;
cs(&amp;quot;CS08 REC-74 a quantity outside the TrM&amp;quot;, REG, WORDS, &amp;quot;E_q&amp;quot;,&lt;br /&gt;
   refused([&amp;quot;REC-74&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;quantity E_q is not an entry of the TrM&amp;quot;]))&lt;br /&gt;
cs(&amp;quot;CS09 an L record without VALUE is not a comparison record&amp;quot;, [SIT2, L17, M13], WORDS, &amp;quot;E_x&amp;quot;, cj([&amp;quot;OK&amp;quot;, []]))&lt;br /&gt;
cs(&amp;quot;CS10 REC-50 words not a map&amp;quot;, REG, [&amp;quot;RR-10&amp;quot;], &amp;quot;E_x&amp;quot;,&lt;br /&gt;
   refused([&amp;quot;REC-50&amp;quot;, &amp;quot;-&amp;quot;, &amp;#039;words [&amp;quot;RR-10&amp;quot;] is not a map of status words&amp;#039;]))&lt;br /&gt;
add(&amp;quot;CS11 REC-39 the TFK not readable&amp;quot;, &amp;quot;comparison_set&amp;quot;, {&amp;quot;records&amp;quot;: REG, &amp;quot;words&amp;quot;: WORDS, &amp;quot;tfk&amp;quot;: {&amp;quot;TPK&amp;quot;: {}},&lt;br /&gt;
                                                           &amp;quot;quantity&amp;quot;: &amp;quot;E_x&amp;quot;},&lt;br /&gt;
    refused([&amp;quot;REC-39&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;the TFK is not readable&amp;quot;]))&lt;br /&gt;
cs(&amp;quot;CS12 REC-74 a quantity that is not a string&amp;quot;, REG, WORDS, 5,&lt;br /&gt;
   refused([&amp;quot;REC-74&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;quantity 5 is not an entry of the TrM&amp;quot;]))&lt;br /&gt;
cs(&amp;quot;CS13 REC-50 records not a register&amp;quot;, &amp;quot;x&amp;quot;, WORDS, &amp;quot;E_x&amp;quot;, refused([&amp;quot;REC-50&amp;quot;, &amp;quot;-&amp;quot;, &amp;#039;records &amp;quot;x&amp;quot; is not a register&amp;#039;]))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def s8(name, records, words, quantity, expected):&lt;br /&gt;
    add(name, &amp;quot;sr8_groups&amp;quot;, {&amp;quot;records&amp;quot;: records, &amp;quot;words&amp;quot;: words, &amp;quot;tfk&amp;quot;: TFK, &amp;quot;quantity&amp;quot;: quantity}, expected)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
s8(&amp;quot;S801 groups split by CONDITIONS; L records not in SR8&amp;#039;s groups&amp;quot;, REG, WORDS, &amp;quot;E_x&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;TEST&amp;quot;, [&amp;quot;RR-10&amp;quot;, &amp;quot;RR-11&amp;quot;]], [&amp;quot;TEST&amp;quot;, [&amp;quot;RR-12&amp;quot;]], [&amp;quot;INSPECT&amp;quot;, [&amp;quot;RR-13&amp;quot;, &amp;quot;RR-14&amp;quot;]]]]))&lt;br /&gt;
s8(&amp;quot;S802 a convention splits a group&amp;quot;, [H22, H23], {&amp;quot;RR-22&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;, &amp;quot;RR-23&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;}, &amp;quot;E_x&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;TEST&amp;quot;, [&amp;quot;RR-22&amp;quot;]], [&amp;quot;TEST&amp;quot;, [&amp;quot;RR-23&amp;quot;]]]]))&lt;br /&gt;
s8(&amp;quot;S803 a FIXed DOF: TEST without AT&amp;quot;, [Z20, Z21], {&amp;quot;RR-20&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;, &amp;quot;RR-21&amp;quot;: &amp;quot;PROVISIONAL&amp;quot;}, &amp;quot;E_z&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;TEST&amp;quot;, [&amp;quot;RR-20&amp;quot;, &amp;quot;RR-21&amp;quot;]]]]))&lt;br /&gt;
s8(&amp;quot;S804 a HELD record left out&amp;quot;, REG, dict(WORDS, **{&amp;quot;RR-10&amp;quot;: &amp;quot;HELD&amp;quot;}), &amp;quot;E_x&amp;quot;,&lt;br /&gt;
   cj([&amp;quot;OK&amp;quot;, [[&amp;quot;TEST&amp;quot;, [&amp;quot;RR-11&amp;quot;]], [&amp;quot;TEST&amp;quot;, [&amp;quot;RR-12&amp;quot;]], [&amp;quot;INSPECT&amp;quot;, [&amp;quot;RR-13&amp;quot;, &amp;quot;RR-14&amp;quot;]]]]))&lt;br /&gt;
s8(&amp;quot;S805 REC-74&amp;quot;, REG, WORDS, &amp;quot;E_q&amp;quot;, refused([&amp;quot;REC-74&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;quantity E_q is not an entry of the TrM&amp;quot;]))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def main():&lt;br /&gt;
    names = [c[&amp;quot;name&amp;quot;] for c in CASES]&lt;br /&gt;
    assert len(set(names)) == len(names)&lt;br /&gt;
    for c in CASES:&lt;br /&gt;
        json.loads(c[&amp;quot;expected&amp;quot;])&lt;br /&gt;
    out = {&amp;quot;corpus&amp;quot;: &amp;quot;conditions&amp;quot;, &amp;quot;version&amp;quot;: CORPUS_VERSION,&lt;br /&gt;
           &amp;quot;spec&amp;quot;: &amp;quot;tpm_record_functions 0.2.0 section 9 (tpc_strike 0.3.0)&amp;quot;,&lt;br /&gt;
           &amp;quot;note&amp;quot;: &amp;quot;vectors first: every expectation a literal of the generator, in TPM&amp;#039;s canonical JSON&amp;quot;,&lt;br /&gt;
           &amp;quot;cases&amp;quot;: CASES}&lt;br /&gt;
    with open(os.path.join(HERE, &amp;quot;vectors&amp;quot;, &amp;quot;conditions_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;
        json.dump(out, f, indent=1, sort_keys=True, ensure_ascii=True)&lt;br /&gt;
        f.write(&amp;quot;\n&amp;quot;)&lt;br /&gt;
    print(&amp;quot;wrote %d conditions cases&amp;quot; % len(CASES))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;quot;__main__&amp;quot;:&lt;br /&gt;
    main()&lt;br /&gt;
# END OF ARTIFACT --- gen_conditions_corpus.py 0.1.0&lt;br /&gt;
# If this line is absent, the payload arrived truncated.&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>BFP Rauch</name></author>
	</entry>
</feed>