packages feed

phino 0.0.168 → 0.0.169

raw patch · 280 files changed

+8877/−9362 lines, 280 files

Files

README.md view
@@ -34,7 +34,7 @@  ```bash cabal update-cabal install --overwrite-policy=always phino-0.0.167+cabal install --overwrite-policy=always phino-0.0.168 phino --version ``` @@ -59,7 +59,7 @@ for the runner and puts it on the `PATH`:  ```yaml-- uses: objectionary/phino@0.0.167+- uses: objectionary/phino@0.0.168   with:     version-file: phino-version.txt - run: phino --version@@ -119,7 +119,7 @@ ⟦   bytes ↦ ⟦ φ ↦ ∅ ⟧,   number ↦ ⟦ φ ↦ ∅, plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-  φ ↦ 5.plus( 6 )+  φ ↦ 5.plus( x ↦ 6 ) ⟧ $ phino dataize --symbolic=atoms.yaml --sweet --hide-rho sum.phi 40-45-00-00-00-00-00-00@@ -199,7 +199,7 @@     times(ρ, x) ↦ ⟦ λ ⤍ L_number_times ⟧,     as-bool ↦ ⟦ λ ⤍ L_number_as_bool ⟧   ⟧,-  φ ↦ 2.times( 3 ).plus( 4 ).as-bool+  φ ↦ 2.times( x ↦ 3 ).plus( x ↦ 4 ).as-bool ⟧ $ phino dataize --symbolic=atoms.yaml --sweet --hide-rho partial.phi [ERROR]: No entry of --symbolic answers the λ function 'L_number_as_bool'@@ -207,8 +207,8 @@ L_number_as_bool:λ ``` -Here `2.times( 3 ).plus( 4 )` was computed, and the symbol it came to sits in-the hidden `ρ`, while `as-bool` stays where it was.+Here `2.times( x ↦ 3 ).plus( x ↦ 4 )` was computed, and the symbol it came to+sits in the hidden `ρ`, while `as-bool` stays where it was. An operand that reaches the terminator `⊥` is left in place the same way.  ### Reducing a term inside a universe@@ -223,7 +223,7 @@   bytes ↦ ⟦ φ ↦ ∅ ⟧,   number ↦ ⟦ φ ↦ ∅, plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧ ⟧-$ phino dataize --symbolic=atoms.yaml --inside='5.plus( 6 )' universe.phi+$ phino dataize --symbolic=atoms.yaml --inside='5.plus( x ↦ 6 )' universe.phi 40-45-00-00-00-00-00-00 ``` @@ -234,7 +234,8 @@ * `--max-steps` bounds how deep morphing and dataization may nest,   `1000` by default; * `--max-firings` bounds how many λ functions the whole run may fire;-* `--max-seconds` bounds how many seconds the whole run may take;+* `--max-seconds` bounds how many seconds the whole run may take,+  such as `0.5`; * `--max-nodes` bounds how many nodes the term of the run may grow to; * `--max-memory` bounds the live heap of the run, such as `8G`. @@ -251,7 +252,7 @@ ⟦   bytes ↦ ⟦ φ ↦ ∅ ⟧,   number ↦ ⟦ φ ↦ ∅, plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-  φ ↦ 5.plus( 6 ).plus( 7 )+  φ ↦ 5.plus( x ↦ 6 ).plus( x ↦ 7 ) ⟧ $ phino dataize --symbolic=atoms.yaml --sweet --hide-rho two.phi 40-45-00-00-00-00-00-00@@ -259,8 +260,8 @@ ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧ ``` -The inner `5.plus( 6 )` fires, because `.plus` is dispatched on its result,-while the outer call is left for dataization.+The inner `5.plus( x ↦ 6 )` fires, because `.plus` is dispatched on its+result, while the outer call is left for dataization. Where no formation is reachable, `morph` prints `⊥`. It fails on a term that is not a normal form. It takes every option of `dataize`.@@ -317,27 +318,27 @@ $ cat down.txt 𝕄(Φ.y):   remembered 𝑛·0·1 ≡ Φ.down  # ⟦ x ↦ ∅, λ ⤍ L_down ⟧-  𝑛·0·2 := Φ.down( x ↦ 𝜎1:λ )-  𝑛·0·3 := ⟦ x ↦ 𝜎1:λ, λ ⤍ L_down ⟧+  𝑛·0·2 ≔ Φ.down( x ↦ 𝜎1:λ )+  𝑛·0·3 ≔ ⟦ x ↦ 𝜎1:λ, λ ⤍ L_down ⟧   remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ 𝜎1:λ )   𝔼(L_down):     𝔻(ξ.x):-      𝛿·1·1 := 𝔻(𝜎1:λ)-    𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.x)-    𝑛·1·1 := Φ.down( x ↦ 𝜎2:λ )  # 𝑛 of L_down+      𝛿·1·1 ≔ 𝔻(𝜎1:λ)+    𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.x)+    𝑛·1·1 ≔ Φ.down( x ↦ 𝜎2:λ )  # 𝑛 of L_down     𝕄(𝑛·1·1):-      𝑛·1·2 := Φ.down( x ↦ 𝜎2:λ )-      𝑛·1·3 := ⟦ x ↦ 𝜎2:λ, λ ⤍ L_down ⟧+      𝑛·1·2 ≔ Φ.down( x ↦ 𝜎2:λ )+      𝑛·1·3 ≔ ⟦ x ↦ 𝜎2:λ, λ ⤍ L_down ⟧       remembered 𝑛·1·3 ≡ 𝑛·0·1( x ↦ 𝜎2:λ )-      morphed 𝑛·1·4 := 𝑛·1·3-    𝑛·1·5 := 𝑛·1·3  # 𝕄(𝑛·1·1)+      morphed 𝑛·1·4 ≔ 𝑛·1·3+    𝑛·1·5 ≔ 𝑛·1·3  # 𝕄(𝑛·1·1)     remembered 𝑛·1·3 ≡ 𝑛·0·3-    evaluated 𝑛·1·6 := 𝑛·1·3  # 𝑛·0·3+    evaluated 𝑛·1·6 ≔ 𝑛·1·3  # 𝑛·0·3   recalled 𝑛·1·3 ⇒ 𝑛·0·3   recalled 𝑛·0·3 ⇒ 𝑛·0·1( x ↦ 𝜎1:λ )   recalled 𝑛·0·1 ⇒ Φ.down-  looped 𝜎3 := 𝑛·0·2.φ  # proven, repeats 𝑛·0·3-  morphed 𝑛·0·4 := 𝜎3:λ+  looped 𝜎3 ≔ 𝑛·0·2.φ  # proven, repeats 𝑛·0·3+  morphed 𝑛·0·4 ≔ 𝜎3:λ ```  In a name such as `𝑛·1·2`, the first number counts the firings, `0` outside@@ -350,17 +351,17 @@ * `𝔻(…):` and `𝕄(…):` open a block where dataization or morphing starts at a   new site, and what it does stands under it. * `𝔼(…):` opens one firing, named by its λ function.-* `𝑛·0·1 := …` names an application, and the line after it names the+* `𝑛·0·1 ≔ …` names an application, and the line after it names the   object the application made.-* `𝛿1·1 := …` binds a meta of the entry, and the comment names the judgment+* `𝛿1·1 ≔ …` binds a meta of the entry, and the comment names the judgment   and the term it came from.-* `𝑛·1·1 := …  # 𝑛` is the term the entry answered with, and the line+* `𝑛·1·1 ≔ …  # 𝑛` is the term the entry answered with, and the line   commented with `𝕄(𝑛·1·1)` is its normal form. * `boxed …` is dataization stepping into the `φ` of a formation. * `undressed …` is an `undress` line taking the `φ` of a formation.-* `shared 𝑛·1 := …` names an argument a recursion keeps wrapping, so later+* `shared 𝑛·1 ≔ …` names an argument a recursion keeps wrapping, so later   lines spell it by that name.-* `𝛿·1·1 := …` closes a `𝔻` block with the data it found, or with+* `𝛿·1·1 ≔ …` closes a `𝔻` block with the data it found, or with   `𝔻(𝜎1:λ)` where it came down to a symbol. * `morphed …` closes a `𝕄` block with the term it came to. * `evaluated …` closes an `𝔼` block with what the firing answered, and the@@ -375,6 +376,7 @@   the comment names the meta it read and the meta whose shape it took. * `unanswered …` is a λ name no entry answers, and `opaque …` a symbol   nothing can fire; the comment names the term 𝕄 or 𝔻 worked on.+  `opaque 𝜎2:λ ≔ 𝜎1:λ.foo` is the new symbol an attribute of a symbol gives. * `stuck …` closes a firing that got stuck, and `stall …` stands under one   that `--acyclic=plausible` answered with an earlier stall. * `remembered 𝑛·0·1 ≡ Φ.down` is a fact the run keeps: the term on the@@ -386,9 +388,9 @@   to symbols, with the symbols the comment lists renamed. * `recalled 𝑛·0·3 ⇒ 𝑛·0·1( x ↦ ⟦⟧ )` is a fact or a memo entry used again,   spelled as its `remembered` or `memoized` line spelled it.-* `looped …` is where `--acyclic` cut a loop, and `looped 𝜎1 := …` names+* `looped …` is where `--acyclic` cut a loop, and `looped 𝜎1 ≔ …` names   the call of the object it answered with that symbol, when a fact names it.-* `passed 𝑛·1·2 := …` is where an operand came to an object `--acyclic`+* `passed 𝑛·1·2 ≔ …` is where an operand came to an object `--acyclic`   takes for a loop, handed on as it is. * `starved …`, `spent …`, `timeout …`, `oversized …` and `blown …` are   where `--max-steps`, `--max-firings`, `--max-seconds`, `--max-nodes` and@@ -458,9 +460,11 @@ and print it in canonical syntax:  ```bash-$ echo '[[ @ -> Q.io.stdout("hello") ]]' | phino rewrite+$ echo '[[ @ -> Q.io.stdout(text -> "hello") ]]' | phino rewrite ⟦-  φ ↦ Φ.io.stdout( α0 ↦ Φ.string( φ ↦ Φ.bytes( φ ↦ ⟦ Δ ⤍ 68-65-6C-6C-6F ⟧ ) ) )+  φ ↦ Φ.io.stdout(+    text ↦ Φ.string( φ ↦ Φ.bytes( φ ↦ ⟦ Δ ⤍ 68-65-6C-6C-6F ⟧ ) )+  ) ⟧ ``` @@ -626,10 +630,7 @@  Number:                  # comparable number   = Integer              # just regular integer-  | IndexMeta'           # 𝑖 (or !i), the index captured by an α𝑖 argument   | length: BiMeta'      # calculate length of bindings by given meta binding-  | domain: BiMeta'      # calculate number of unique attributes in given-                         # meta binding (excluding 'assets')  Extension:               # substitutions extension used to introduce new meta variables   meta: [ExtArgument]    # new introduced meta variable@@ -654,7 +655,7 @@  * `contextualize` - function of two arguments, that rewrites given expression   depending on provided context according to the contextualization-  [rules](assets/contextualize.jpg)+  [rules](resources/contextualization) * `random-tau` - creates an attribute with a random unique name. It accepts no   arguments; uniqueness is guaranteed across all names already taken in the   document.@@ -662,7 +663,7 @@ * `concat` - accepts bytes or dataizable expressions as arguments,   concatenates them into single sequence and convert it to expression   that can be pretty printed as human readable string:-  `Φ.string(Φ.bytes⟦ Δ ⤍ !d ⟧)`.+  `Φ.string( φ ↦ Φ.bytes( φ ↦ ⟦ Δ ⤍ !d ⟧ ) )`. * `sed` - pattern replacer, works like unix `sed` function.   Accepts two arguments: target expression and pattern.   Pattern must start with `s/`, consists of three parts@@ -697,8 +698,6 @@ This is the list of supported meta variables:  * `!t` || `𝜏` - attribute-* `!i` || `𝑖` - the index of a positional (α) application argument,-                captured by writing `α𝑖` (or `~!i`) * `!e` || `𝑒` - any expression * `!n` || `𝑛` - any expression that is already in normal form (behaves like                 `!e`/`𝑒`, but only binds a sub-expression in NF, so no explicit@@ -725,8 +724,9 @@ own, binds no name, and is refused anywhere but in a pattern, so `⟦ 𝜏 ↦ 𝑒, 𝜏 ↦ 𝑒 ⟧` matches any two attributes. -A positional (α) application argument is written as `α0`, `~0` (ASCII), or-`α𝑖`/`~!i` when its index is captured by an `!i`/`𝑖` meta variable.+An application argument is always given by the name of the attribute it goes+to, as in `Φ.f( x ↦ ξ.y )`, and a positional one, such as `Φ.f( ξ.y )` or+`Φ.f( α0 ↦ ξ.y )`, is refused.  ## Benchmark 
benchmark/accum.yaml view
@@ -38,7 +38,7 @@     𝛿1: $.n   morph:     𝑛1: $.v.φ-  𝑛: Φ.l🌵.root( 𝑛1 )+  𝑛: Φ.l🌵.root( v ↦ 𝑛1 ) - λ: L_root   dataize:     𝛿1: $.v
benchmark/demo.phi view
@@ -6,21 +6,21 @@     plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧,     times(ρ, x) ↦ ⟦ λ ⤍ L_number_times ⟧,     gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧,-    neg(ρ) ↦ ⟦ φ ↦ ξ.ρ.times( -1 ) ⟧,-    minus(ρ, x) ↦ ⟦ φ ↦ ξ.ρ.plus( ξ.x.neg ) ⟧+    neg(ρ) ↦ ⟦ φ ↦ ξ.ρ.times( x ↦ -1 ) ⟧,+    minus(ρ, x) ↦ ⟦ φ ↦ ξ.ρ.plus( x ↦ ξ.x.neg ) ⟧   ⟧,   demo ↦ ⟦-    gap(a, b) ↦ ⟦ φ ↦ ξ.a.minus( ξ.b ).times( ξ.a.minus( ξ.b ) ) ⟧,-    far(p, q) ↦ ⟦ φ ↦ Φ.demo.gap( ξ.p, ξ.q ).gt( 100 ) ⟧,-    clamp(x, lo, hi) ↦ ⟦ φ ↦ ξ.x.gt( ξ.hi ).if( ξ.hi, ξ.lo.gt( ξ.x ).if( ξ.lo, ξ.x ) ) ⟧,-    twice(t) ↦ ⟦ φ ↦ ξ.t.gt( 0 ).if( ξ.t.plus( 1 ), ξ.t.plus( 2 ) ).plus( ξ.t.plus( 1 ) ) ⟧+    gap(a, b) ↦ ⟦ φ ↦ ξ.a.minus( x ↦ ξ.b ).times( x ↦ ξ.a.minus( x ↦ ξ.b ) ) ⟧,+    far(p, q) ↦ ⟦ φ ↦ Φ.demo.gap( a ↦ ξ.p, b ↦ ξ.q ).gt( x ↦ 100 ) ⟧,+    clamp(x, lo, hi) ↦ ⟦ φ ↦ ξ.x.gt( x ↦ ξ.hi ).if( left ↦ ξ.hi, right ↦ ξ.lo.gt( x ↦ ξ.x ).if( left ↦ ξ.lo, right ↦ ξ.x ) ) ⟧,+    twice(t) ↦ ⟦ φ ↦ ξ.t.gt( x ↦ 0 ).if( left ↦ ξ.t.plus( x ↦ 1 ), right ↦ ξ.t.plus( x ↦ 2 ) ).plus( x ↦ ξ.t.plus( x ↦ 1 ) ) ⟧   ⟧,   l🌵 ↦ ⟦     mark(n, v) ↦ ⟦ λ ⤍ L_entry ⟧,-    e1 ↦ Φ.l🌵.mark( 1, Φ.demo.gap( Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎1 ⟧ ) ), Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ) ) ) ),-    e2 ↦ Φ.l🌵.mark( 2, Φ.demo.far( Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ) ), Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎4 ⟧ ) ) ) ),-    e3 ↦ Φ.l🌵.mark( 3, Φ.demo.clamp( Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ) ), Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎6 ⟧ ) ), Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎7 ⟧ ) ) ) ),-    e4 ↦ Φ.l🌵.mark( 4, Φ.demo.twice( Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎8 ⟧ ) ) ) ),-    e5 ↦ Φ.l🌵.mark( 5, Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎9 ⟧ ) ).neg )+    e1 ↦ Φ.l🌵.mark( n ↦ 1, v ↦ Φ.demo.gap( a ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎1 ⟧ ) ), b ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ) ) ) ),+    e2 ↦ Φ.l🌵.mark( n ↦ 2, v ↦ Φ.demo.far( p ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ) ), q ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎4 ⟧ ) ) ) ),+    e3 ↦ Φ.l🌵.mark( n ↦ 3, v ↦ Φ.demo.clamp( x ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ) ), lo ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎6 ⟧ ) ), hi ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎7 ⟧ ) ) ) ),+    e4 ↦ Φ.l🌵.mark( n ↦ 4, v ↦ Φ.demo.twice( t ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎8 ⟧ ) ) ) ),+    e5 ↦ Φ.l🌵.mark( n ↦ 5, v ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎9 ⟧ ) ).neg )   ⟧ ⟧
compiled/generated/Compiled.hs view
@@ -33,16 +33,16 @@  -- The steps of the built-in rules of normalization, in the order of the rules. normalization :: [Ru.Step]-normalization = [stepAlpha, stepAmiss, stepCopy, stepDc, stepDca, stepDd, stepDl, stepDot, stepMiss, stepNorho, stepNull, stepOver, stepOvera, stepSkip, stepStay, stepStop]+normalization = [stepCopy, stepDc, stepDd, stepDl, stepDot, stepMiss, stepNorho, stepNull, stepOver, stepSkip, stepStay, stepStop]  -- The steps of every rule compiled, by the text of the rule. steps :: Map.Map String Ru.Step steps =-  Map.fromList [("Rule {name = \"alpha\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) (ArAlpha \945!i1 (ExMeta \"e1\")), result = ExApplication (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"e1\")), when = Just (And [Eq (CmpNum (MetaIndex \"i1\")) (CmpNum (Domain (BiMeta \"B1\"))),Not (Eq (CmpAttr !t1) (CmpAttr \961))]), where_ = Nothing, having = Nothing}", stepAlpha), ("Rule {name = \"amiss\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArAlpha \945!i1 (ExAny (Slot \"e\" 11))), result = ExTermination, when = Just (Not (Gt (CmpNum (Domain (BiMeta \"B1\"))) (CmpNum (MetaIndex \"i1\")))), where_ = Nothing, having = Nothing}", stepAmiss), ("Rule {name = \"copy\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"k1\")), result = ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"k1\"),BiMeta \"B2\"], when = Nothing, where_ = Nothing, having = Nothing}", stepCopy), ("Rule {name = \"dc\", label = Nothing, description = Nothing, pattern = ExApplication ExTermination (ArTau !t (ExAny (Slot \"e\" 6))), result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", stepDc), ("Rule {name = \"dca\", label = Nothing, description = Nothing, pattern = ExApplication ExTermination (ArAlpha \945!i (ExAny (Slot \"e\" 7))), result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", stepDca), ("Rule {name = \"dd\", label = Nothing, description = Nothing, pattern = ExDispatch ExTermination !t, result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", stepDd), ("Rule {name = \"dl\", label = Nothing, description = Nothing, pattern = ExFormation [BiMeta \"B1\",BiLambda (FnAny (Slot \"F\" 9)),BiMeta \"B2\"], result = ExTermination, when = Just (In [\916] [BiMeta \"B1\",BiMeta \"B2\"]), where_ = Nothing, having = Nothing}", stepDl), ("Rule {name = \"dot\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"n1\"),BiMeta \"B2\"]) !t1, result = ExApplication (ExMeta \"e1\") (ArTau \961 (ExMeta \"e2\")), when = Just (Not (In [\916,\955] [BiMeta \"B1\",BiMeta \"B2\"])), where_ = Just [Extra {meta = ArgExpression (ExMeta \"e1\"), function = \"contextualize\", args = [ArgExpression (ExMeta \"n1\"),ArgExpression (ExFormation [BiMeta \"B1\",BiMeta \"B2\"])]},Extra {meta = ArgExpression (ExMeta \"e2\"), function = \"named\", args = [ArgExpression (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"n1\"),BiMeta \"B2\"])]}], having = Nothing}", stepDot), ("Rule {name = \"miss\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArTau !t1 (ExAny (Slot \"e\" 10))), result = ExTermination, when = Just (And [Not (In [!t1] [BiMeta \"B1\"]),Not (Eq (CmpAttr !t1) (CmpAttr \961))]), where_ = Nothing, having = Nothing}", stepMiss), ("Rule {name = \"norho\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\"]) \961, result = ExTermination, when = Just (Not (In [\961] [BiMeta \"B1\"])), where_ = Nothing, having = Nothing}", stepNorho), ("Rule {name = \"null\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) !t1, result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", stepNull), ("Rule {name = \"over\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"e2\")), result = ExTermination, when = Just (Not (Eq (CmpAttr !t1) (CmpAttr \961))), where_ = Nothing, having = Nothing}", stepOver), ("Rule {name = \"overa\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArAlpha \945!i1 (ExMeta \"e2\")), result = ExTermination, when = Just (And [Eq (CmpNum (MetaIndex \"i1\")) (CmpNum (Domain (BiMeta \"B1\"))),Not (Eq (CmpAttr !t1) (CmpAttr \961))]), where_ = Nothing, having = Nothing}", stepOvera), ("Rule {name = \"skip\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArTau \961 (ExMeta \"e1\")), result = ExFormation [BiMeta \"B1\"], when = Just (Not (In [\961] [BiMeta \"B1\"])), where_ = Nothing, having = Nothing}", stepSkip), ("Rule {name = \"stay\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau \961 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArTau \961 (ExMeta \"e2\")), result = ExFormation [BiMeta \"B1\",BiTau \961 (ExMeta \"e1\"),BiMeta \"B2\"], when = Nothing, where_ = Nothing, having = Nothing}", stepStay), ("Rule {name = \"stop\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\"]) !t1, result = ExTermination, when = Just (Disjoint [!t1,\966,\955] [BiMeta \"B1\"]), where_ = Nothing, having = Nothing}", stepStop)]+  Map.fromList [("Rule {name = \"copy\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"k1\")), result = ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"k1\"),BiMeta \"B2\"], when = Nothing, where_ = Nothing, having = Nothing}", stepCopy), ("Rule {name = \"dc\", label = Nothing, description = Nothing, pattern = ExApplication ExTermination (ArTau !t (ExAny (Slot \"e\" 6))), result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", stepDc), ("Rule {name = \"dd\", label = Nothing, description = Nothing, pattern = ExDispatch ExTermination !t, result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", stepDd), ("Rule {name = \"dl\", label = Nothing, description = Nothing, pattern = ExFormation [BiMeta \"B1\",BiLambda (FnAny (Slot \"F\" 9)),BiMeta \"B2\"], result = ExTermination, when = Just (In [\916] [BiMeta \"B1\",BiMeta \"B2\"]), where_ = Nothing, having = Nothing}", stepDl), ("Rule {name = \"dot\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"n1\"),BiMeta \"B2\"]) !t1, result = ExApplication (ExMeta \"e1\") (ArTau \961 (ExMeta \"e2\")), when = Just (Not (In [\916,\955] [BiMeta \"B1\",BiMeta \"B2\"])), where_ = Just [Extra {meta = ArgExpression (ExMeta \"e1\"), function = \"contextualize\", args = [ArgExpression (ExMeta \"n1\"),ArgExpression (ExFormation [BiMeta \"B1\",BiMeta \"B2\"])]},Extra {meta = ArgExpression (ExMeta \"e2\"), function = \"named\", args = [ArgExpression (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"n1\"),BiMeta \"B2\"])]}], having = Nothing}", stepDot), ("Rule {name = \"miss\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArTau !t1 (ExAny (Slot \"e\" 10))), result = ExTermination, when = Just (And [Not (In [!t1] [BiMeta \"B1\"]),Not (Eq (CmpAttr !t1) (CmpAttr \961))]), where_ = Nothing, having = Nothing}", stepMiss), ("Rule {name = \"norho\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\"]) \961, result = ExTermination, when = Just (Not (In [\961] [BiMeta \"B1\"])), where_ = Nothing, having = Nothing}", stepNorho), ("Rule {name = \"null\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) !t1, result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", stepNull), ("Rule {name = \"over\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"e2\")), result = ExTermination, when = Just (Not (Eq (CmpAttr !t1) (CmpAttr \961))), where_ = Nothing, having = Nothing}", stepOver), ("Rule {name = \"skip\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArTau \961 (ExMeta \"e1\")), result = ExFormation [BiMeta \"B1\"], when = Just (Not (In [\961] [BiMeta \"B1\"])), where_ = Nothing, having = Nothing}", stepSkip), ("Rule {name = \"stay\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau \961 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArTau \961 (ExMeta \"e2\")), result = ExFormation [BiMeta \"B1\",BiTau \961 (ExMeta \"e1\"),BiMeta \"B2\"], when = Nothing, where_ = Nothing, having = Nothing}", stepStay), ("Rule {name = \"stop\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\"]) !t1, result = ExTermination, when = Just (Disjoint [!t1,\966,\955] [BiMeta \"B1\"]), where_ = Nothing, having = Nothing}", stepStop)]  -- The rules of 𝕄, in the order of their files. morphings :: [In.Inference Expression]-morphings = [In.direct morphingDead, In.direct morphingMa, In.direct morphingMaa, In.direct morphingMaad, In.direct morphingMad, In.direct morphingMd, In.direct morphingMf, In.direct morphingMg, In.direct morphingMl, In.direct morphingMphi, In.direct morphingUniverse, In.direct morphingXi]+morphings = [In.direct morphingDead, In.direct morphingMa, In.direct morphingMad, In.direct morphingMd, In.direct morphingMf, In.direct morphingMg, In.direct morphingMl, In.direct morphingMphi, In.direct morphingUniverse, In.direct morphingXi]  -- The rules of 𝔻, in the order of their files. dataizations :: [In.Inference Bytes]@@ -50,7 +50,7 @@  -- The texts of the built-in rules of all four judgments this module is made of. sources :: [String]-sources = ["Rule {name = \"alpha\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) (ArAlpha \945!i1 (ExMeta \"e1\")), result = ExApplication (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"e1\")), when = Just (And [Eq (CmpNum (MetaIndex \"i1\")) (CmpNum (Domain (BiMeta \"B1\"))),Not (Eq (CmpAttr !t1) (CmpAttr \961))]), where_ = Nothing, having = Nothing}", "Rule {name = \"amiss\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArAlpha \945!i1 (ExAny (Slot \"e\" 11))), result = ExTermination, when = Just (Not (Gt (CmpNum (Domain (BiMeta \"B1\"))) (CmpNum (MetaIndex \"i1\")))), where_ = Nothing, having = Nothing}", "Rule {name = \"copy\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"k1\")), result = ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"k1\"),BiMeta \"B2\"], when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"dc\", label = Nothing, description = Nothing, pattern = ExApplication ExTermination (ArTau !t (ExAny (Slot \"e\" 6))), result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"dca\", label = Nothing, description = Nothing, pattern = ExApplication ExTermination (ArAlpha \945!i (ExAny (Slot \"e\" 7))), result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"dd\", label = Nothing, description = Nothing, pattern = ExDispatch ExTermination !t, result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"dl\", label = Nothing, description = Nothing, pattern = ExFormation [BiMeta \"B1\",BiLambda (FnAny (Slot \"F\" 9)),BiMeta \"B2\"], result = ExTermination, when = Just (In [\916] [BiMeta \"B1\",BiMeta \"B2\"]), where_ = Nothing, having = Nothing}", "Rule {name = \"dot\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"n1\"),BiMeta \"B2\"]) !t1, result = ExApplication (ExMeta \"e1\") (ArTau \961 (ExMeta \"e2\")), when = Just (Not (In [\916,\955] [BiMeta \"B1\",BiMeta \"B2\"])), where_ = Just [Extra {meta = ArgExpression (ExMeta \"e1\"), function = \"contextualize\", args = [ArgExpression (ExMeta \"n1\"),ArgExpression (ExFormation [BiMeta \"B1\",BiMeta \"B2\"])]},Extra {meta = ArgExpression (ExMeta \"e2\"), function = \"named\", args = [ArgExpression (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"n1\"),BiMeta \"B2\"])]}], having = Nothing}", "Rule {name = \"miss\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArTau !t1 (ExAny (Slot \"e\" 10))), result = ExTermination, when = Just (And [Not (In [!t1] [BiMeta \"B1\"]),Not (Eq (CmpAttr !t1) (CmpAttr \961))]), where_ = Nothing, having = Nothing}", "Rule {name = \"norho\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\"]) \961, result = ExTermination, when = Just (Not (In [\961] [BiMeta \"B1\"])), where_ = Nothing, having = Nothing}", "Rule {name = \"null\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) !t1, result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"over\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"e2\")), result = ExTermination, when = Just (Not (Eq (CmpAttr !t1) (CmpAttr \961))), where_ = Nothing, having = Nothing}", "Rule {name = \"overa\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArAlpha \945!i1 (ExMeta \"e2\")), result = ExTermination, when = Just (And [Eq (CmpNum (MetaIndex \"i1\")) (CmpNum (Domain (BiMeta \"B1\"))),Not (Eq (CmpAttr !t1) (CmpAttr \961))]), where_ = Nothing, having = Nothing}", "Rule {name = \"skip\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArTau \961 (ExMeta \"e1\")), result = ExFormation [BiMeta \"B1\"], when = Just (Not (In [\961] [BiMeta \"B1\"])), where_ = Nothing, having = Nothing}", "Rule {name = \"stay\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau \961 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArTau \961 (ExMeta \"e2\")), result = ExFormation [BiMeta \"B1\",BiTau \961 (ExMeta \"e1\"),BiMeta \"B2\"], when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"stop\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\"]) !t1, result = ExTermination, when = Just (Disjoint [!t1,\966,\955] [BiMeta \"B1\"]), where_ = Nothing, having = Nothing}", "ContextualizeRule {name = \"ca\", label = Nothing, match = ExApplication (ExMeta \"n1\") (ArTau !t1 (ExMeta \"e1\")), cmatch = ExMeta \"k1\", cresult = ExApplication (ExMeta \"n2\") (ArTau !t1 (ExMeta \"n3\")), premises = [Premise {result = \"n2\", operation = OpContextualize (ExMeta \"n1\") (ExMeta \"k1\")},Premise {result = \"n3\", operation = OpContextualize (ExMeta \"e1\") (ExMeta \"k1\")}]}", "ContextualizeRule {name = \"caa\", label = Nothing, match = ExApplication (ExMeta \"n1\") (ArAlpha \945!i1 (ExMeta \"e1\")), cmatch = ExMeta \"k1\", cresult = ExApplication (ExMeta \"n2\") (ArAlpha \945!i1 (ExMeta \"n3\")), premises = [Premise {result = \"n2\", operation = OpContextualize (ExMeta \"n1\") (ExMeta \"k1\")},Premise {result = \"n3\", operation = OpContextualize (ExMeta \"e1\") (ExMeta \"k1\")}]}", "ContextualizeRule {name = \"cd\", label = Nothing, match = ExDispatch (ExMeta \"n1\") !t1, cmatch = ExMeta \"k1\", cresult = ExDispatch (ExMeta \"n2\") !t1, premises = [Premise {result = \"n2\", operation = OpContextualize (ExMeta \"n1\") (ExMeta \"k1\")}]}", "ContextualizeRule {name = \"cf\", label = Nothing, match = ExFormation [BiMeta \"B1\"], cmatch = ExMeta \"k1\", cresult = ExFormation [BiMeta \"B1\"], premises = []}", "ContextualizeRule {name = \"cg\", label = Nothing, match = ExRoot, cmatch = ExMeta \"k1\", cresult = ExRoot, premises = []}", "ContextualizeRule {name = \"ct\", label = Nothing, match = ExTermination, cmatch = ExMeta \"k1\", cresult = ExTermination, premises = []}", "ContextualizeRule {name = \"cxi\", label = Nothing, match = ExXi, cmatch = ExMeta \"k1\", cresult = ExMeta \"k1\", premises = []}", "MorphRule {name = \"dead\", label = Nothing, match = ExTermination, ematch = ExMeta \"e1\", nresult = ExTermination, when = Nothing, premises = []}", "MorphRule {name = \"ma\", label = Nothing, match = ExApplication (ExMeta \"n1\") (ArTau !t1 (ExMeta \"k1\")), ematch = ExMeta \"e1\", nresult = ExMeta \"n4\", when = Nothing, premises = [Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")},Premise {result = \"n3\", operation = OpNormalize (ExApplication (ExMeta \"n2\") (ArTau !t1 (ExMeta \"k1\")))},Premise {result = \"n4\", operation = OpMorph (ExMeta \"n3\") (ExMeta \"e1\")}]}", "MorphRule {name = \"maa\", label = Nothing, match = ExApplication (ExMeta \"n1\") (ArAlpha \945!i1 (ExMeta \"k1\")), ematch = ExMeta \"e1\", nresult = ExMeta \"n4\", when = Nothing, premises = [Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")},Premise {result = \"n3\", operation = OpNormalize (ExApplication (ExMeta \"n2\") (ArAlpha \945!i1 (ExMeta \"k1\")))},Premise {result = \"n4\", operation = OpMorph (ExMeta \"n3\") (ExMeta \"e1\")}]}", "MorphRule {name = \"maad\", label = Nothing, match = ExApplication (ExAny (Slot \"n\" 0)) (ArAlpha \945!i (ExMeta \"n1\")), ematch = ExMeta \"e1\", nresult = ExMeta \"n2\", when = Just (Not (Absolute (ExMeta \"n1\"))), premises = [Premise {result = \"n2\", operation = OpMorph ExTermination (ExMeta \"e1\")}]}", "MorphRule {name = \"mad\", label = Nothing, match = ExApplication (ExAny (Slot \"n\" 0)) (ArTau !t (ExMeta \"n1\")), ematch = ExMeta \"e1\", nresult = ExMeta \"n2\", when = Just (Not (Absolute (ExMeta \"n1\"))), premises = [Premise {result = \"n2\", operation = OpMorph ExTermination (ExMeta \"e1\")}]}", "MorphRule {name = \"md\", label = Nothing, match = ExDispatch (ExMeta \"n1\") !t1, ematch = ExMeta \"e1\", nresult = ExMeta \"n4\", when = Just (Not (IsFormation (ExMeta \"n1\"))), premises = [Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")},Premise {result = \"n3\", operation = OpNormalize (ExDispatch (ExMeta \"n2\") !t1)},Premise {result = \"n4\", operation = OpMorph (ExMeta \"n3\") (ExMeta \"e1\")}]}", "MorphRule {name = \"mf\", label = Nothing, match = ExFormation [BiMeta \"B1\"], ematch = ExMeta \"e1\", nresult = ExFormation [BiMeta \"B1\"], when = Nothing, premises = []}", "MorphRule {name = \"mg\", label = Nothing, match = ExRoot, ematch = ExRoot, nresult = ExMeta \"n1\", when = Nothing, premises = [Premise {result = \"n1\", operation = OpMorph ExTermination ExRoot}]}", "MorphRule {name = \"ml\", label = Just \"\\\\uplambda\", match = ExDispatch (ExFormation [BiMeta \"B1\"]) !t1, ematch = ExMeta \"e1\", nresult = ExMeta \"n3\", when = Just (In [\955] [BiMeta \"B1\"]), premises = [Premise {result = \"n1\", operation = OpEvaluate (ExFormation [BiMeta \"B1\"]) (ExMeta \"e1\")},Premise {result = \"n2\", operation = OpNormalize (ExDispatch (ExMeta \"n1\") !t1)},Premise {result = \"n3\", operation = OpMorph (ExMeta \"n2\") (ExMeta \"e1\")}]}", "MorphRule {name = \"mphi\", label = Just \"\\\\upvarphi\", match = ExDispatch (ExFormation [BiMeta \"B1\"]) !t1, ematch = ExMeta \"e1\", nresult = ExMeta \"n2\", when = Just (And [In [\966] [BiMeta \"B1\"],Disjoint [!t1,\955] [BiMeta \"B1\"]]), premises = [Premise {result = \"n1\", operation = OpNormalize (ExDispatch (ExDispatch (ExFormation [BiMeta \"B1\"]) \966) !t1)},Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")}]}", "MorphRule {name = \"universe\", label = Just \"\\\\Phi\", match = ExRoot, ematch = ExMeta \"e1\", nresult = ExMeta \"n2\", when = Just (Not (Eq (CmpExpr (ExMeta \"e1\")) (CmpExpr ExRoot))), premises = [Premise {result = \"n1\", operation = OpNormalize (ExMeta \"e1\")},Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")}]}", "MorphRule {name = \"xi\", label = Just \"\\\\upxi\", match = ExXi, ematch = ExMeta \"e1\", nresult = ExMeta \"n1\", when = Nothing, premises = [Premise {result = \"n1\", operation = OpMorph ExTermination (ExMeta \"e1\")}]}", "DataizeRule {name = \"box\", label = Nothing, match = ExFormation [BiMeta \"B1\"], ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (And [In [\966] [BiMeta \"B1\"],Disjoint [\916,\955] [BiMeta \"B1\"]]), premises = [Premise {result = \"n1\", operation = OpNormalize (ExDispatch (ExFormation [BiMeta \"B1\"]) \966)},Premise {result = \"d1\", operation = OpDataize (ExMeta \"n1\") (ExMeta \"e1\")}]}", "DataizeRule {name = \"delta\", label = Just \"\\\\Delta\", match = ExFormation [BiMeta \"B1\",BiDelta (BtMeta \"d1\"),BiMeta \"B2\"], ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (Disjoint [\955] [BiMeta \"B1\",BiMeta \"B2\"]), premises = []}", "DataizeRule {name = \"fire\", label = Nothing, match = ExFormation [BiMeta \"B1\"], ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (And [In [\955] [BiMeta \"B1\"],Disjoint [\916] [BiMeta \"B1\"]]), premises = [Premise {result = \"n1\", operation = OpEvaluate (ExFormation [BiMeta \"B1\"]) (ExMeta \"e1\")},Premise {result = \"d1\", operation = OpDataize (ExMeta \"n1\") (ExMeta \"e1\")}]}", "DataizeRule {name = \"none\", label = Nothing, match = ExFormation [BiMeta \"B1\"], ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (Disjoint [\916,\955,\966] [BiMeta \"B1\"]), premises = [Premise {result = \"d1\", operation = OpDataize ExTermination (ExMeta \"e1\")}]}", "DataizeRule {name = \"norm\", label = Nothing, match = ExMeta \"n1\", ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (And [Not (IsFormation (ExMeta \"n1\")),Not (Eq (CmpExpr (ExMeta \"n1\")) (CmpExpr ExTermination))]), premises = [Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")},Premise {result = \"d1\", operation = OpDataize (ExMeta \"n2\") (ExMeta \"e1\")}]}"]+sources = ["Rule {name = \"copy\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"k1\")), result = ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"k1\"),BiMeta \"B2\"], when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"dc\", label = Nothing, description = Nothing, pattern = ExApplication ExTermination (ArTau !t (ExAny (Slot \"e\" 6))), result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"dd\", label = Nothing, description = Nothing, pattern = ExDispatch ExTermination !t, result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"dl\", label = Nothing, description = Nothing, pattern = ExFormation [BiMeta \"B1\",BiLambda (FnAny (Slot \"F\" 9)),BiMeta \"B2\"], result = ExTermination, when = Just (In [\916] [BiMeta \"B1\",BiMeta \"B2\"]), where_ = Nothing, having = Nothing}", "Rule {name = \"dot\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"n1\"),BiMeta \"B2\"]) !t1, result = ExApplication (ExMeta \"e1\") (ArTau \961 (ExMeta \"e2\")), when = Just (Not (In [\916,\955] [BiMeta \"B1\",BiMeta \"B2\"])), where_ = Just [Extra {meta = ArgExpression (ExMeta \"e1\"), function = \"contextualize\", args = [ArgExpression (ExMeta \"n1\"),ArgExpression (ExFormation [BiMeta \"B1\",BiMeta \"B2\"])]},Extra {meta = ArgExpression (ExMeta \"e2\"), function = \"named\", args = [ArgExpression (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"n1\"),BiMeta \"B2\"])]}], having = Nothing}", "Rule {name = \"miss\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArTau !t1 (ExAny (Slot \"e\" 10))), result = ExTermination, when = Just (And [Not (In [!t1] [BiMeta \"B1\"]),Not (Eq (CmpAttr !t1) (CmpAttr \961))]), where_ = Nothing, having = Nothing}", "Rule {name = \"norho\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\"]) \961, result = ExTermination, when = Just (Not (In [\961] [BiMeta \"B1\"])), where_ = Nothing, having = Nothing}", "Rule {name = \"null\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\",BiVoid !t1,BiMeta \"B2\"]) !t1, result = ExTermination, when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"over\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau !t1 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArTau !t1 (ExMeta \"e2\")), result = ExTermination, when = Just (Not (Eq (CmpAttr !t1) (CmpAttr \961))), where_ = Nothing, having = Nothing}", "Rule {name = \"skip\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\"]) (ArTau \961 (ExMeta \"e1\")), result = ExFormation [BiMeta \"B1\"], when = Just (Not (In [\961] [BiMeta \"B1\"])), where_ = Nothing, having = Nothing}", "Rule {name = \"stay\", label = Nothing, description = Nothing, pattern = ExApplication (ExFormation [BiMeta \"B1\",BiTau \961 (ExMeta \"e1\"),BiMeta \"B2\"]) (ArTau \961 (ExMeta \"e2\")), result = ExFormation [BiMeta \"B1\",BiTau \961 (ExMeta \"e1\"),BiMeta \"B2\"], when = Nothing, where_ = Nothing, having = Nothing}", "Rule {name = \"stop\", label = Nothing, description = Nothing, pattern = ExDispatch (ExFormation [BiMeta \"B1\"]) !t1, result = ExTermination, when = Just (Disjoint [!t1,\966,\955] [BiMeta \"B1\"]), where_ = Nothing, having = Nothing}", "ContextualizeRule {name = \"ca\", label = Nothing, match = ExApplication (ExMeta \"n1\") (ArTau !t1 (ExMeta \"e1\")), cmatch = ExMeta \"k1\", cresult = ExApplication (ExMeta \"n2\") (ArTau !t1 (ExMeta \"n3\")), premises = [Premise {result = \"n2\", operation = OpContextualize (ExMeta \"n1\") (ExMeta \"k1\")},Premise {result = \"n3\", operation = OpContextualize (ExMeta \"e1\") (ExMeta \"k1\")}]}", "ContextualizeRule {name = \"cd\", label = Nothing, match = ExDispatch (ExMeta \"n1\") !t1, cmatch = ExMeta \"k1\", cresult = ExDispatch (ExMeta \"n2\") !t1, premises = [Premise {result = \"n2\", operation = OpContextualize (ExMeta \"n1\") (ExMeta \"k1\")}]}", "ContextualizeRule {name = \"cf\", label = Nothing, match = ExFormation [BiMeta \"B1\"], cmatch = ExMeta \"k1\", cresult = ExFormation [BiMeta \"B1\"], premises = []}", "ContextualizeRule {name = \"cg\", label = Nothing, match = ExRoot, cmatch = ExMeta \"k1\", cresult = ExRoot, premises = []}", "ContextualizeRule {name = \"ct\", label = Nothing, match = ExTermination, cmatch = ExMeta \"k1\", cresult = ExTermination, premises = []}", "ContextualizeRule {name = \"cxi\", label = Nothing, match = ExXi, cmatch = ExMeta \"k1\", cresult = ExMeta \"k1\", premises = []}", "MorphRule {name = \"dead\", label = Nothing, match = ExTermination, ematch = ExMeta \"e1\", nresult = ExTermination, when = Nothing, premises = []}", "MorphRule {name = \"ma\", label = Nothing, match = ExApplication (ExMeta \"n1\") (ArTau !t1 (ExMeta \"k1\")), ematch = ExMeta \"e1\", nresult = ExMeta \"n4\", when = Nothing, premises = [Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")},Premise {result = \"n3\", operation = OpNormalize (ExApplication (ExMeta \"n2\") (ArTau !t1 (ExMeta \"k1\")))},Premise {result = \"n4\", operation = OpMorph (ExMeta \"n3\") (ExMeta \"e1\")}]}", "MorphRule {name = \"mad\", label = Nothing, match = ExApplication (ExAny (Slot \"n\" 0)) (ArTau !t (ExMeta \"n1\")), ematch = ExMeta \"e1\", nresult = ExMeta \"n2\", when = Just (Not (Absolute (ExMeta \"n1\"))), premises = [Premise {result = \"n2\", operation = OpMorph ExTermination (ExMeta \"e1\")}]}", "MorphRule {name = \"md\", label = Nothing, match = ExDispatch (ExMeta \"n1\") !t1, ematch = ExMeta \"e1\", nresult = ExMeta \"n4\", when = Just (Not (IsFormation (ExMeta \"n1\"))), premises = [Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")},Premise {result = \"n3\", operation = OpNormalize (ExDispatch (ExMeta \"n2\") !t1)},Premise {result = \"n4\", operation = OpMorph (ExMeta \"n3\") (ExMeta \"e1\")}]}", "MorphRule {name = \"mf\", label = Nothing, match = ExFormation [BiMeta \"B1\"], ematch = ExMeta \"e1\", nresult = ExFormation [BiMeta \"B1\"], when = Nothing, premises = []}", "MorphRule {name = \"mg\", label = Nothing, match = ExRoot, ematch = ExRoot, nresult = ExMeta \"n1\", when = Nothing, premises = [Premise {result = \"n1\", operation = OpMorph ExTermination ExRoot}]}", "MorphRule {name = \"ml\", label = Just \"\\\\uplambda\", match = ExDispatch (ExFormation [BiMeta \"B1\"]) !t1, ematch = ExMeta \"e1\", nresult = ExMeta \"n3\", when = Just (In [\955] [BiMeta \"B1\"]), premises = [Premise {result = \"n1\", operation = OpEvaluate (ExFormation [BiMeta \"B1\"]) (ExMeta \"e1\")},Premise {result = \"n2\", operation = OpNormalize (ExDispatch (ExMeta \"n1\") !t1)},Premise {result = \"n3\", operation = OpMorph (ExMeta \"n2\") (ExMeta \"e1\")}]}", "MorphRule {name = \"mphi\", label = Just \"\\\\upvarphi\", match = ExDispatch (ExFormation [BiMeta \"B1\"]) !t1, ematch = ExMeta \"e1\", nresult = ExMeta \"n2\", when = Just (And [In [\966] [BiMeta \"B1\"],Disjoint [!t1,\955] [BiMeta \"B1\"]]), premises = [Premise {result = \"n1\", operation = OpNormalize (ExDispatch (ExDispatch (ExFormation [BiMeta \"B1\"]) \966) !t1)},Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")}]}", "MorphRule {name = \"universe\", label = Just \"\\\\Phi\", match = ExRoot, ematch = ExMeta \"e1\", nresult = ExMeta \"n2\", when = Just (Not (Eq (CmpExpr (ExMeta \"e1\")) (CmpExpr ExRoot))), premises = [Premise {result = \"n1\", operation = OpNormalize (ExMeta \"e1\")},Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")}]}", "MorphRule {name = \"xi\", label = Just \"\\\\upxi\", match = ExXi, ematch = ExMeta \"e1\", nresult = ExMeta \"n1\", when = Nothing, premises = [Premise {result = \"n1\", operation = OpMorph ExTermination (ExMeta \"e1\")}]}", "DataizeRule {name = \"box\", label = Nothing, match = ExFormation [BiMeta \"B1\"], ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (And [In [\966] [BiMeta \"B1\"],Disjoint [\916,\955] [BiMeta \"B1\"]]), premises = [Premise {result = \"n1\", operation = OpNormalize (ExDispatch (ExFormation [BiMeta \"B1\"]) \966)},Premise {result = \"d1\", operation = OpDataize (ExMeta \"n1\") (ExMeta \"e1\")}]}", "DataizeRule {name = \"delta\", label = Just \"\\\\Delta\", match = ExFormation [BiMeta \"B1\",BiDelta (BtMeta \"d1\"),BiMeta \"B2\"], ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (Disjoint [\955] [BiMeta \"B1\",BiMeta \"B2\"]), premises = []}", "DataizeRule {name = \"fire\", label = Nothing, match = ExFormation [BiMeta \"B1\"], ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (And [In [\955] [BiMeta \"B1\"],Disjoint [\916] [BiMeta \"B1\"]]), premises = [Premise {result = \"n1\", operation = OpEvaluate (ExFormation [BiMeta \"B1\"]) (ExMeta \"e1\")},Premise {result = \"d1\", operation = OpDataize (ExMeta \"n1\") (ExMeta \"e1\")}]}", "DataizeRule {name = \"none\", label = Nothing, match = ExFormation [BiMeta \"B1\"], ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (Disjoint [\916,\955,\966] [BiMeta \"B1\"]), premises = [Premise {result = \"d1\", operation = OpDataize ExTermination (ExMeta \"e1\")}]}", "DataizeRule {name = \"norm\", label = Nothing, match = ExMeta \"n1\", ematch = ExMeta \"e1\", dresult = BtMeta \"d1\", when = Just (And [Not (IsFormation (ExMeta \"n1\")),Not (Eq (CmpExpr (ExMeta \"n1\")) (CmpExpr ExTermination))]), premises = [Premise {result = \"n2\", operation = OpMorph (ExMeta \"n1\") (ExMeta \"e1\")},Premise {result = \"d1\", operation = OpDataize (ExMeta \"n2\") (ExMeta \"e1\")}]}"]  -- Whether the term is a normal form: no built-in rule of normalization -- matches anywhere inside it.@@ -71,22 +71,18 @@ matchingBy :: (Expression -> Bool) -> Maybe Expression -> Expression -> [Int] matchingBy normal =   M.hits-    [ (0, True, rewriteAlpha normal)-    , (1, True, rewriteAmiss normal)-    , (2, True, rewriteCopy normal)-    , (3, True, rewriteDc normal)-    , (4, True, rewriteDca normal)-    , (5, True, rewriteDd normal)-    , (6, True, rewriteDl normal)-    , (7, True, rewriteDot normal)-    , (8, True, rewriteMiss normal)-    , (9, True, rewriteNorho normal)-    , (10, True, rewriteNull normal)-    , (11, True, rewriteOver normal)-    , (12, True, rewriteOvera normal)-    , (13, True, rewriteSkip normal)-    , (14, True, rewriteStay normal)-    , (15, True, rewriteStop normal)+    [ (0, True, rewriteCopy normal)+    , (1, True, rewriteDc normal)+    , (2, True, rewriteDd normal)+    , (3, True, rewriteDl normal)+    , (4, True, rewriteDot normal)+    , (5, True, rewriteMiss normal)+    , (6, True, rewriteNorho normal)+    , (7, True, rewriteNull normal)+    , (8, True, rewriteOver normal)+    , (9, True, rewriteSkip normal)+    , (10, True, rewriteStay normal)+    , (11, True, rewriteStop normal)     ]  -- The Contextualization function 𝒞, the conclusion of the one rule matching@@ -97,7 +93,6 @@     term     ( concat         [ contextualizeCa term context-        , contextualizeCaa term context         , contextualizeCd term context         , contextualizeCf term context         , contextualizeCg term context@@ -106,35 +101,6 @@         ]     ) --- The rule 'alpha'.-stepAlpha :: Ru.Step-stepAlpha = R.direct "alpha" True (rewriteAlpha nf)--rewriteAlpha :: (Expression -> Bool) -> Maybe Expression -> Expression -> [Expression]-rewriteAlpha _ _ term =-  [ ExApplication (B.formed (concat [x5, [BiVoid x9], x8])) (ArTau x9 x3)-  | ExApplication x1 (ArAlpha x2 x3) <- [term]-  , ExFormation x4 <- [x1]-  , (x5, x6) <- M.splits x4-  , (x7 : x8) <- [x6]-  , BiVoid x9 <- [x7]-  , Alpha x10 <- [x2]-  , (x10 == (Ru.domainOf x5) && not (x9 == AtRho))-  ]---- The rule 'amiss'.-stepAmiss :: Ru.Step-stepAmiss = R.direct "amiss" True (rewriteAmiss nf)--rewriteAmiss :: (Expression -> Bool) -> Maybe Expression -> Expression -> [Expression]-rewriteAmiss _ _ term =-  [ ExTermination-  | ExApplication x1 (ArAlpha x2 _) <- [term]-  , ExFormation x4 <- [x1]-  , Alpha x5 <- [x2]-  , not ((Ru.domainOf x4) > x5)-  ]- -- The rule 'copy'. stepCopy :: Ru.Step stepCopy = R.direct "copy" True (rewriteCopy nf)@@ -163,18 +129,6 @@   , ExTermination <- [x1]   ] --- The rule 'dca'.-stepDca :: Ru.Step-stepDca = R.direct "dca" True (rewriteDca nf)--rewriteDca :: (Expression -> Bool) -> Maybe Expression -> Expression -> [Expression]-rewriteDca _ _ term =-  [ ExTermination-  | ExApplication x1 (ArAlpha x2 _) <- [term]-  , ExTermination <- [x1]-  , Alpha _ <- [x2]-  ]- -- The rule 'dd'. stepDd :: Ru.Step stepDd = R.direct "dd" True (rewriteDd nf)@@ -276,22 +230,6 @@   , not (x2 == AtRho)   ] --- The rule 'overa'.-stepOvera :: Ru.Step-stepOvera = R.direct "overa" True (rewriteOvera nf)--rewriteOvera :: (Expression -> Bool) -> Maybe Expression -> Expression -> [Expression]-rewriteOvera _ _ term =-  [ ExTermination-  | ExApplication x1 (ArAlpha x2 _) <- [term]-  , ExFormation x4 <- [x1]-  , (x5, x6) <- M.splits x4-  , (x7 : _) <- [x6]-  , BiTau x9 _ <- [x7]-  , Alpha x11 <- [x2]-  , (x11 == (Ru.domainOf x5) && not (x9 == AtRho))-  ]- -- The rule 'skip'. stepSkip :: Ru.Step stepSkip = R.direct "skip" True (rewriteSkip nf)@@ -340,14 +278,6 @@   | ExApplication x1 (ArTau x2 x3) <- [term]   ] --- The contextualization rule 'caa'.-contextualizeCaa :: Expression -> Expression -> [(String, Either C.ContextualizeException Expression)]-contextualizeCaa term context =-  [ ("caa", do { n2 <- contextualize x1 context; n3 <- contextualize x3 context; pure (ExApplication n2 (ArAlpha (Alpha x4) n3)) })-  | ExApplication x1 (ArAlpha x2 x3) <- [term]-  , Alpha x4 <- [x2]-  ]- -- The contextualization rule 'cd'. contextualizeCd :: Expression -> Expression -> [(String, Either C.ContextualizeException Expression)] contextualizeCd term context =@@ -396,28 +326,6 @@   [ In.Morphs x1 universe (\n2 -> pure (In.Concludes (In.Onward (In.Normalized (D.Morphing, "ma")) (ExApplication n2 (ArTau x2 x3)) universe)))   | ExApplication x1 (ArTau x2 x3) <- [term]   , Ru.xiFree x3-  , Ru.normalHeld nf x1-  , Ru.normalHeld nf x3-  ]---- The morphing rule 'maa'.-morphingMaa :: Expression -> Expression -> [In.Premises Expression]-morphingMaa term universe =-  [ In.Morphs x1 universe (\n2 -> pure (In.Concludes (In.Onward (In.Normalized (D.Morphing, "maa")) (ExApplication n2 (ArAlpha (Alpha x4) x3)) universe)))-  | ExApplication x1 (ArAlpha x2 x3) <- [term]-  , Alpha x4 <- [x2]-  , Ru.xiFree x3-  , Ru.normalHeld nf x1-  , Ru.normalHeld nf x3-  ]---- The morphing rule 'maad'.-morphingMaad :: Expression -> Expression -> [In.Premises Expression]-morphingMaad term universe =-  [ In.Concludes (In.Onward (In.Taken (D.Morphing, "maad")) ExTermination universe)-  | ExApplication x1 (ArAlpha x2 x3) <- [term]-  , Alpha _ <- [x2]-  , not (Ru.xiFree x3)   , Ru.normalHeld nf x1   , Ru.normalHeld nf x3   ]
phino.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: phino-version: 0.0.168+version: 0.0.169 license: MIT synopsis: Command-Line Manipulator of 𝜑-Calculus Expressions description: Please see the README on GitHub at <https://github.com/objectionary/phino#readme>
− resources/contextualization/caa.yaml
@@ -1,16 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----name: caa-match: '𝑛1(α𝑖1 ↦ 𝑒1)'-c-match: 𝑘1-c-result: '𝑛2(α𝑖1 ↦ 𝑛3)'-premises:-  - n-result: 𝑛2-    contextualize:-      - 𝑛1-      - 𝑘1-  - n-result: 𝑛3-    contextualize:-      - 𝑒1-      - 𝑘1
− resources/morphing/maa.yaml
@@ -1,18 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----name: maa-match: '𝑛1(α𝑖1 ↦ 𝑘1)'-universe: 𝑒1-conclusion: 𝑛4-premises:-  - n-result: 𝑛2-    morph:-      - 𝑛1-      - 𝑒1-  - n-result: 𝑛3-    normalize: '𝑛2(α𝑖1 ↦ 𝑘1)'-  - n-result: 𝑛4-    morph:-      - 𝑛3-      - 𝑒1
− resources/morphing/maad.yaml
@@ -1,15 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----name: maad-match: '𝑛(α𝑖 ↦ 𝑛1)'-universe: 𝑒1-conclusion: 𝑛2-when:-  not:-    absolute: 𝑛1-premises:-  - n-result: 𝑛2-    morph:-      - ⊥-      - 𝑒1
− resources/normalize/alpha.yaml
@@ -1,15 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----name: alpha-pattern: ⟦𝐵1, 𝜏1 ↦ ∅, 𝐵2⟧(α𝑖1 ↦ 𝑒1)-result: ⟦𝐵1, 𝜏1 ↦ ∅, 𝐵2⟧(𝜏1 ↦ 𝑒1)-when:-  and:-    - eq:-        - 𝑖1-        - domain: 𝐵1-    - not:-        eq:-          - 𝜏1-          - ρ
− resources/normalize/amiss.yaml
@@ -1,11 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----name: amiss-pattern: ⟦𝐵1⟧(α𝑖1 ↦ 𝑒)-result: ⊥-when:-  not:-    gt:-      - domain: 𝐵1-      - 𝑖1
− resources/normalize/dca.yaml
@@ -1,6 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----name: dca-pattern: ⊥(α𝑖 ↦ 𝑒)-result: ⊥
− resources/normalize/overa.yaml
@@ -1,15 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----name: overa-pattern: ⟦𝐵1, 𝜏1 ↦ 𝑒1, 𝐵2⟧(α𝑖1 ↦ 𝑒2)-result: ⊥-when:-  and:-    - eq:-        - 𝑖1-        - domain: 𝐵1-    - not:-        eq:-          - 𝜏1-          - ρ
src/AST.hs view
@@ -12,7 +12,6 @@   ( Slot (..)   , Expression (ExFormation, ExXi, ExRoot, ExTermination, ExApplication, ExDispatch, ExMeta, ExAny, ExPhiMeet, ExPhiAgain, ExBytes, BaseObject, DataString, DataNumber, DataObject)   , Argument (..)-  , Alpha (..)   , Binding (..)   , Bytes (..)   , Attribute (..)@@ -188,15 +187,8 @@  data Argument   = ArTau Attribute Expression-  | ArAlpha Alpha Expression   deriving (Eq, Ord, Show, Generic) -data Alpha-  = Alpha Int-  | AlMeta Text-  | AlAny Slot-  deriving (Eq, Ord, Generic)- data Binding   = BiTau Attribute Expression   | BiVoid Attribute@@ -241,11 +233,6 @@   show (AtMeta meta) = '!' : T.unpack meta   show (AtAny (Slot kind _)) = '!' : T.unpack kind -instance Show Alpha where-  show (Alpha idx) = 'α' : show idx-  show (AlMeta meta) = 'α' : '!' : T.unpack meta-  show (AlAny (Slot kind _)) = 'α' : '!' : T.unpack kind- hashExpression :: Expression -> Int hashExpression term = case known term of   Facts digest _ _ _ _ -> digest@@ -262,7 +249,6 @@   hashShape . \case     ExFormation bds -> ExFormation (map bare bds)     ExApplication _ (ArTau attr _) -> ExApplication ExXi (ArTau attr ExXi)-    ExApplication _ (ArAlpha alpha _) -> ExApplication ExXi (ArAlpha alpha ExXi)     ExDispatch _ attr -> ExDispatch ExXi attr     ExPhiMeet prefix idx _ -> ExPhiMeet prefix idx ExXi     ExPhiAgain prefix idx _ -> ExPhiAgain prefix idx ExXi@@ -331,12 +317,6 @@     goArgument :: Int -> Argument -> Int     goArgument h = \case       ArTau at ex -> step (goAttribute (step h 22) at) (child ex)-      ArAlpha al ex -> step (goAlpha (step h 30) al) (child ex)-    goAlpha :: Int -> Alpha -> Int-    goAlpha h = \case-      Alpha idx -> step (step h 31) idx-      AlMeta t -> hashText (step h 28) t-      AlAny slot -> goSlot (step h 36) slot     goFunction :: Int -> Function -> Int     goFunction h = \case       Function t -> hashText (step h 16) t@@ -383,7 +363,6 @@     go :: Expression -> Int     go (ExMeta name) = fromMaybe (maybe 0 go (look name)) (depth name)     go (ExApplication callee (ArTau _ arg)) = deepest [callee, arg]-    go (ExApplication callee (ArAlpha _ arg)) = deepest [callee, arg]     go (ExDispatch inner _) = deepest [inner]     go (ExFormation bds) = deepest [body | BiTau _ body <- bds]     go _ = 0@@ -397,7 +376,6 @@     go limit _ | limit <= 0 = True     go limit (ExMeta name) = maybe (maybe False (go limit) (look name)) (>= limit) (depth name)     go limit (ExApplication callee (ArTau _ arg)) = limit <= 1 || go (pred limit) callee || go (pred limit) arg-    go limit (ExApplication callee (ArAlpha _ arg)) = limit <= 1 || go (pred limit) callee || go (pred limit) arg     go limit (ExDispatch inner _) = limit <= 1 || go (pred limit) inner     go limit (ExFormation bds) = limit <= 1 || any (go (pred limit)) [body | BiTau _ body <- bds]     go _ _ = False@@ -465,8 +443,6 @@     goArgument :: Pairing -> Argument -> Argument -> state -> (Maybe Pairing, state)     goArgument pairing (ArTau attr left) (ArTau attr' right) kept       | attr == attr' = goExpr pairing left right kept-    goArgument pairing (ArAlpha alpha left) (ArAlpha alpha' right) kept-      | alpha == alpha' = goExpr pairing left right kept     goArgument pairing left right kept = (same pairing left right, kept)     goList :: (Pairing -> item -> item -> state -> (Maybe Pairing, state)) -> Pairing -> [item] -> [item] -> state -> (Maybe Pairing, state)     goList _ pairing [] [] kept = (Just pairing, kept)@@ -525,7 +501,6 @@     plain (ExFormation bds) = all plainBinding bds     plain (ExApplication expr (ArTau AtRho _)) = plain expr     plain (ExApplication expr (ArTau _ arg)) = plain expr && plain arg-    plain (ExApplication expr (ArAlpha _ arg)) = plain expr && plain arg     plain (ExDispatch expr _) = plain expr     plain (ExPhiMeet _ _ expr) = plain expr     plain (ExPhiAgain _ _ expr) = plain expr@@ -553,8 +528,6 @@     goBinding left right = answered (left == right)     goArgument :: Argument -> Argument -> Search     goArgument (ArTau attr left) (ArTau attr' right) = every [answered (attr == attr'), embedded left right]-    goArgument (ArAlpha alpha left) (ArAlpha alpha' right) = every [answered (alpha == alpha'), embedded left right]-    goArgument _ _ = answered False     answered :: Bool -> Search     answered = (,)     every :: [Search] -> Search@@ -570,7 +543,6 @@     children :: Expression -> [Expression]     children (ExFormation bds) = [expr | BiTau attr expr <- bds, attr /= AtRho]     children (ExApplication expr (ArTau _ arg)) = [expr, arg]-    children (ExApplication expr (ArAlpha _ arg)) = [expr, arg]     children (ExDispatch expr _) = [expr]     children (ExPhiMeet _ _ expr) = [expr]     children (ExPhiAgain _ _ expr) = [expr]@@ -608,7 +580,6 @@     goBinding walked _ = walked     goArgument :: (IntMap.IntMap [Expression], IntSet.IntSet, [Int]) -> Argument -> (IntMap.IntMap [Expression], IntSet.IntSet, [Int])     goArgument walked (ArTau _ expr) = goExpr walked expr-    goArgument walked (ArAlpha _ expr) = goExpr walked expr  lifted :: Int -> Int -> Expression -> Expression lifted floor' offset = goExpr@@ -626,7 +597,6 @@     goBinding bd = bd     goArgument :: Argument -> Argument     goArgument (ArTau attr expr) = ArTau attr (goExpr expr)-    goArgument (ArAlpha alpha expr) = ArAlpha alpha (goExpr expr)  denoted :: Expression -> Maybe Int denoted = goExpr@@ -656,7 +626,6 @@     nodesInBinding (BiAny _) = 1     nodesInBinding _ = 3 tally (ExApplication expr (ArTau _ expr')) = 4 + countNodes expr + countNodes expr'-tally (ExApplication expr (ArAlpha _ expr')) = 4 + countNodes expr + countNodes expr' tally (ExDispatch expr' _) = 2 + countNodes expr' tally (ExPhiMeet _ _ expr) = countNodes expr tally (ExPhiAgain _ _ expr) = countNodes expr@@ -702,7 +671,6 @@   ExFormation bds -> settled False False bds   ExDispatch expr attr -> inert expr && headless expr && plain attr   ExApplication expr (ArTau attr arg) -> inert expr && headless expr && plain attr && inert arg-  ExApplication expr (ArAlpha (Alpha _) arg) -> inert expr && headless expr && inert arg   ExXi -> True   ExRoot -> True   ExTermination -> True@@ -751,12 +719,10 @@     asBytesArg :: Argument -> Maybe Expression     asBytesArg (ArTau AtPhi inner) = Just inner     asBytesArg (ArTau (AtLabel "as-bytes") inner) = Just inner-    asBytesArg (ArAlpha (Alpha 0) inner) = Just inner     asBytesArg _ = Nothing     dataArg :: Argument -> Maybe Expression     dataArg (ArTau AtPhi formation) = Just formation     dataArg (ArTau (AtLabel "data") formation) = Just formation-    dataArg (ArAlpha (Alpha 0) formation) = Just formation     dataArg _ = Nothing     matchOuter :: Expression -> Maybe T.Text     matchOuter (BaseObject label) = Just label
src/Abridge.hs view
@@ -49,14 +49,12 @@     goBindings folded empty@BDS_EMPTY{..} = BDS_PAIR EOL tab (PA_FOLDED folded) empty     goPair :: PAIR -> PAIR     goPair PA_TAU{..} = PA_TAU attr arrow (goExpr expr)-    goPair PA_ALPHA{..} = PA_ALPHA alpha arrow (goExpr expr)     goPair PA_FORMATION{..} = PA_FORMATION attr voids arrow (goExpr expr)     goPair PA_DELTA{..} = PA_DELTA (goBytes bytes)     goPair pair = pair     goArgument :: APP_ARGUMENT -> APP_ARGUMENT     goArgument (AA_TAU APP_BINDING{..}) = AA_TAU (APP_BINDING (goPair pair))     goArgument (AA_TAUS binding) = AA_TAUS (goIntact binding)-    goArgument (AA_EXPRS APP_ARG{..}) = AA_EXPRS (APP_ARG (goExpr expr) (goAppArgs args))     counted :: APP_ARGUMENT -> Int     counted (AA_TAU _) = 1     counted (AA_TAUS binding) = goCount binding@@ -69,11 +67,6 @@         goCounts BDS_EMPTY{} = 0         goCounts BDS_PAIR{..} = 1 + goCounts bindings         goCounts BDS_META{..} = 1 + goCounts bindings-    counted (AA_EXPRS APP_ARG{args = rest}) = 1 + goCount rest-      where-        goCount :: APP_ARGS -> Int-        goCount AAS_EMPTY = 0-        goCount AAS_EXPR{..} = 1 + goCount args     goIntact :: BINDING -> BINDING     goIntact BI_PAIR{..} = BI_PAIR (goPair pair) (goIntacts bindings) tab     goIntact BI_META{..} = BI_META meta (goIntacts bindings) tab@@ -82,9 +75,6 @@     goIntacts BDS_PAIR{..} = BDS_PAIR eol tab (goPair pair) (goIntacts bindings)     goIntacts BDS_META{..} = BDS_META eol tab meta (goIntacts bindings)     goIntacts empty = empty-    goAppArgs :: APP_ARGS -> APP_ARGS-    goAppArgs AAS_EXPR{..} = AAS_EXPR eol tab (goExpr expr) (goAppArgs args)-    goAppArgs AAS_EMPTY = AAS_EMPTY     goBytes :: BYTES -> BYTES     goBytes (BT_MANY bts)       | cut && length bts > 8 = BT_CUT (take 2 bts) (length bts - 4) (drop (length bts - 2) bts)
src/Builder.hs view
@@ -65,15 +65,6 @@   _ -> Left (slotMsg slot) buildAttribute attr _ = Right attr -buildAlpha :: Alpha -> Subst -> Built Alpha-buildAlpha (AlMeta meta) (Subst mp) = case Map.lookup (Named meta) mp of-  Just (MvIndex idx) -> Right (Alpha idx)-  _ -> Left (metaMsg meta)-buildAlpha (AlAny slot) (Subst mp) = case Map.lookup (Anon slot) mp of-  Just (MvIndex idx) -> Right (Alpha idx)-  _ -> Left (slotMsg slot)-buildAlpha a _ = Right a- buildBytes :: Bytes -> Subst -> Built Bytes buildBytes (BtMeta meta) (Subst mp) = case Map.lookup (Named meta) mp of   Just (MvBytes bytes) -> Right bytes@@ -119,10 +110,6 @@   attribute <- buildAttribute attr subst   expression <- buildExpression expr subst   Right (ArTau attribute expression)-buildArgument (ArAlpha alpha expr) subst = do-  alpha' <- buildAlpha alpha subst-  expression <- buildExpression expr subst-  Right (ArAlpha alpha' expression)  buildBindings :: [Binding] -> Subst -> Built [Binding] buildBindings [] _ = Right []@@ -176,7 +163,6 @@     closed ExRoot = True     closed ExTermination = True     closed (ExApplication target (ArTau _ value)) = closed target && closed value-    closed (ExApplication target (ArAlpha _ value)) = closed target && closed value     closed (ExDispatch target _) = closed target     closed _ = False pathOf _ form = form
src/CLI/Helpers.hs view
@@ -192,7 +192,6 @@     bindings :: Expression -> Int     bindings (ExFormation bds) = length bds + sum [bindings inner | BiTau _ inner <- bds]     bindings (ExApplication inner (ArTau _ arg)) = bindings inner + bindings arg-    bindings (ExApplication inner (ArAlpha _ arg)) = bindings inner + bindings arg     bindings (ExDispatch inner _) = bindings inner     bindings (ExPhiMeet _ _ inner) = bindings inner     bindings (ExPhiAgain _ _ inner) = bindings inner@@ -295,7 +294,6 @@     rholess (ExDispatch inner attr) = ExDispatch (rholess inner) attr     rholess (ExApplication inner (ArTau AtRho _)) = rholess inner     rholess (ExApplication inner (ArTau attr arg)) = ExApplication (rholess inner) (ArTau attr (rholess arg))-    rholess (ExApplication inner (ArAlpha alpha arg)) = ExApplication (rholess inner) (ArAlpha alpha (rholess arg))     rholess (ExPhiMeet prefix idx inner) = ExPhiMeet prefix idx (rholess inner)     rholess (ExPhiAgain prefix idx inner) = ExPhiAgain prefix idx (rholess inner)     rholess other = other
src/CLI/Parsers.hs view
@@ -7,7 +7,7 @@ import Data.Char (isDigit, toLower, toUpper) import Data.List (intercalate) import Data.Version (showVersion)-import Deps (Acyclic, certainty)+import Deps (Acyclic, Duration (..), certainty) import LaTeX (defaultMeetLength, defaultMeetPopularity) import Lining (LineFormat (..)) import Logger@@ -18,6 +18,7 @@ import Paths_phino (version) import Sugar (SugarType (..)) import Text.Printf (printf)+import Text.Read (readMaybe)  validateIntOption :: (Int -> Bool) -> String -> Int -> ReadM Int validateIntOption cmp msg num@@ -108,12 +109,25 @@         (long "max-firings" <> metavar "FIRINGS" <> help "Maximum number of λ functions the whole run may fire, unlimited unless given")     ) -optMaxSeconds :: Parser (Maybe Int)+durationOption :: ReadM Duration+durationOption = do+  given <- str+  case readMaybe given :: Maybe Integer of+    Just _ -> Duration given . fromIntegral <$> (boundedIntOption >>= validateIntOption (> 0) "--max-seconds must be positive")+    Nothing -> case readMaybe given :: Maybe Double of+      Just span'+        | isNaN span' || isInfinite span' -> readerError (printf "--max-seconds must be a finite number, not '%s'" given)+        | span' >= fromIntegral (maxBound :: Int) -> readerError (printf "value must be between %d and %d" (minBound :: Int) (maxBound :: Int))+        | span' > 0 -> return (Duration given span')+        | otherwise -> readerError "--max-seconds must be positive"+      Nothing -> readerError (printf "cannot parse '%s' as a number of seconds" given)++optMaxSeconds :: Parser (Maybe Duration) optMaxSeconds =   optional     ( option-        (boundedIntOption >>= validateIntOption (> 0) "--max-seconds must be positive")-        (long "max-seconds" <> metavar "SECONDS" <> help "Maximum number of seconds the whole run may take, unlimited unless given")+        durationOption+        (long "max-seconds" <> metavar "SECONDS" <> help "Maximum number of seconds the whole run may take, such as 2 or 0.5, unlimited unless given")     )  optMaxNodes :: Parser (Maybe Int)
src/CLI/Types.hs view
@@ -8,7 +8,7 @@  import AST import Control.Exception (Exception)-import Deps (Acyclic)+import Deps (Acyclic, Duration) import Lining (LineFormat) import Logger (LogLevel) import Must (Must)@@ -120,7 +120,7 @@   , _maxCycles :: Int   , _maxSteps :: Int   , _maxFirings :: Maybe Int-  , _maxSeconds :: Maybe Int+  , _maxSeconds :: Maybe Duration   , _maxNodes :: Maybe Int   , _maxMemory :: Maybe Int   , _margin :: Int@@ -172,7 +172,7 @@   , _maxCycles :: Int   , _maxSteps :: Int   , _maxFirings :: Maybe Int-  , _maxSeconds :: Maybe Int+  , _maxSeconds :: Maybe Duration   , _maxNodes :: Maybe Int   , _maxMemory :: Maybe Int   , _margin :: Int
src/CST.hs view
@@ -88,8 +88,6 @@   | A   | TAU   | TAU'-  | I-  | I'   | B   | B'   | D@@ -115,17 +113,8 @@   | NO_TAB   deriving (Eq, Show) -data ALPHA' = ALPHA | ALPHA'-  deriving (Eq, Show)--data ALPHA-  = AL_IDX {sym :: ALPHA', idx :: Int}-  | AL_META {sym :: ALPHA', meta :: META}-  deriving (Eq, Show)- data PAIR   = PA_TAU {attr :: ATTRIBUTE, arrow :: ARROW, expr :: EXPRESSION}-  | PA_ALPHA {alpha :: ALPHA, arrow :: ARROW, expr :: EXPRESSION}   | PA_FORMATION {attr :: ATTRIBUTE, voids :: [ATTRIBUTE], arrow :: ARROW, expr :: EXPRESSION}   | PA_VOID {attr :: ATTRIBUTE, arrow :: ARROW, void :: VOID}   | PA_LAMBDA {func :: T.Text}@@ -154,18 +143,9 @@   | BDS_META {eol :: EOL, tab :: TAB, meta :: META, bindings :: BINDINGS}   deriving (Eq, Show) -data APP_ARG = APP_ARG {expr :: EXPRESSION, args :: APP_ARGS}-  deriving (Eq, Show)--data APP_ARGS-  = AAS_EXPR {eol :: EOL, tab :: TAB, expr :: EXPRESSION, args :: APP_ARGS}-  | AAS_EMPTY-  deriving (Eq, Show)- data APP_ARGUMENT   = AA_TAU APP_BINDING   | AA_TAUS BINDING-  | AA_EXPRS APP_ARG   deriving (Eq, Show)  data EXPRESSION@@ -219,9 +199,7 @@   deriving (Eq, Show)  data NUMBER-  = IDX_META {meta :: META}-  | LENGTH {binding :: BINDING}-  | DOMAIN {binding :: BINDING}+  = LENGTH {binding :: BINDING}   | LITERAL {num :: Int}   deriving (Eq, Show) @@ -361,7 +339,7 @@   toCST (ExDispatch ExXi attr) ctx = EX_ATTR (toCST attr ctx)   toCST (ExDispatch expr attr) ctx = EX_DISPATCH (toCST expr ctx) NO_SPACE (toCST attr ctx)   toCST app@(ExApplication _ _) ctx@(tabs, eol) =-    let (ex, ts, exs) = complexApplication app+    let (ex, ts) = complexApplication app         ex' = toCST ex ctx :: EXPRESSION         next = tabs + 1         (ts', rs) = withoutRhosInPrimitives ex ts@@ -369,7 +347,7 @@      in if length ts' == 1 && dataPrimitive obj && sweetCollapsible obj           then applicationToPrimitive obj tabs rs           else-            if length ts' > 1 && null exs && dataPrimitive obj && sweetCollapsible obj+            if length ts' > 1 && dataPrimitive obj && sweetCollapsible obj               then                 EX_APPLICATION                   (applicationToPrimitive obj tabs rs)@@ -381,27 +359,15 @@                   (TAB tabs)                   next               else-                if null exs-                  then-                    EX_APPLICATION-                      ex'-                      NO_SPACE-                      eol-                      (TAB next)-                      (AA_TAUS (toCST ts (next, eol) :: BINDING))-                      eol-                      (TAB tabs)-                      next-                  else-                    EX_APPLICATION-                      ex'-                      NO_SPACE-                      eol-                      (TAB next)-                      (AA_EXPRS (toCST exs (next, eol)))-                      eol-                      (TAB tabs)-                      next+                EX_APPLICATION+                  ex'+                  NO_SPACE+                  eol+                  (TAB next)+                  (AA_TAUS (toCST ts (next, eol) :: BINDING))+                  eol+                  (TAB tabs)+                  next     where       primitives :: [T.Text]       primitives = ["number", "string"]@@ -422,38 +388,16 @@         Nothing -> EX_NUMBER (btsToNum bts) (TAB tabs) rhos       applicationToPrimitive (DataString bts) tabs rhos = EX_STRING (btsToStr bts) (TAB tabs) rhos       applicationToPrimitive _ _ _ = error "applicationToPrimitive expects DataNumber or DataString"-      complexApplication :: Expression -> (Expression, [Argument], [Expression])-      complexApplication expr =-        let (expr', taus', exprs') = complexApplication' expr-         in (expr', reverse taus', reverse exprs')+      complexApplication :: Expression -> (Expression, [Argument])+      complexApplication = go []         where-          complexApplication' :: Expression -> (Expression, [Argument], [Expression])-          complexApplication' (ExApplication (ExApplication expr tau) tau') =-            let (before, taus, exprs) = complexApplication' (ExApplication expr tau)-                taus' = tau' : taus-             in if null exprs-                  then (before, taus', [])-                  else case tau' of-                    ArAlpha (Alpha idx) expr' ->-                      if idx == length exprs-                        then (before, taus', expr' : exprs)-                        else (before, taus', [])-                    _ -> (before, taus', [])-          complexApplication' (ExApplication expr (ArAlpha (Alpha 0) expr')) = (expr, [ArAlpha (Alpha 0) expr'], [expr'])-          complexApplication' (ExApplication expr tau) = (expr, [tau], [])-          complexApplication' expr = (expr, [], [])+          go :: [Argument] -> Expression -> (Expression, [Argument])+          go taus (ExApplication expr tau) = go (tau : taus) expr+          go taus expr = (expr, taus)       head' :: [a] -> a       head' [] = error "Should never be called"       head' (x : _) = x -instance ToCST [Expression] APP_ARG where-  toCST (expr : exprs) ctx = APP_ARG (toCST expr ctx) (toCST exprs ctx)-  toCST [] _ = error "toCST APP_ARG requires non-empty expression list"--instance ToCST [Expression] APP_ARGS where-  toCST [] _ = AAS_EMPTY-  toCST (expr : exprs) ctx@(tabs, eol) = AAS_EXPR eol (TAB tabs) (toCST expr ctx) (toCST exprs ctx)- instance ToCST [Binding] BINDING where   toCST [] (tabs, _) = BI_EMPTY (TAB tabs)   toCST (BiMeta mt : bds) ctx@(tabs, _) = BI_META (META NO_EXCL B (metaTail mt)) (toCST bds ctx) (TAB tabs)@@ -504,7 +448,6 @@  instance ToCST Argument PAIR where   toCST (ArTau attr exp) ctx = PA_TAU (toCST attr ctx) ARROW (toCST exp ctx)-  toCST (ArAlpha alpha exp) ctx = PA_ALPHA (toCST alpha ctx) ARROW (toCST exp ctx)  instance ToCST [Argument] BINDING where   toCST [] (tabs, _) = BI_EMPTY (TAB tabs)@@ -534,11 +477,6 @@   toCST (AtMeta mt) _ = AT_META (META NO_EXCL TAU (metaTail mt))   toCST (AtAny _) _ = AT_META (anyMeta TAU) -instance ToCST Alpha ALPHA where-  toCST (Alpha idx) _ = AL_IDX ALPHA idx-  toCST (AlMeta mt) _ = AL_META ALPHA (META NO_EXCL I (metaTail mt))-  toCST (AlAny _) _ = AL_META ALPHA (anyMeta I)- instance ToCST Y.Condition CONDITION where   toCST (Y.Not (Y.In [attr] [binding])) _ = CO_BELONGS (attributeToCST attr) NOT_IN (ST_BINDING (bindingsToCST [binding]))   toCST (Y.Not (Y.In attrs groups)) _ = CO_SUBSET (map attributeToCST attrs) NOT_IN (map (\bd -> bindingsToCST [bd]) groups)@@ -569,10 +507,7 @@   toCST (Y.CmpNum num) _ = CMP_NUM (numberToCST num)  instance ToCST Y.Number NUMBER where-  toCST (Y.MetaIndex mt) _ = IDX_META (META NO_EXCL I (metaTail mt))-  toCST (Y.AnyIndex _) _ = IDX_META (anyMeta I)   toCST (Y.Length binding) _ = LENGTH (bindingsToCST [binding])-  toCST (Y.Domain binding) _ = DOMAIN (bindingsToCST [binding])   toCST (Y.Literal num) _ = LITERAL num  instance ToCST Y.ExtraArgument EXTRA_ARG where
src/Canonizer.hs view
@@ -59,9 +59,6 @@ canonizeArgument (ArTau attr expr) st =   let (expr', st') = canonizeExpression expr st    in (ArTau attr expr', st')-canonizeArgument (ArAlpha alpha expr) st =-  let (expr', st') = canonizeExpression expr st-   in (ArAlpha alpha expr', st')  lambdaNames :: Expression -> [T.Text] lambdaNames (ExFormation bds) = concatMap named bds@@ -72,7 +69,6 @@     named _ = [] lambdaNames (ExDispatch expr _) = lambdaNames expr lambdaNames (ExApplication expr (ArTau _ arg)) = lambdaNames expr ++ lambdaNames arg-lambdaNames (ExApplication expr (ArAlpha _ arg)) = lambdaNames expr ++ lambdaNames arg lambdaNames (ExPhiMeet _ _ expr) = lambdaNames expr lambdaNames (ExPhiAgain _ _ expr) = lambdaNames expr lambdaNames _ = []
src/Condition.hs view
@@ -55,12 +55,6 @@         _ <- rparen         return (Y.Length bd)     , do-        _ <- symbol "domain" >> lparen-        bd <- _binding phiParser-        _ <- rparen-        return (Y.Domain bd)-    , either Y.AnyIndex Y.MetaIndex <$> _index phiParser-    , do         sign <- optional (choice [char '-', char '+'])         unsigned <- lexeme L.decimal         let signed = if sign == Just '-' then negate unsigned else unsigned :: Integer
src/Deps.hs view
@@ -29,7 +29,7 @@ import GHC.Stats (GCDetails (gcdetails_live_bytes), RTSStats (gc, max_mem_in_use_bytes), getRTSStats, getRTSStatsEnabled) import Logger (logDebug, logInfo) import Matcher-import Printer (printAlpha, printAttribute, printBinding, printFunction)+import Printer (printAttribute, printBinding, printFunction) import System.Directory (createDirectoryIfMissing) import System.FilePath import System.IO (Handle, hPutStrLn)@@ -96,6 +96,12 @@ opened Evaluation = "evaluate" opened Contextualization = "contextualize" +data Duration = Duration+  { _given :: String+  , _span :: Double+  }+  deriving (Eq, Show)+ data Acyclic   = Proven   | Plausible@@ -143,7 +149,7 @@   | EvStall Int T.Text   | EvStuckOn Int T.Text   | EvStarved Int Int Judgment Expression-  | EvTimeout Int Int Judgment Expression+  | EvTimeout Int Duration Judgment Expression   | EvSpent Int Int Judgment Expression   | EvExceeded Int Int Judgment Expression   | EvOversized Int Int Judgment Expression@@ -161,8 +167,11 @@   | EvAnswer Int Expression   | EvMorphed Int Expression   | EvNormalized Int Expression Expression+  | EvFed Int Int Expression+  | EvOpaqued Int Int Expression   | EvJoined Int (Either T.Text Expression) Int (Int, Int) (Maybe Int) (Maybe Expression)   | EvGuarded Int (Either T.Text Expression) (Expression, Expression) (Expression, Expression) Side (Maybe Expression)+  | EvAssumed Int (Expression, Expression) (Expression, Expression)   | EvDiverged Int (Expression, Expression) (Expression, Expression) [Attribute] Refusal   | EvUnripe Int (Expression, Expression) (Expression, Expression) Side Attribute   | EvFabricated Int (Expression, Expression) (Expression, Expression) [(Expression, Expression)] Expression@@ -242,8 +251,11 @@ tier (EvAnswer depth _) = depth tier (EvMorphed depth _) = depth tier (EvNormalized depth _ _) = depth+tier (EvFed depth _ _) = depth+tier (EvOpaqued depth _ _) = depth tier (EvJoined depth _ _ _ _ _) = depth tier (EvGuarded depth _ _ _ _ _) = depth+tier (EvAssumed depth _ _) = depth tier (EvDiverged depth _ _ _ _) = depth tier (EvUnripe depth _ _ _ _) = depth tier (EvFabricated depth _ _ _ _) = depth@@ -284,7 +296,6 @@     binding (BiTau attr expr) = BiTau attr (abbreviated names expr)     binding bd = bd abbreviatedInside names (ExApplication expr (ArTau attr arg)) = ExApplication (abbreviated names expr) (ArTau attr (abbreviated names arg))-abbreviatedInside names (ExApplication expr (ArAlpha alpha arg)) = ExApplication (abbreviated names expr) (ArAlpha alpha (abbreviated names arg)) abbreviatedInside names (ExDispatch expr attr) = ExDispatch (abbreviated names expr) attr abbreviatedInside _ term = term @@ -452,16 +463,16 @@     written at (EvDelta _ bytes) protocol = do       datum <- render (ExBytes bytes)       let (naming, protocol') = stored (Right bytes) protocol-      pure (protocol', Just (indented at (remarked (printf "%s := %s" naming datum) (maybe [] pure (ieee bytes)))))+      pure (protocol', Just (indented at (remarked (printf "%s ≔ %s" naming datum) (maybe [] pure (ieee bytes)))))     written at (EvManufactured _ symbol) protocol = do       datum <- spelt (Left symbol)       let (naming, protocol') = stored (Left symbol) protocol-      pure (protocol', Just (indented at (printf "%s := %s" naming datum)))+      pure (protocol', Just (indented at (printf "%s ≔ %s" naming datum)))     written at (EvBoxed _ term) protocol = taking at "boxed" term protocol     written at (EvShared _ name term) protocol = do       label <- render name       value <- printed (abbreviatedInside protocol._made term)-      pure (protocol, Just (indented at (printf "shared %s := %s" label value)))+      pure (protocol, Just (indented at (printf "shared %s ≔ %s" label value)))     written at (EvUndressed _ term) protocol = taking at "undressed" term protocol     written at (EvLooped _ judgment mode self site answered) protocol = do       form <- render self@@ -472,7 +483,7 @@         severed :: String -> (Int, Maybe Expression) -> IO (String, [String])         severed form (symbol, call) = do           made <- traverse (printed . abbreviatedInside protocol._made) call-          pure (printf "looped %s%s" (printFunction (FnSymbol symbol)) (maybe "" (" := " ++) made), [printf "repeats %s" form])+          pure (printf "looped %s%s" (printFunction (FnSymbol symbol)) (maybe "" (" ≔ " ++) made), [printf "repeats %s" form])     written at (EvPassed _ judgment mode self site term call) protocol = do       form <- render self       remarks <- context protocol judgment site@@ -480,7 +491,7 @@           naming :: String           naming = printf "%s·%d" (labelled protocol answer) index       value <- maybe (borrowed protocol term) (printed . abbreviatedInside protocol._made) call-      pure (counted{_made = namedFormation term (alias (opener protocol) index) counted._made}, Just (indented at (remarked (printf "passed %s := %s" naming value) (remarks ++ [certainty mode, printf "repeats %s" form]))))+      pure (counted{_made = namedFormation term (alias (opener protocol) index) counted._made}, Just (indented at (remarked (printf "passed %s ≔ %s" naming value) (remarks ++ [certainty mode, printf "repeats %s" form]))))     written at (EvStuck _ key judgment self) protocol = do       form <- render self       pure (protocol, Just (indented at (printf "unanswered %s  # %s(%s)" (T.unpack key) (letter judgment) form)))@@ -496,7 +507,7 @@       pure (protocol, Just (indented at (remarked (printf "starved %d" limit) remarks)))     written at (EvTimeout _ limit judgment site) protocol = do       remarks <- context protocol judgment site-      pure (protocol, Just (indented at (remarked (printf "timeout %d" limit) remarks)))+      pure (protocol, Just (indented at (remarked (printf "timeout %s" limit._given) remarks)))     written at (EvSpent _ limit judgment site) protocol = do       remarks <- context protocol judgment site       pure (protocol, Just (indented at (remarked (printf "spent %d" limit) remarks)))@@ -511,34 +522,34 @@       pure (protocol, Just (indented at (remarked (printf "blown %s" (sized limit)) remarks)))     written at (EvData _ spelling operand value) protocol = do       datum <- maybe (spelt value) pure (found value protocol._found)-      line <- commented protocol (printf "%s := %s" (labelled protocol spelling) datum) Dataization operand+      line <- commented protocol (printf "%s ≔ %s" (labelled protocol spelling) datum) Dataization operand       pure (either (const protocol) (\bytes -> protocol{_spelt = Map.insertWith Map.union (opener protocol) (Map.singleton bytes (labelled protocol spelling)) protocol._spelt}) value, Just (indented at line))     written at (EvTerm _ spelling judgment operand term) protocol = do       let naming = labelled protocol spelling       (protocol', value) <- inscribed protocol naming term-      line <- commented protocol (printf "%s := %s" naming value) judgment operand+      line <- commented protocol (printf "%s ≔ %s" naming value) judgment operand       pure (protocol', Just (indented at line))     written _ (EvBound _ meta term) protocol =       pure (protocol{_unwritten = Map.alter (Just . namedInsert meta term . fromMaybe Map.empty) (opener protocol) protocol._unwritten}, Nothing)     written at (EvReshaped _ spelling block source term) protocol = do       let naming = labelled protocol spelling       (protocol', value) <- inscribed protocol naming term-      line <- printf "%s := %s  # %s(%s)" naming value (T.unpack block) . owned protocol source <$> salted (unwritten protocol source)+      line <- printf "%s ≔ %s  # %s(%s)" naming value (T.unpack block) . owned protocol source <$> salted (unwritten protocol source)       pure (protocol', Just (indented at line))     written at (EvSymbolized _ symbol bytes) protocol = do       datum <- render (ExBytes bytes)-      pure (protocol, Just (indented at (remarked (printf "symbolized %s := %s" (printFunction (FnSymbol symbol)) datum) (catMaybes [Map.lookup (opener protocol) protocol._spelt >>= Map.lookup bytes, ieee bytes]))))+      pure (protocol, Just (indented at (remarked (printf "symbolized %s ≔ %s" (printFunction (FnSymbol symbol)) datum) (catMaybes [Map.lookup (opener protocol) protocol._spelt >>= Map.lookup bytes, ieee bytes]))))     written at (EvCast _ spelling source model term) protocol = do       let naming = labelled protocol spelling       (protocol', value) <- inscribed protocol naming term       one <- spoken protocol source       two <- spoken protocol model-      pure (protocol', Just (indented at (printf "cast %s := %s  # %s up to %s" naming value one two)))+      pure (protocol', Just (indented at (printf "cast %s ≔ %s  # %s up to %s" naming value one two)))     written _ EvMinted{} protocol = pure (protocol, Nothing)     written at (EvDeferred _ symbol judgment copy call site) protocol = do       form <- maybe (render copy) (printed . abbreviatedInside protocol._made) call       remarks <- context protocol judgment site-      pure (protocol, Just (indented at (remarked (printf "deferred %s := %s" (printFunction (FnSymbol symbol)) form) remarks)))+      pure (protocol, Just (indented at (remarked (printf "deferred %s ≔ %s" (printFunction (FnSymbol symbol)) form) remarks)))     written at (EvApplied _ judgment call object site) protocol = do       let (index, counted) = numbered protocol           (index', counted') = numbered counted@@ -549,13 +560,13 @@       remarks <- context protocol judgment site       pure         ( counted'{_made = namedInsert call (alias (opener protocol) index) (namedInsert object (alias (opener protocol) index') counted'._made)}-        , Just (unlines [indented at (remarked (printf "%s·%d := %s" stem index form) remarks), indented at (printf "%s·%d := %s" stem index' body)])+        , Just (unlines [indented at (remarked (printf "%s·%d ≔ %s" stem index form) remarks), indented at (printf "%s·%d ≔ %s" stem index' body)])         )     written at (EvBuilt depth term) protocol = do       let (index, counted) = numbered protocol       value <- borrowed protocol term       let naming = printf "%s·%d" (labelled protocol answer) index-      pure (counted{_built = Map.insert (opener protocol) index counted._built, _answered = (depth, term, naming) : counted._answered}, Just (indented at (printf "%s := %s  # %s" naming value (entered protocol (T.unpack answer)))))+      pure (counted{_built = Map.insert (opener protocol) index counted._built, _answered = (depth, term, naming) : counted._answered}, Just (indented at (printf "%s ≔ %s  # %s" naming value (entered protocol (T.unpack answer)))))     written at (EvAnswer _ term) protocol = do       let (index, counted) = numbered protocol           stem :: String@@ -563,18 +574,26 @@           naming :: String           naming = printf "%s·%d" stem index       (protocol', value) <- valued counted naming term-      pure (protocol'{_made = namedFormation term (alias (opener protocol) index) protocol'._made}, Just (indented at (printf "%s := %s  # 𝕄(%s·%d)" naming value stem (Map.findWithDefault 1 (opener protocol) protocol._built))))+      pure (protocol'{_made = namedFormation term (alias (opener protocol) index) protocol'._made}, Just (indented at (printf "%s ≔ %s  # 𝕄(%s·%d)" naming value stem (Map.findWithDefault 1 (opener protocol) protocol._built))))     written at (EvMorphed _ term) protocol = concluding at "morphed" term protocol     written at (EvNormalized _ source term) protocol       | isJust (namedLookup term protocol._named) || isJust (namedLookup term protocol._made) = pure (protocol, Nothing)       | otherwise = do           origin <- render source           second (fmap (`remarked` [origin])) <$> concluding at "normalized" term protocol+    written at (EvFed _ symbol term) protocol = do+      fresh <- render (ExFormation [BiLambda (FnSymbol symbol)])+      origin <- render term+      pure (protocol, Just (indented at (printf "fed %s ≔ %s" fresh origin)))+    written at (EvOpaqued _ symbol term) protocol = do+      fresh <- render (ExFormation [BiLambda (FnSymbol symbol)])+      origin <- render term+      pure (protocol, Just (indented at (printf "opaque %s ≔ %s" fresh origin)))     written at (EvJoined _ condition symbol (left, right) bottom raised) protocol = do       on <- either (pure . labelled protocol) salted condition       termination <- render ExTermination       raiser <- traverse salted raised-      pure (protocol, Just (indented at (remarked (printf "joined %s := %s ? %s : %s" (printFunction (FnSymbol symbol)) on (printFunction (FnSymbol left)) (printFunction (FnSymbol right))) [printf "where %s is %s%s" (printFunction (FnSymbol idx)) termination (maybe "" (printf " raised by %s") raiser :: String) | Just idx <- [bottom], idx `elem` [left, right]])))+      pure (protocol, Just (indented at (remarked (printf "joined %s ≔ %s ? %s : %s" (printFunction (FnSymbol symbol)) on (printFunction (FnSymbol left)) (printFunction (FnSymbol right))) [printf "where %s is %s%s" (printFunction (FnSymbol idx)) termination (maybe "" (printf " raised by %s") raiser :: String) | Just idx <- [bottom], idx `elem` [left, right]])))     written at (EvGuarded _ condition left right side raised) protocol = do       on <- either (pure . labelled protocol) salted condition       one <- sided protocol left@@ -582,6 +601,10 @@       termination <- render ExTermination       raiser <- traverse salted raised       pure (protocol, Just (indented at (remarked (printf "guarded %s ? %s : %s" on one two) [printf "where %s is %s%s" (if side == Lefthand then one else two) termination (maybe "" (printf " raised by %s") raiser :: String)])))+    written at (EvAssumed _ symbol kept) protocol = do+      bare <- sided protocol symbol+      other <- sided protocol kept+      pure (protocol, Just (indented at (printf "assumed %s ≡ %s" bare other)))     written at (EvDiverged _ left right path refusal) protocol = do       one <- sided protocol left       two <- sided protocol right@@ -596,13 +619,13 @@       two <- sided protocol right       body <- printed (abbreviatedInside protocol._made (unnamed names term))       let (index, counted) = numbered protocol-      pure (counted{_made = namedInsert term (alias (opener protocol) index) counted._made}, Just (indented at (printf "fabricated %s·%d := %s and %s  # %s" (labelled protocol answer) index one two body)))+      pure (counted{_made = namedInsert term (alias (opener protocol) index) counted._made}, Just (indented at (printf "fabricated %s·%d ≔ %s and %s  # %s" (labelled protocol answer) index one two body)))     written at (EvTaken _ term) protocol = do       let (index, counted) = numbered protocol           naming :: String           naming = printf "%s·%d" (labelled protocol answer) index       (protocol', value) <- valued counted naming term-      pure (protocol'{_made = namedFormation term (alias (opener protocol) index) protocol'._made}, Just (indented at (printf "%s := %s" naming value)))+      pure (protocol'{_made = namedFormation term (alias (opener protocol) index) protocol'._made}, Just (indented at (printf "%s ≔ %s" naming value)))     written at (EvRemembered _ object source) protocol = stating at "remembered" "≡" object source protocol     written at (EvMemoized _ form reply) protocol = stating at "memoized" "⇛" form reply protocol     written at (EvEvaluated _ form reply) protocol = do@@ -705,12 +728,12 @@       (protocol', value) <- case (namedLookup term protocol._made, namedLookup term protocol._named) of         (Nothing, Nothing) -> valued counted naming term         _ -> (,) counted <$> borrowed protocol term-      pure (protocol'{_made = namedFormation term (alias (opener protocol) index) protocol'._made}, Just (indented at (printf "%s %s := %s" word naming value)))+      pure (protocol'{_made = namedFormation term (alias (opener protocol) index) protocol'._made}, Just (indented at (printf "%s %s ≔ %s" word naming value)))     taking :: Int -> String -> Expression -> Protocol -> IO (Protocol, Maybe String)     taking at word term protocol = do       let (index, counted) = numbered protocol       taken <- printed (abbreviatedInside protocol._made term)-      pure (counted{_made = namedInsert term (alias (opener protocol) index) counted._made}, Just (indented at (printf "%s %s·%d := %s" word (labelled protocol answer) index taken)))+      pure (counted{_made = namedInsert term (alias (opener protocol) index) counted._made}, Just (indented at (printf "%s %s·%d ≔ %s" word (labelled protocol answer) index taken)))  data Profile = Profile   { _start :: Double@@ -875,7 +898,7 @@     elements at (EvStarved depth limit judgment site) nesting =       placed at nesting (printf "<starved limit=\"%d\" by=\"%s\" at=\"%s\"/>" limit (opened judgment) . escapeXML <$> located depth site)     elements at (EvTimeout depth limit judgment site) nesting =-      placed at nesting (printf "<timeout limit=\"%d\" by=\"%s\" at=\"%s\"/>" limit (opened judgment) . escapeXML <$> located depth site)+      placed at nesting (printf "<timeout limit=\"%s\" by=\"%s\" at=\"%s\"/>" limit._given (opened judgment) . escapeXML <$> located depth site)     elements at (EvSpent depth limit judgment site) nesting =       placed at nesting (printf "<spent limit=\"%d\" by=\"%s\" at=\"%s\"/>" limit (opened judgment) . escapeXML <$> located depth site)     elements at (EvExceeded depth limit judgment site) nesting =@@ -953,6 +976,14 @@     elements at (EvNormalized depth source term) nesting       | echoed nesting term = pure (nesting, [])       | otherwise = placed at nesting (leaf depth source >>= \origin -> concluded "normalized" (printf " of=\"%s\"" (escapeXML origin)) depth term)+    elements at (EvFed depth symbol term) nesting =+      placed at nesting $ do+        origin <- leaf depth term+        pure (printf "<fed symbol=\"%s\" of=\"%s\"/>" (sigma symbol) (escapeXML origin))+    elements at (EvOpaqued depth symbol term) nesting =+      placed at nesting $ do+        origin <- leaf depth term+        pure (printf "<opaque symbol=\"%s\" of=\"%s\"/>" (sigma symbol) (escapeXML origin))     elements at (EvJoined depth condition symbol (left, right) bottom raised) nesting =       placed at nesting $ do         on <- either (pure . labelled nesting) (lift . traced) condition@@ -965,6 +996,11 @@         two <- sided depth nesting right         raiser <- traverse (leaf depth) (maybeToList raised)         pure (printf "<guarded on=\"%s\" left=\"%s\" right=\"%s\" terminator=\"%s\"%s/>" (escapeXML on) (escapeXML one) (escapeXML two) (if side == Lefthand then "left" else "right" :: String) (concat [printf " raised=\"%s\"" (escapeXML name) :: String | name <- raiser]))+    elements at (EvAssumed depth symbol kept) nesting =+      placed at nesting $ do+        bare <- sided depth nesting symbol+        other <- sided depth nesting kept+        pure (printf "<assumed symbol=\"%s\" as=\"%s\"/>" (escapeXML bare) (escapeXML other))     elements at (EvDiverged depth left right path refusal) nesting =       placed at nesting $ do         one <- sided depth nesting left@@ -1150,7 +1186,6 @@     part _ _ = pure (Right "")     argument :: Int -> Argument -> Naming String     argument depth (ArTau attr value) = titled depth value >>= lift . attributed (printAttribute attr)-    argument depth (ArAlpha alpha value) = titled depth value >>= lift . attributed (printAlpha alpha)     attributed :: String -> Expression -> IO String     attributed name ExTermination = pure (printf "<bottom attr=\"%s\"/>" (escapeXML name))     attributed name value = tagged (kind value) . escapeXMLText <$> spelled value@@ -1401,4 +1436,3 @@     goBinding bd = bd     goArgument :: Argument -> Argument     goArgument (ArTau attr term) = ArTau attr (goExpr term)-    goArgument (ArAlpha alpha term) = ArAlpha alpha (goExpr term)
src/Emit.hs view
@@ -405,14 +405,6 @@   expression <- matching expr head'   argument <- matching arg arg'   pure (Gen (PCon "ExApplication" [PVar head', PCon "ArTau" [PVar attr', PVar arg']]) (single var) : attribute' ++ expression ++ argument)-matching (ExApplication expr (ArAlpha alpha arg)) var = do-  head' <- fresh-  alpha' <- fresh-  arg' <- fresh-  expression <- matching expr head'-  index <- indexed alpha alpha'-  argument <- matching arg arg'-  pure (Gen (PCon "ExApplication" [PVar head', PCon "ArAlpha" [PVar alpha', PVar arg']]) (single var) : expression ++ index ++ argument) matching expr _ = refuse (printf "its pattern holds the term '%s', which only a rule of YAML can match" (show expr))  bindings :: [Binding] -> String -> Emitting [Qual]@@ -474,14 +466,6 @@ attribute (AtAny _) _ = pure [] attribute attr var = (\literal -> [Guard (printf "%s == %s" var literal)]) <$> attributed attr -indexed :: Alpha -> String -> Emitting [Qual]-indexed (AlMeta meta) var = do-  index <- fresh-  bound <- meta' (Named meta) index-  pure (Gen (PCon "Alpha" [PVar index]) (single var) : bound)-indexed (AlAny _) var = pure [Gen (PCon "Alpha" [PVar "_"]) (single var)]-indexed (Alpha idx) var = pure [Guard (printf "%s == Alpha %d" var idx)]- meta' :: Meta -> String -> Emitting [Qual] meta' key var =   known key >>= \case@@ -498,7 +482,6 @@       | T.pack prefix `T.isPrefixOf` kind = [Anon slot]     go (ExFormation bds) = concat [go expr | BiTau _ expr <- bds]     go (ExApplication expr (ArTau _ arg)) = go expr ++ go arg-    go (ExApplication expr (ArAlpha _ arg)) = go expr ++ go arg     go (ExDispatch expr _) = go expr     go _ = [] @@ -555,9 +538,7 @@ compared _ _ _ = "False"  number :: Y.Number -> Emitting (Maybe String)-number (Y.MetaIndex meta) = known (Named meta) number (Y.Length (BiMeta meta)) = fmap ("length " ++) <$> known (Named meta)-number (Y.Domain (BiMeta meta)) = fmap ("Ru.domainOf " ++) <$> known (Named meta) number (Y.Literal num) = pure (Just (show num)) number _ = pure Nothing @@ -594,11 +575,6 @@   attr' <- builtAttribute attr   arg' <- built checked arg   pure (printf "ExApplication %s (ArTau %s %s)" <$> fmap parens expr' <*> fmap parens attr' <*> fmap parens arg')-built checked (ExApplication expr (ArAlpha alpha arg)) = do-  expr' <- built checked expr-  alpha' <- builtAlpha alpha-  arg' <- built checked arg-  pure (printf "ExApplication %s (ArAlpha %s %s)" <$> fmap parens expr' <*> fmap parens alpha' <*> fmap parens arg') built _ expr = refuse (printf "it builds the term '%s', which only a rule of YAML can build" (show expr))  builtBinding :: Bool -> Binding -> Emitting (Maybe String)@@ -625,11 +601,6 @@ builtAttribute (AtMeta meta) = known (Named meta) builtAttribute (AtAny _) = pure Nothing builtAttribute attr = Just <$> attributed attr--builtAlpha :: Alpha -> Emitting (Maybe String)-builtAlpha (AlMeta meta) = fmap ("Alpha " ++) <$> known (Named meta)-builtAlpha (AlAny _) = pure Nothing-builtAlpha (Alpha idx) = pure (Just (printf "Alpha %d" idx))  attributed :: Attribute -> Emitting String attributed (AtLabel label) = pure (printf "AtLabel (%s)" (texted label))
src/Encoding.hs view
@@ -50,18 +50,9 @@ instance ToASCII APP_ARGUMENT where   toASCII (AA_TAU tau) = AA_TAU (toASCII tau)   toASCII (AA_TAUS taus) = AA_TAUS (toASCII taus)-  toASCII (AA_EXPRS args) = AA_EXPRS (toASCII args) -instance ToASCII APP_ARG where-  toASCII APP_ARG{..} = APP_ARG (toASCII expr) (toASCII args)--instance ToASCII APP_ARGS where-  toASCII AAS_EXPR{..} = AAS_EXPR eol tab (toASCII expr) (toASCII args)-  toASCII args = args- instance ToASCII PAIR where   toASCII PA_TAU{..} = PA_TAU (toASCII attr) ARROW' (toASCII expr)-  toASCII PA_ALPHA{..} = PA_ALPHA (toASCII alpha) ARROW' (toASCII expr)   toASCII PA_FORMATION{..} = PA_FORMATION (toASCII attr) (map toASCII voids) ARROW' (toASCII expr)   toASCII PA_VOID{..} = PA_VOID (toASCII attr) ARROW' QUESTION   toASCII PA_LAMBDA{..} = PA_LAMBDA' func@@ -75,10 +66,6 @@   toASCII (BT_META meta) = BT_META (META EXCL D'' (rest meta))   toASCII bts = bts -instance ToASCII ALPHA where-  toASCII AL_IDX{..} = AL_IDX ALPHA' idx-  toASCII AL_META{..} = AL_META ALPHA' (META EXCL I' (rest meta))- instance ToASCII ATTRIBUTE where   toASCII AT_PHI{} = AT_PHI AT   toASCII AT_RHO{} = AT_RHO CARET@@ -90,9 +77,7 @@   toASCII ST_ATTRIBUTES{..} = ST_ATTRIBUTES (map toASCII attrs)  instance ToASCII NUMBER where-  toASCII IDX_META{..} = IDX_META (META EXCL I' (rest meta))   toASCII LENGTH{..} = LENGTH (toASCII binding)-  toASCII DOMAIN{..} = DOMAIN (toASCII binding)   toASCII literal@LITERAL{} = literal  instance ToASCII COMPARABLE where
src/Evaluate.hs view
@@ -23,7 +23,7 @@ import qualified Data.Text as T import Deps (Evaluation (..), Judgment (Evaluation, Morphing), State (..), dontSaveEval, dontSaveStep, resited) import Engine (Engine (..))-import Forks (Refusal (Unnamed, Unripe), Side (Lefthand, Righthand), forked, joined)+import Forks (Refusal (Unnamed, Unripe), Side (Lefthand, Righthand), bared, forked, joined) import Lambdas (Ending (..), Lambda (..), Line (..), Meta (..), cast, emptyLambdas, matched, minted, rewritten, stayed, symbolized, thrown) import Matcher (MetaValue (..), Subst, combine, substEmpty, substSingle, substSlot) import Morph (Answer (..), Budget (..), Firing (..), Kept (..), Kindred, ReduceContext (..), ReduceException (..), Steps (..), adopted, argued, awaited, called, charged, coined, counted, deeper, ended, expired, fired, isLambda, kindle, kindred, lambda, minting, morphing, normalized, noted, opening, placed, recalled, remember, remembered, remembering, repeats, retained, settled, starved, unparked, voided)@@ -425,6 +425,7 @@         Right (term, made, bottom, spent') -> do           writeIORef ctx._minted spent'           mapM_ (\(fresh, pair) -> ctx._saveEval (EvJoined ctx._nesting (either (Left . _spelling) Right on) fresh pair bottom raised)) made+          mapM_ (\side -> ctx._saveEval (if side == Lefthand then EvAssumed ctx._nesting (left, one) (right, two) else EvAssumed ctx._nesting (right, two) (left, one))) (bared (stopped one) (stopped two))           mapM_ (\side -> ctx._saveEval (EvGuarded ctx._nesting (either (Left . _spelling) Right on) (left, one) (right, two) side raised)) [side | null made, term /= ExTermination, (side, ExTermination) <- [(Lefthand, stopped one), (Righthand, stopped two)]]           ctx._saveEval (EvTaken ctx._nesting term)           pure (Joined term, state''')
src/Forks.hs view
@@ -4,7 +4,7 @@ -- SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com -- SPDX-License-Identifier: MIT -module Forks (Refusal (..), Side (..), forked, joined) where+module Forks (Refusal (..), Side (..), bared, forked, joined) where  import AST (Argument (..), Attribute (AtDelta, AtLabel, AtLambda, AtRho), Binding (..), Bytes, Expression (ExApplication, ExDispatch, ExFormation, ExPhiAgain, ExPhiMeet, ExTermination, ExXi), Function (FnSymbol), attributeFromBinding, symbols) import Control.Monad.Trans.State.Strict (State, runState, state)@@ -35,6 +35,9 @@   | null (symbols right) = Right (right, [], Nothing, spent) joined left ExTermination spent   | null (symbols left) = Right (left, [], Nothing, spent)+joined left right spent+  | Just Lefthand <- bared left right = Right (right, [], Nothing, spent)+  | Just Righthand <- bared left right = Right (left, [], Nothing, spent) joined left right spent = (\(term, (spent', bottom, _, made)) -> (term, reverse made, bottom, spent')) <$> goExpr left right (spent, Nothing, Map.empty, [])   where     goExpr :: Expression -> Expression -> Joining -> Either [Attribute] (Expression, Joining)@@ -61,8 +64,6 @@     goArgument :: Argument -> Argument -> Joining -> Either [Attribute] (Argument, Joining)     goArgument (ArTau attr one) (ArTau attr' two) joining       | attr == attr' = first (ArTau attr) <$> goExpr one two joining-    goArgument (ArAlpha alpha one) (ArAlpha alpha' two) joining-      | alpha == alpha' = first (ArAlpha alpha) <$> goExpr one two joining     goArgument one two joining = same one two joining     goBindings :: [Binding] -> [Binding] -> Joining -> Either [Attribute] ([Binding], Joining)     goBindings [] [] joining = Right ([], joining)@@ -98,11 +99,23 @@         goFacedBinding bd = pure bd         goFacedArgument :: Argument -> State Joining Argument         goFacedArgument (ArTau attr expr) = ArTau attr <$> goFaced expr-        goFacedArgument (ArAlpha alpha expr) = ArAlpha alpha <$> goFaced expr     picked :: (Int, Int) -> Joining -> (Int, Joining)     picked pair joining@(spent', bottom, names, made) = case Map.lookup pair names of       Just name -> (name, joining)       Nothing -> (succ spent', (succ spent', bottom, Map.insert pair (succ spent') names, (succ spent', pair) : made))++bared :: Expression -> Expression -> Maybe Side+bared left right+  | bare left && taken right = Just Lefthand+  | bare right && taken left = Just Righthand+  | otherwise = Nothing+  where+    bare :: Expression -> Bool+    bare (ExFormation [BiLambda (FnSymbol _)]) = True+    bare _ = False+    taken :: Expression -> Bool+    taken ExTermination = False+    taken side = not (bare side)  forked :: Function -> Either Int Bytes -> (Expression, Expression) -> (Expression, Expression) -> Either Refusal Expression forked func condition (leftName, left) (rightName, right) = do
src/Functions.hs view
@@ -114,7 +114,6 @@   case expr' of     DataObject _ bytes -> pure (TeBytes bytes)     ExApplication (BaseObject "bytes") (ArTau AtPhi (ExFormation bds)) | Just bytes <- delta bds -> pure (TeBytes bytes)-    ExApplication (BaseObject "bytes") (ArAlpha (Alpha 0) (ExFormation bds)) | Just bytes <- delta bds -> pure (TeBytes bytes)     ExFormation bds | Just bytes <- delta bds -> pure (TeBytes bytes)     _ -> throwIO (userError "Only data objects and bytes are supported by 'dataize' function now")   where@@ -329,7 +328,6 @@     rhos _ _ = False     renameArgument :: Map.Map Attribute Attribute -> Int -> Argument -> Argument     renameArgument changes depth (ArTau attr expr) = ArTau attr (renameExpression changes depth expr)-    renameArgument changes depth (ArAlpha alpha expr) = ArAlpha alpha (renameExpression changes depth expr)     freshAttr :: Set.Set Attribute -> IO Attribute     freshAttr unavailable = do       term <- _randomTau [] subst
src/LaTeX.hs view
@@ -95,7 +95,6 @@     meetInBindings (_ : bds) target = meetInBindings bds target     argExpr :: Argument -> Expression     argExpr (ArTau _ ex) = ex-    argExpr (ArAlpha _ ex) = ex  meetInExpressions :: [Expression] -> LatexContext -> [Expression] meetInExpressions exprs LatexContext{..} = go exprs 1@@ -319,11 +318,6 @@   toLaTeX PA_LAMBDA'{..} = PA_LAMBDA' (piped func)   toLaTeX PA_VOID{..} = PA_VOID (toLaTeX attr) arrow void   toLaTeX PA_TAU{..} = PA_TAU (toLaTeX attr) arrow (toLaTeX expr)-  toLaTeX PA_ALPHA{..} =-    let subscript = case alpha of-          AL_IDX _ n -> render n-          AL_META _ mt -> render (hd mt) <> rest mt-     in PA_TAU (AT_LABEL ("\\phiTerminal{\\alpha_{" <> subscript <> "}}")) arrow (toLaTeX expr)   toLaTeX PA_FORMATION{..} = PA_FORMATION (toLaTeX attr) (map toLaTeX voids) arrow (toLaTeX expr)   toLaTeX PA_META_DELTA{..} = toLaTeX (PA_META_DELTA' meta)   toLaTeX PA_META_DELTA'{..} = PA_META_DELTA' (toLaTeX meta)@@ -362,15 +356,7 @@ instance ToLaTeX APP_ARGUMENT where   toLaTeX (AA_TAU tau) = AA_TAU (toLaTeX tau)   toLaTeX (AA_TAUS taus) = AA_TAUS (toLaTeX taus)-  toLaTeX (AA_EXPRS args) = AA_EXPRS (toLaTeX args) -instance ToLaTeX APP_ARG where-  toLaTeX APP_ARG{..} = APP_ARG (toLaTeX expr) (toLaTeX args)--instance ToLaTeX APP_ARGS where-  toLaTeX AAS_EXPR{..} = AAS_EXPR eol tab (toLaTeX expr) (toLaTeX args)-  toLaTeX args = args- instance ToLaTeX T.Text where   toLaTeX = T.concatMap escape     where@@ -397,9 +383,7 @@   toLaTeX ST_ATTRIBUTES{..} = ST_ATTRIBUTES (map toLaTeX attrs)  instance ToLaTeX NUMBER where-  toLaTeX IDX_META{..} = IDX_META (toLaTeX meta)   toLaTeX LENGTH{..} = LENGTH (toLaTeX binding)-  toLaTeX DOMAIN{..} = DOMAIN (toLaTeX binding)   toLaTeX literal@LITERAL{} = literal  instance ToLaTeX COMPARABLE where
src/Lambdas.hs view
@@ -350,7 +350,6 @@     goBinding _ = False     goArgument :: Argument -> Bool     goArgument (ArTau _ expr) = goExpr expr-    goArgument (ArAlpha _ expr) = goExpr expr     goBytes :: Bytes -> Bool     goBytes (BtMeta _) = True     goBytes (BtAny _) = True@@ -447,7 +446,6 @@     goBinding bd = bd     goArgument :: Argument -> Argument     goArgument arg@(ArTau attr expr) = intact expr arg (ArTau attr) (goExpr expr)-    goArgument arg@(ArAlpha alpha expr) = intact expr arg (ArAlpha alpha) (goExpr expr)     dispatched :: Expression -> Bool     dispatched (ExDispatch _ _) = True     dispatched (ExApplication expr _) = dispatched expr@@ -496,7 +494,6 @@     goBinding bd = pure bd     goArgument :: Argument -> IO Argument     goArgument (ArTau attr expr) = ArTau attr <$> goExpr expr-    goArgument (ArAlpha alpha expr) = ArAlpha alpha <$> goExpr expr  type Minting = (Int, [(Int, Bytes)]) @@ -517,4 +514,3 @@     goBinding _ bd = pure bd     goArgument :: Argument -> State Minting Argument     goArgument arg@(ArTau attr expr) = intact expr arg (ArTau attr) <$> goExpr expr-    goArgument arg@(ArAlpha alpha expr) = intact expr arg (ArAlpha alpha) <$> goExpr expr
src/Lining.hs view
@@ -43,29 +43,19 @@  instance ToSingleLine PAIR where   toSingleLine PA_TAU{..} = PA_TAU attr arrow (toSingleLine expr)-  toSingleLine PA_ALPHA{..} = PA_ALPHA alpha arrow (toSingleLine expr)   toSingleLine PA_FORMATION{..} = PA_FORMATION attr voids arrow (toSingleLine expr)   toSingleLine pair = pair  instance ToSingleLine APP_ARGUMENT where   toSingleLine (AA_TAU tau) = AA_TAU (toSingleLine tau)   toSingleLine (AA_TAUS taus) = AA_TAUS (toSingleLine taus)-  toSingleLine (AA_EXPRS args) = AA_EXPRS (toSingleLine args) -instance ToSingleLine APP_ARG where-  toSingleLine APP_ARG{..} = APP_ARG (toSingleLine expr) (toSingleLine args)--instance ToSingleLine APP_ARGS where-  toSingleLine AAS_EXPR{..} = AAS_EXPR NO_EOL TAB' (toSingleLine expr) (toSingleLine args)-  toSingleLine args = args- instance ToSingleLine SET where   toSingleLine ST_BINDING{..} = ST_BINDING (toSingleLine binding)   toSingleLine st = st  instance ToSingleLine NUMBER where   toSingleLine LENGTH{..} = LENGTH (toSingleLine binding)-  toSingleLine DOMAIN{..} = DOMAIN (toSingleLine binding)   toSingleLine num = num  instance ToSingleLine COMPARABLE where
src/Margin.hs view
@@ -58,20 +58,10 @@ instance WithMargin APP_ARGUMENT where   withMargin' cfg (AA_TAU tau) = AA_TAU (withMargin' cfg tau)   withMargin' cfg (AA_TAUS taus) = AA_TAUS (withMargin' cfg taus)-  withMargin' cfg (AA_EXPRS args) = AA_EXPRS (withMargin' cfg args)  instance WithMargin APP_BINDING where   withMargin' cfg APP_BINDING{..} = APP_BINDING (withMargin' cfg pair) -instance WithMargin APP_ARG where-  withMargin' cfg@(extra, margin) arg@APP_ARG{..} =-    let single = toSingleLine arg-     in if fits extra margin single then single else APP_ARG (withMargin' cfg expr) (withMargin' cfg args)--instance WithMargin APP_ARGS where-  withMargin' cfg AAS_EXPR{..} = AAS_EXPR EOL tab (withMargin' cfg expr) (withMargin' cfg args)-  withMargin' _ args = args- instance WithMargin BINDING where   withMargin' cfg BI_PAIR{..} = BI_PAIR (withMargin' (commas cfg) pair) (withMargin' cfg bindings) tab     where@@ -95,11 +85,6 @@     let single = toSingleLine pa         extra' = extra + lengthOf attr + lengthOf arrow + 2         pa' = PA_TAU attr arrow (withMargin' (extra', margin) expr)-     in if fits extra margin single then single else pa'-  withMargin' (extra, margin) pa@PA_ALPHA{..} =-    let single = toSingleLine pa-        extra' = extra + lengthOf alpha + lengthOf arrow + 2-        pa' = PA_ALPHA alpha arrow (withMargin' (extra', margin) expr)      in if fits extra margin single then single else pa'   withMargin' (extra, margin) pa@PA_FORMATION{..} =     let single = toSingleLine pa
src/Matcher.hs view
@@ -14,7 +14,6 @@  data MetaValue   = MvAttribute Attribute-  | MvIndex Int   | MvBytes Bytes   | MvBindings [Binding]   | MvFunction Function@@ -61,13 +60,6 @@   | ptn == tgt = [substEmpty]   | otherwise = [] -matchAlpha :: Alpha -> Alpha -> [Subst]-matchAlpha (AlMeta meta) (Alpha idx) = [substSingle meta (MvIndex idx)]-matchAlpha (AlAny slot) (Alpha idx) = [substSlot slot (MvIndex idx)]-matchAlpha ptn tgt-  | ptn == tgt = [substEmpty]-  | otherwise = []- matchFunction :: Function -> Function -> [Subst] matchFunction (FnMeta meta) tgt   | named tgt = [substSingle meta (MvFunction tgt)]@@ -95,8 +87,6 @@  matchArgument :: Argument -> Argument -> [Subst] matchArgument (ArTau pattr pexp) (ArTau tattr texp) = combineMany (matchAttribute pattr tattr) (matchExpression' pexp texp)-matchArgument (ArAlpha palpha pexp) (ArAlpha talpha texp) = combineMany (matchAlpha palpha talpha) (matchExpression' pexp texp)-matchArgument _ _ = []  matchBindings :: [Binding] -> [Binding] -> [Subst] matchBindings [] [] = [substEmpty]@@ -126,7 +116,6 @@ matchExpression' (ExFormation pbs) (ExFormation tbs) = matchBindings pbs tbs matchExpression' (ExDispatch pexp pattr) (ExDispatch texp tattr) = combineMany (matchAttribute pattr tattr) (matchExpression' (pinned pattr tattr pexp) texp) matchExpression' (ExApplication pexp parg@(ArTau pattr _)) (ExApplication texp targ@(ArTau tattr _)) = combineMany (matchExpression' (pinned pattr tattr pexp) texp) (matchArgument parg targ)-matchExpression' (ExApplication pexp parg) (ExApplication texp targ) = combineMany (matchExpression' pexp texp) (matchArgument parg targ) matchExpression' (ExPhiAgain prefix idx expr) (ExPhiAgain prefix' idx' expr')   | prefix == prefix' && idx == idx' = matchExpression' expr expr'   | otherwise = []@@ -142,7 +131,6 @@     goExpr (ExFormation bds) = ExFormation (map goBinding bds)     goExpr (ExDispatch expr attr) = ExDispatch (goExpr expr) (goAttribute attr)     goExpr (ExApplication expr (ArTau attr arg)) = ExApplication (goExpr expr) (ArTau (goAttribute attr) (goExpr arg))-    goExpr (ExApplication expr (ArAlpha alpha arg)) = ExApplication (goExpr expr) (ArAlpha alpha (goExpr arg))     goExpr expr = expr     goBinding :: Binding -> Binding     goBinding (BiTau attr expr) = BiTau (goAttribute attr) (goExpr expr)@@ -169,7 +157,6 @@     below (ExFormation bds) rest = foldr inside rest bds     below (ExDispatch expr _) rest = go expr rest     below (ExApplication expr (ArTau _ arg)) rest = go expr (go arg rest)-    below (ExApplication expr (ArAlpha _ arg)) rest = go expr (go arg rest)     below _ rest = rest     inside :: Binding -> [Subst] -> [Subst]     inside (BiTau _ expr) rest = go expr rest@@ -192,7 +179,6 @@             ExFormation bds -> any inside bds             ExDispatch expr _ -> go expr             ExApplication expr (ArTau _ arg) -> go expr || go arg-            ExApplication expr (ArAlpha _ arg) -> go expr || go arg             _ -> False     inside :: Binding -> Bool     inside (BiTau _ expr) = go expr@@ -210,7 +196,6 @@     go (ExFormation pbs) (ExFormation tbs) = all (\pbd -> loose pbd || any (kin pbd) tbs) pbs     go (ExDispatch pexp pattr) (ExDispatch texp tattr) = same pattr tattr && go pexp texp     go (ExApplication pexp (ArTau pattr _)) (ExApplication texp (ArTau tattr _)) = same pattr tattr && go pexp texp-    go (ExApplication pexp (ArAlpha _ _)) (ExApplication texp (ArAlpha _ _)) = go pexp texp     go (ExPhiAgain{}) (ExPhiAgain{}) = True     go (ExPhiMeet{}) (ExPhiMeet{}) = True     go _ _ = False@@ -240,7 +225,6 @@     below (ExFormation bds) rest = foldr inside rest bds     below (ExDispatch expr _) rest = go expr rest     below (ExApplication expr (ArTau _ arg)) rest = go expr (go arg rest)-    below (ExApplication expr (ArAlpha _ arg)) rest = go expr (go arg rest)     below _ rest = rest     inside :: Binding -> [(Expression, a)] -> [(Expression, a)]     inside (BiTau _ expr) rest = go expr rest@@ -261,7 +245,6 @@     below (ExFormation bds) rest = foldr inside rest bds     below (ExDispatch expr _) rest = expr : rest     below (ExApplication expr (ArTau _ arg)) rest = expr : arg : rest-    below (ExApplication expr (ArAlpha _ arg)) rest = expr : arg : rest     below _ rest = rest     inside :: Binding -> [Expression] -> [Expression]     inside (BiTau _ expr) rest = expr : rest
src/Metas.hs view
@@ -64,9 +64,7 @@  instance Metas Argument where   metas (ArTau attr expr) = metas attr ++ metas expr-  metas (ArAlpha alpha expr) = metas alpha ++ metas expr   bare names (ArTau attr expr) = ArTau (bare names attr) (bare names expr)-  bare names (ArAlpha alpha expr) = ArAlpha (bare names alpha) (bare names expr)  instance Metas Binding where   metas (BiTau attr expr) = metas attr ++ metas expr@@ -88,13 +86,6 @@   metas _ = []   bare names (AtMeta name) = AtMeta (bare names name)   bare _ attr = attr--instance Metas Alpha where-  metas (AlMeta name) = metas name-  metas (AlAny slot) = metas slot-  metas _ = []-  bare names (AlMeta name) = AlMeta (bare names name)-  bare _ alpha = alpha  instance Metas Bytes where   metas (BtMeta name) = metas name
src/Morph.hs view
@@ -26,10 +26,10 @@ import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NE import qualified Data.Map.Strict as Map-import Data.Maybe (fromMaybe, isJust, listToMaybe, maybeToList)+import Data.Maybe (fromMaybe, isJust, isNothing, listToMaybe, maybeToList) import qualified Data.Set as Set import qualified Data.Text as T-import Deps (Acyclic (..), BuildTermFunc, BuildTermMethod, Evaluation (..), Judgment (..), SaveEvalFunc, SaveStepFunc, State (..), Term (..), dispatched, dontSaveStep, sized)+import Deps (Acyclic (..), BuildTermFunc, BuildTermMethod, Duration (..), Evaluation (..), Judgment (..), SaveEvalFunc, SaveStepFunc, State (..), Term (..), dispatched, dontSaveStep, sized) import Engine (Engine (..)) import GHC.Clock (getMonotonicTime) import GHC.Stats (GCDetails (..), RTSStats (..), getRTSStats, getRTSStatsEnabled)@@ -67,7 +67,7 @@   }  data Deadline = Deadline-  { _seconds :: Int+  { _seconds :: Duration   , _until :: Double   } @@ -101,7 +101,7 @@  type Store answer = Map.Map Int [(Expression, answer)] -data Facts = Facts (IORef (Store Expression)) (IORef Lodgings)+data Facts = Facts (IORef (Store Expression)) (IORef Lodgings) (IORef (Store Expression))  data Lodging = Lodging [(Expression, Attribute)] [(Attribute, Expression)] @@ -150,7 +150,7 @@   | Cycles Int   | Nodes Int   | Memory Int-  | Seconds Int+  | Seconds Duration  data ReduceException   = OutOfSteps Budget@@ -177,7 +177,7 @@   show (OutOfSteps (Memory limit)) =     printf "Evaluation did not finish before reaching the limit of memory: --max-memory=%s" (sized limit)   show (OutOfSteps (Seconds limit)) =-    printf "Evaluation did not finish before reaching the limit of seconds: --max-seconds=%d" limit+    printf "Evaluation did not finish before reaching the limit of seconds: --max-seconds=%s" limit._given   show (OutOfStepsAt budget _ _) = show (OutOfSteps budget)   show (Stuck func) = printf "No entry of --symbolic answers the λ function '%s'" (T.unpack func)   show (StuckAt func _ _) = show (Stuck func)@@ -221,8 +221,8 @@ tallied :: Maybe Int -> IO (Maybe Tally) tallied = traverse (\cap -> Tally cap <$> newIORef 0) -timed :: Maybe Int -> IO (Maybe Deadline)-timed = traverse (\cap -> Deadline cap . (+ fromIntegral cap) <$> getMonotonicTime)+timed :: Maybe Duration -> IO (Maybe Deadline)+timed = traverse (\cap -> Deadline cap . (+ cap._span) <$> getMonotonicTime)  charged :: ReduceContext -> IO () charged ctx = do@@ -245,7 +245,7 @@       now <- getMonotonicTime       when (now >= due) (expired ctx cap) -expired :: ReduceContext -> Int -> IO a+expired :: ReduceContext -> Duration -> IO a expired ctx cap = do   ctx._saveEval (EvTimeout ctx._nesting cap ctx._judgment ctx._site)   throwIO (OutOfSteps (Seconds cap))@@ -255,7 +255,7 @@   Nothing -> action   Just (Deadline cap due) -> do     now <- getMonotonicTime-    maybe (expired ctx cap) pure =<< timeout (ceiling (max 0 (due - now) * 1000000)) action+    maybe (expired ctx cap) pure =<< timeout (ceiling (min (fromIntegral (maxBound `div` 2 :: Int)) (max 0 (due - now) * 1000000))) action  memoized :: Maybe Acyclic -> IO (Maybe Memo) memoized (Just Plausible) = Just <$> (Memo <$> newIORef Map.empty <*> newIORef Map.empty <*> newIORef 0 <*> newIORef 0 <*> (Kin <$> newIORef (Spots Map.empty Map.empty) <*> newIORef Map.empty <*> newIORef Map.empty) <*> newIORef Map.empty)@@ -353,7 +353,6 @@     goBinding _ bd = pure (bd, Map.empty)     goArgument :: IORef (Map.Map Int [(Expression, Abstraction)]) -> Argument -> IO (Argument, Map.Map Int Expression)     goArgument cache arg@(ArTau attr expr) = first (intact expr arg (ArTau attr)) <$> goExpr cache expr-    goArgument cache arg@(ArAlpha alpha expr) = first (intact expr arg (ArAlpha alpha)) <$> goExpr cache expr  kindle :: Sides -> Maybe Memo -> Expression -> Firing -> Answer -> IO () kindle store (Just (Memo _ _ _ _ (Kin places likes _) _)) form firing answer = do@@ -472,7 +471,6 @@     goBinding bd = pure bd     goArgument :: Argument -> IO Argument     goArgument arg@(ArTau attr expr) = intact expr arg (ArTau attr) <$> goExpr expr-    goArgument arg@(ArAlpha alpha expr) = intact expr arg (ArAlpha alpha) <$> goExpr expr  renamedSymbol :: ReduceContext -> Renaming -> Int -> IO Int renamedSymbol ctx renaming@(Renaming table _ visiting _) idx = do@@ -572,10 +570,10 @@ recited ctx = mapM_ (\(term, source) -> ctx._saveEval (EvRecalled ctx._nesting term source))  factual :: IO Facts-factual = Facts <$> newIORef Map.empty <*> newIORef (Lodgings Map.empty Map.empty)+factual = Facts <$> newIORef Map.empty <*> newIORef (Lodgings Map.empty Map.empty) <*> newIORef Map.empty  noted :: ReduceContext -> Expression -> Expression -> IO ()-noted ctx object source = forM_ ctx._facts $ \(Facts facts lodgings) -> do+noted ctx object source = forM_ ctx._facts $ \(Facts facts lodgings _) -> do   known <- (Just source ==) . lookup object . Map.findWithDefault [] (hashExpression object) <$> readIORef facts   unless known $ do     modifyIORef' facts (Map.insertWith (++) (hashExpression object) [(object, source)])@@ -604,11 +602,11 @@  remembering :: Maybe Facts -> Expression -> IO Bool remembering Nothing _ = pure False-remembering (Just (Facts facts _)) term = isJust . lookup term . Map.findWithDefault [] (hashExpression term) <$> readIORef facts+remembering (Just (Facts facts _ _)) term = isJust . lookup term . Map.findWithDefault [] (hashExpression term) <$> readIORef facts  traced :: Maybe Facts -> Expression -> IO (Maybe (Expression, [(Expression, Expression)])) traced Nothing _ = pure Nothing-traced (Just (Facts facts lodgings)) form = do+traced (Just (Facts facts lodgings _)) form = do   known <- readIORef facts   index <- readIORef lodgings   pure (go index known [] form)@@ -666,7 +664,7 @@  voided :: ReduceContext -> Expression -> IO (Maybe [Attribute]) voided ReduceContext{_facts = Nothing} _ = pure Nothing-voided ctx@ReduceContext{_facts = Just (Facts facts _)} form@(ExFormation bds) = do+voided ctx@ReduceContext{_facts = Just (Facts facts _ _)} form@(ExFormation bds) = do   known <- readIORef facts   case lookup form (Map.findWithDefault [] (hashExpression form) known) of     Just source -> do@@ -760,16 +758,17 @@   look <- resolver ctx._sides   depth <- gauge ctx._sides   start <- maybe (pure Map.empty) readIORef (searching ctx._memo)-  (hits, kept) <- awaited ctx (evaluate (forced (goHits look depth start (succ ctx._maxLoops) (Map.findWithDefault [] (digest mode form) ctx._entered))))+  known <- maybe (pure Map.empty) (\(Facts facts _ _) -> readIORef facts) ctx._facts+  (hits, kept) <- awaited ctx (evaluate (forced (goHits look depth (sibling known (origins known form)) start (succ ctx._maxLoops) (Map.findWithDefault [] (digest mode form) ctx._entered))))   mapM_ (\ref -> writeIORef ref (bounded kept)) (searching ctx._memo)   pure hits   where-    goHits :: (T.Text -> Maybe Expression) -> (T.Text -> Maybe Int) -> Searched -> Int -> [Expression] -> ([Expression], Searched)-    goHits _ _ kept 0 _ = ([], kept)-    goHits _ _ kept _ [] = ([], kept)-    goHits look depth kept wanted (before : rest) = case repeated look depth mode before kept of-      (True, kept') -> first (before :) (goHits look depth kept' (pred wanted) rest)-      (False, kept') -> goHits look depth kept' wanted rest+    goHits :: (T.Text -> Maybe Expression) -> (T.Text -> Maybe Int) -> (Expression -> Bool) -> Searched -> Int -> [Expression] -> ([Expression], Searched)+    goHits _ _ _ kept 0 _ = ([], kept)+    goHits _ _ _ kept _ [] = ([], kept)+    goHits look depth kin kept wanted (before : rest) = case repeated look depth kin mode before kept of+      (True, kept') -> first (before :) (goHits look depth kin kept' (pred wanted) rest)+      (False, kept') -> goHits look depth kin kept' wanted rest     forced :: ([Expression], Searched) -> ([Expression], Searched)     forced result@(hits, kept) = length hits `seq` kept `seq` result     bounded :: Searched -> Searched@@ -778,11 +777,58 @@       | otherwise = kept     searching :: Maybe Memo -> Maybe (IORef Searched)     searching = fmap (\(Memo _ _ _ _ _ searched) -> searched)-    repeated :: (T.Text -> Maybe Expression) -> (T.Text -> Maybe Int) -> Acyclic -> Expression -> Searched -> (Bool, Searched)-    repeated look _ Proven before kept = (alike' look form before, kept)-    repeated look depth Plausible before kept+    repeated :: (T.Text -> Maybe Expression) -> (T.Text -> Maybe Int) -> (Expression -> Bool) -> Acyclic -> Expression -> Searched -> (Bool, Searched)+    repeated look _ _ Proven before kept = (alike' look form before, kept)+    repeated look depth kin Plausible before kept+      | kin before && not (atomic form) = (True, kept)+      | kin before && ctx._judgment /= Morphing && not (shrunk look before) = (True, kept)       | atomic form = akin'' look depth kept before form       | otherwise = within'' look kept before form+    shrunk :: (T.Text -> Maybe Expression) -> Expression -> Bool+    shrunk look (ExFormation above) = any (held look [body | BiTau attr body <- above, attr /= AtRho]) (changed above form)+    shrunk _ _ = False+    changed :: [Binding] -> Expression -> [Expression]+    changed above (ExFormation bds) = [body | BiTau attr body <- bds, attr /= AtRho, BiTau attr body `notElem` above]+    changed _ _ = []+    held :: (T.Text -> Maybe Expression) -> [Expression] -> Expression -> Bool+    held look roots part = goHeld Set.empty roots+      where+        wanted :: [Expression]+        wanted = part : maybe [] (maybeToList . look) (metaName part)+        metaName :: Expression -> Maybe T.Text+        metaName (ExMeta name) = Just name+        metaName _ = Nothing+        goHeld :: Set.Set Int -> [Expression] -> Bool+        goHeld _ [] = False+        goHeld seen (term : rest)+          | term `elem` wanted = True+          | Set.member (hashExpression term) seen = goHeld seen rest+          | otherwise = goHeld (Set.insert (hashExpression term) seen) (parts term ++ rest)+        parts :: Expression -> [Expression]+        parts (ExMeta name) = maybeToList (look name)+        parts (ExApplication callee (ArTau _ arg)) = [callee, arg]+        parts (ExDispatch inner _) = [inner]+        parts (ExFormation bds) = [body | BiTau attr body <- bds, attr /= AtRho]+        parts _ = []+    sibling :: Store Expression -> [Expression] -> Expression -> Bool+    sibling _ [] _ = False+    sibling known own before = any (`elem` own) (origins known before)+    origins :: Store Expression -> Expression -> [Expression]+    origins known start = List.nub (goOrigins Set.empty [(Map.size known, Set.empty, start, [])])+      where+        goOrigins :: Set.Set (Int, [Attribute]) -> [(Int, Set.Set Int, Expression, [Attribute])] -> [Expression]+        goOrigins _ [] = []+        goOrigins seen ((budget, path, term@(ExFormation _), attrs) : rest)+          | budget > 0 && Set.notMember (hashExpression term) path && Set.notMember (hashExpression term, attrs) seen =+              case foldr (goSource (pred budget, Set.insert (hashExpression term) path) attrs) ([], rest) [source | (object, source) <- Map.findWithDefault [] (hashExpression term) known, object == term] of+                (found, pending) -> found ++ goOrigins (Set.insert (hashExpression term, attrs) seen) pending+        goOrigins seen (_ : rest) = goOrigins seen rest+        goSource :: (Int, Set.Set Int) -> [Attribute] -> Expression -> ([Expression], [(Int, Set.Set Int, Expression, [Attribute])]) -> ([Expression], [(Int, Set.Set Int, Expression, [Attribute])])+        goSource _ attrs ExRoot (found, pending) = (List.foldl' ExDispatch ExRoot attrs : found, pending)+        goSource trail attrs (ExApplication target _) acc = goSource trail attrs target acc+        goSource trail attrs (ExDispatch target attr) acc = goSource trail (attr : attrs) target acc+        goSource (budget, path) attrs source@(ExFormation _) (found, pending) = (found, (budget, path, source, attrs) : pending)+        goSource _ _ _ acc = acc     atomic :: Expression -> Bool     atomic (ExFormation bds) = any isLambda bds     atomic _ = False@@ -824,7 +870,7 @@       (term, entered) <- severing expr univ state =<< parking seq state (universed univ caller{_judgment = Morphing})       ctx <- opening Morphing =<< deeper entered       parking seq state $ do-        reached <- maybe (inferred term univ state ctx ctx._engine._morphing) (\raise -> pure (Just (In.Answered (Morphing, "raise") raise, state))) (raised term)+        reached <- maybe (maybe (inferred term univ state ctx ctx._engine._morphing) (unknown ctx) (dimmed term)) (\raise -> pure (Just (In.Answered (Morphing, "raise") raise, state))) (raised term)         case reached of           Just (In.Answered step built, state') -> do             when owner (ctx._saveEval (EvMorphed ctx._nesting built))@@ -839,6 +885,15 @@         raised (ExDispatch target@(ExFormation _) _)           | thrown caller._raising target = Just target         raised _ = Nothing+        dimmed :: Expression -> Maybe Expression+        dimmed term@(ExDispatch (ExFormation bds) _)+          | [BiLambda (FnSymbol _)] <- filter isLambda bds = Just term+        dimmed _ = Nothing+        unknown :: ReduceContext -> Expression -> IO (Maybe (In.Conclusion Expression, State))+        unknown ctx term = do+          fresh <- coined ctx+          ctx._saveEval (EvOpaqued ctx._nesting fresh term)+          pure (Just (In.Answered (Morphing, "opaque") (ExFormation [BiLambda (FnSymbol fresh)]), state))  morph :: Expression -> State -> ReduceContext -> IO (Expression, [Rewritten], State) morph universe state caller@ReduceContext{..} = do@@ -894,10 +949,26 @@ onward seq state (In.Normalized step) univ expr' ctx = do   expr <- shared ctx expr'   labelled <- leadsTo seq step expr ctx-  normal@(term, _) <- normalized expr labelled ctx-  unless (term `elem` [expr, bare expr]) (ctx._saveEval (EvNormalized ctx._nesting (rooted expr) term))-  pure (normal, state)+  if fed expr+    then do+      symbol <- coined ctx+      let answer = ExFormation [BiLambda (FnSymbol symbol)]+      ctx._saveEval (EvFed ctx._nesting symbol (rooted expr))+      seq' <- leadsTo labelled (Morphing, "fed") answer ctx+      pure ((answer, seq'), state)+    else do+      normal@(term, _) <- normalized expr labelled ctx+      unless (term `elem` [expr, bare expr]) (ctx._saveEval (EvNormalized ctx._nesting (rooted expr) term))+      pure (normal, state)   where+    fed :: Expression -> Bool+    fed (ExApplication inner (ArTau AtRho _)) = fed inner+    fed (ExApplication inner _) = symbolic inner+    fed _ = False+    symbolic :: Expression -> Bool+    symbolic (ExApplication inner _) = symbolic inner+    symbolic (ExFormation [BiLambda (FnSymbol _)]) = True+    symbolic _ = False     bare :: Expression -> Expression     bare (ExApplication inner _) = bare inner     bare inner = inner@@ -927,7 +998,6 @@     goArgument :: Argument -> IO Argument     goArgument arg@(ArTau AtRho _) = pure arg     goArgument arg@(ArTau attr expr) = intact expr arg (ArTau attr) <$> (goValue =<< go expr)-    goArgument arg@(ArAlpha alpha expr) = intact expr arg (ArAlpha alpha) <$> (goValue =<< go expr)     goValue :: Expression -> IO Expression     goValue value@(ExMeta _) = pure value     goValue value@(ExApplication inner (ArTau AtRho _))@@ -951,7 +1021,6 @@     growing (ExMeta _) = True     growing (ExDispatch inner _) = not (path inner) || growing inner     growing (ExApplication inner (ArTau _ arg)) = growing inner || growing arg-    growing (ExApplication inner (ArAlpha _ arg)) = growing inner || growing arg     growing _ = False     path :: Expression -> Bool     path (ExDispatch inner _) = path inner@@ -959,7 +1028,6 @@     path _ = False     closed :: Expression -> Bool     closed (ExApplication inner (ArTau _ arg)) = closed inner && closed arg-    closed (ExApplication inner (ArAlpha _ arg)) = closed inner && closed arg     closed (ExDispatch inner _) = closed inner     closed (ExFormation _) = True     closed ExRoot = True@@ -1013,10 +1081,9 @@               whole._saveEval (EvApplied whole._nesting whole._judgment (called whole._universe redex) object whole._site)               known <- remembering whole._facts head'               when (known && copied bds) (noted whole object redex)-    made taken _ _ whole redex@(ExApplication _ (ArTau AtRho _)) object@(ExFormation bds)-      | copied bds = do-          pending <- readIORef taken-          forM_ (lookup redex (Map.findWithDefault [] (hashExpression redex) pending)) (noted whole object)+    made taken _ _ whole redex@(ExApplication _ (ArTau AtRho _)) object@(ExFormation bds) = do+      pending <- readIORef taken+      forM_ (lookup redex (Map.findWithDefault [] (hashExpression redex) pending)) (if copied bds then noted whole object else located whole object)     made taken peeled _ whole redex@(ExDispatch target attr) object       | attr /= AtRho = do           stripped peeled whole target attr@@ -1031,10 +1098,9 @@         left inner = ExFormation [bd | bd <- inner, attributeFromBinding bd /= Just attr]     stripped _ _ _ _ = pure ()     dispatched :: IORef (Store Expression) -> IORef (Store Expression) -> ReduceContext -> Expression -> Expression -> IO ()-    dispatched taken peeled whole redex object@(ExApplication (ExFormation bds) (ArTau AtRho _))-      | copied bds = sourced peeled whole redex >>= mapM_ (\path -> modifyIORef' taken (Map.insertWith (++) (hashExpression object) [(object, path)]))-    dispatched _ peeled whole redex object@(ExFormation bds)-      | copied bds = sourced peeled whole redex >>= mapM_ (noted whole object)+    dispatched taken peeled whole redex object@(ExApplication (ExFormation _) (ArTau AtRho _)) =+      sourced peeled whole redex >>= mapM_ (\path -> modifyIORef' taken (Map.insertWith (++) (hashExpression object) [(object, path)]))+    dispatched _ peeled whole redex object@(ExFormation bds) = sourced peeled whole redex >>= mapM_ (if copied bds then noted whole object else located whole object)     dispatched taken peeled whole redex (ExApplication name@(ExMeta _) rho@(ArTau AtRho _)) = do       side <- opened whole._sides name       case side of@@ -1050,8 +1116,14 @@       Nothing -> do         known <- remembering whole._facts target         held <- readIORef peeled-        pure (if known then Just redex else (`ExDispatch` attr) <$> lookup target (Map.findWithDefault [] (hashExpression target) held))+        plain <- maybe (pure Map.empty) (\(Facts _ _ places) -> readIORef places) whole._facts+        let found = lookup target . Map.findWithDefault [] (hashExpression target)+        pure (if known then Just redex else (`ExDispatch` attr) <$> (found held <|> found plain))     sourced _ _ _ = pure Nothing+    located :: ReduceContext -> Expression -> Expression -> IO ()+    located whole object source = forM_ whole._facts $ \(Facts _ _ places) -> do+      held <- readIORef places+      when (isNothing (lookup object (Map.findWithDefault [] (hashExpression object) held))) (writeIORef places (Map.insertWith (++) (hashExpression object) [(object, source)] held))     copied :: [Binding] -> Bool     copied bds = boxed bds || isJust (lambda bds)     worldly :: Maybe Expression -> Expression -> Maybe Expression
src/Parser.hs view
@@ -13,8 +13,6 @@   , parseAttribute   , parseAttributeThrows   , ParserException (..)-  , parseAlpha-  , parseIndex   , parseNumber   , parseNumberThrows   , parseBinding@@ -27,7 +25,7 @@ import AST import Bytes (nonFiniteBts, nonFiniteOf, numToBts, strToBts) import Control.Exception (Exception)-import Control.Monad (void, when)+import Control.Monad (when) import Control.Monad.Trans.State.Strict (StateT, evalStateT, get, put) import Data.Char (isAsciiLower, isAsciiUpper, isDigit) import Data.Scientific (scientific, toRealFloat)@@ -60,15 +58,13 @@  data PhiParser = PhiParser   { _attribute :: Parsec Void String Attribute-  , _alpha :: Parsec Void String Alpha-  , _index :: Parsec Void String (Either Slot T.Text)   , _binding :: Parsec Void String Binding   , _expression :: Parsec Void String Expression   , _string :: Parsec Void String String   }  phiParser :: PhiParser-phiParser = PhiParser (free attribute) (free alpha) (free indexVar) (free binding) (free expression) (free quotedStr)+phiParser = PhiParser (free attribute) (free binding) (free expression) (free quotedStr)   where     free :: Parser a -> Parsec Void String a     free parser = evalStateT parser Free@@ -407,30 +403,12 @@     ]     <?> "attribute" -indexVar :: Parser (Either Slot T.Text)-indexVar = metaVar 'i' "𝑖"--alpha :: Parser Alpha-alpha = do-  _ <- twofold (symbol "~") (symbol "α")-  choice-    [ lexeme L.decimal >>= ranged-    , either AlAny AlMeta <$> indexVar-    ]-    <?> "alpha"-  where-    ranged :: Integer -> Parser Alpha-    ranged idx-      | idx > toInteger (maxBound :: Int) = fail (printf "the index of 'α%d' is too big, while it must fit into %d" idx (maxBound :: Int))-      | otherwise = pure (Alpha (fromInteger idx))- argument :: Parser Argument-argument =-  choice-    [ ArAlpha <$> try alpha <* arrow <*> expression-    , ArTau <$> attribute <* arrow <*> expression-    ]-    <?> "argument"+argument = do+  named <- option False (True <$ lookAhead (try (attribute >> arrow)))+  if named+    then ArTau <$> attribute <* arrow <*> expression+    else fail "An argument is given by the name of the attribute it goes to, as in 'f( x ↦ … )', since a positional one, 'α0 ↦ …' or 'f( … )', is not supported"  validatedBindings :: [Binding] -> Parser [Binding] validatedBindings bds = case uniqueBindings bds of@@ -501,13 +479,7 @@                 ExDispatch expr <$> attribute             , do                 _ <- symbol "("-                bds <--                  choice-                    [ lookAhead (try named) >> argument `sepBy1` symbol ","-                    , do-                        exprs <- expression `sepBy1` symbol ","-                        return (zipWith (ArAlpha . Alpha) [0 ..] exprs)-                    ]+                bds <- argument `sepBy1` symbol ","                 _ <- symbol ")"                 return (application expr bds)             , do@@ -518,9 +490,6 @@         exTail next     , return expr     ]-  where-    named :: Parser String-    named = choice [void (try alpha), void attribute] >> arrow  expression :: Parser Expression expression = do@@ -560,12 +529,6 @@  parseAttribute :: String -> Either String Attribute parseAttribute = parse' "attribute" attribute--parseAlpha :: String -> Either String Alpha-parseAlpha = parse' "alpha" alpha--parseIndex :: String -> Either String (Either Slot T.Text)-parseIndex = parse' "index meta" indexVar  parseAttributeThrows :: String -> IO Attribute parseAttributeThrows attr = orThrow CouldNotParseAttribute (parseAttribute attr)
src/Printer.hs view
@@ -10,7 +10,6 @@   , printExpressionHidingRho'   , printExpressionWith   , printAttribute-  , printAlpha   , printBinding   , printBytes   , printFunction@@ -65,14 +64,6 @@   let (_, encoding, _, _) = defaultPrintConfig    in printAttribute' att encoding -printAlpha' :: Alpha -> Encoding -> String-printAlpha' index encoding = T.unpack $ render (withEncoding encoding (toCST index (0, NO_EOL) :: ALPHA))--printAlpha :: Alpha -> String-printAlpha index =-  let (_, encoding, _, _) = defaultPrintConfig-   in printAlpha' index encoding- printBinding' :: Binding -> PrintConfig -> String printBinding' bd = printExpression' (ExFormation [bd]) @@ -101,7 +92,6 @@  printMetaValue :: MetaValue -> PrintConfig -> String printMetaValue (MvAttribute att) (_, encoding, _, _) = printAttribute' att encoding-printMetaValue (MvIndex index) _ = show index printMetaValue (MvExpression ex) config = printExpression' ex config printMetaValue (MvBytes bts) _ = printBytes bts printMetaValue (MvBindings bds) config = printExpression' (ExFormation bds) config
src/Render.hs view
@@ -175,8 +175,6 @@   render A = "t"   render TAU = "𝜏"   render TAU' = "\\tau"-  render I = "𝑖"-  render I' = "i"   render B = "𝐵"   render B' = "B"   render D = "𝛿"@@ -192,14 +190,6 @@ instance Render META where   rendering META{..} = rendering excl <> rendering hd <> rendering rest -instance Render ALPHA' where-  render ALPHA = "α"-  render ALPHA' = "~"--instance Render ALPHA where-  rendering AL_IDX{..} = rendering sym <> rendering idx-  rendering AL_META{..} = rendering sym <> rendering meta- instance Render TAB where   render TAB{..} = T.replicate indent "  "   render TAB' = " "@@ -207,7 +197,6 @@  instance Render PAIR where   rendering PA_TAU{..} = rendering attr <> rendering SPACE <> rendering arrow <> rendering SPACE <> rendering expr-  rendering PA_ALPHA{..} = rendering alpha <> rendering SPACE <> rendering arrow <> rendering SPACE <> rendering expr   rendering PA_FORMATION{voids = [], attr, arrow, expr} = rendering (PA_TAU attr arrow expr)   rendering PA_FORMATION{..} = rendering attr <> "(" <> rendering voids <> ")" <> rendering SPACE <> rendering arrow <> rendering SPACE <> rendering expr   rendering PA_LAMBDA{..} = rendering LAMBDA <> rendering SPACE <> rendering DASHED_ARROW <> rendering SPACE <> rendering func@@ -237,15 +226,7 @@ instance Render APP_ARGUMENT where   rendering (AA_TAU tau) = rendering tau   rendering (AA_TAUS taus) = rendering taus-  rendering (AA_EXPRS args) = rendering args -instance Render APP_ARG where-  rendering APP_ARG{..} = rendering expr <> rendering args--instance Render APP_ARGS where-  rendering AAS_EMPTY = mempty-  rendering AAS_EXPR{..} = rendering COMMA <> rendering eol <> rendering tab <> rendering expr <> rendering args- instance Render EXPRESSION where   rendering EX_GLOBAL{..} = rendering global   rendering EX_XI{..} = rendering xi@@ -305,9 +286,7 @@   render OR = "\\phiText{or}"  instance Render NUMBER where-  rendering IDX_META{..} = rendering meta   rendering LENGTH{..} = "\\vert " <> rendering binding <> " \\vert"-  rendering DOMAIN{..} = "\\vert \\overline{ " <> rendering binding <> " } \\vert"   rendering LITERAL{..} = fromString (show num)  instance Render COMPARABLE where
src/Replacer.hs view
@@ -33,9 +33,6 @@ replaceArgument (ArTau attr expr, ptns, repls) func =   let (expr', ptns', repls') = func (expr, ptns, repls)    in (ArTau attr expr', ptns', repls')-replaceArgument (ArAlpha alpha expr, ptns, repls) func =-  let (expr', ptns', repls') = func (expr, ptns, repls)-   in (ArAlpha alpha expr', ptns', repls')  replaceExpression' :: ReplaceExpressionFunc' replaceExpression' state@(expr, ptns@(ptn : _ptns), repls@(repl : _repls))@@ -105,7 +102,6 @@     children (ExFormation bds) = [inner | BiTau _ inner <- bds]     children (ExDispatch inner _) = [inner]     children (ExApplication inner (ArTau _ arg)) = [inner, arg]-    children (ExApplication inner (ArAlpha _ arg)) = [inner, arg]     children (ExPhiMeet _ _ inner) = [inner]     children (ExPhiAgain _ _ inner) = [inner]     children _ = []
src/Rule.hs view
@@ -6,7 +6,7 @@ -- SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com -- SPDX-License-Identifier: MIT -module Rule (RuleContext (..), Step (..), domainOf, isFormation, isNF, matchExpressionWithRule, matchExpressionWithRule', meetCondition, normal, normalHeld, normalWith, presentIn, redex, xiFree) where+module Rule (RuleContext (..), Step (..), isFormation, isNF, matchExpressionWithRule, matchExpressionWithRule', meetCondition, normal, normalHeld, normalWith, presentIn, redex, xiFree) where  import AST import Builder@@ -130,28 +130,12 @@     (_, _) -> pure []  numToInt :: Y.Number -> Subst -> Maybe Int-numToInt (Y.MetaIndex meta) (Subst mp) = case M.lookup (Named meta) mp of-  Just (MvIndex idx) -> Just idx-  _ -> Nothing numToInt (Y.Length (BiMeta meta)) (Subst mp) = case M.lookup (Named meta) mp of   Just (MvBindings bds) -> Just (length bds)   _ -> Nothing-numToInt (Y.Domain (BiMeta meta)) (Subst mp) = case M.lookup (Named meta) mp of-  Just (MvBindings bds) -> Just (domainOf bds)-  _ -> Nothing numToInt (Y.Literal num) _ = Just num numToInt _ _ = Nothing -domainOf :: [Binding] -> Int-domainOf = length . filter notAsset-  where-    notAsset :: Binding -> Bool-    notAsset (BiDelta _) = False-    notAsset (BiLambda _) = False-    notAsset (BiVoid AtRho) = False-    notAsset (BiTau AtRho _) = False-    notAsset _ = True- _eq :: Y.Comparable -> Y.Comparable -> Subst -> RuleContext -> IO [Subst] _eq (Y.CmpNum left) (Y.CmpNum right) subst _ = case (numToInt left subst, numToInt right subst) of   (Just left_, Just right_) -> pure [subst | left_ == right_]@@ -218,7 +202,6 @@ xiFree ExTermination = True xiFree (ExMeta meta) = isName meta xiFree (ExApplication e (ArTau _ te)) = xiFree e && xiFree te-xiFree (ExApplication e (ArAlpha _ te)) = xiFree e && xiFree te xiFree (ExDispatch e _) = xiFree e xiFree _ = False @@ -382,7 +365,6 @@     goBinding _ = []     goArgument :: Argument -> [Expression]     goArgument (ArTau _ expr) = go expr-    goArgument (ArAlpha _ expr) = go expr  matchExpressionWithRule :: Expression -> Y.Rule -> RuleContext -> IO [Subst] matchExpressionWithRule expr rule = matchExpressionBy (deep rule) [substEmpty] expr rule
src/Sides.hs view
@@ -81,7 +81,6 @@         goBinding bd = pure bd         goArgument :: Argument -> IO Argument         goArgument arg@(ArTau attr expr) = intact expr arg (ArTau attr) <$> walk expr-        goArgument arg@(ArAlpha alpha expr) = intact expr arg (ArAlpha alpha) <$> walk expr  opened :: Sides -> Expression -> IO Expression opened store term = do
src/Slots.hs view
@@ -32,7 +32,6 @@  instance Slots Argument where   slots (ArTau attr expr) = slots attr ++ slots expr-  slots (ArAlpha alpha expr) = slots alpha ++ slots expr  instance Slots Binding where   slots (BiAny slot) = [slot]@@ -44,10 +43,6 @@  instance Slots Attribute where   slots (AtAny slot) = [slot]-  slots _ = []--instance Slots Alpha where-  slots (AlAny slot) = [slot]   slots _ = []  instance Slots Bytes where
src/Sodg.hs view
@@ -95,10 +95,7 @@       AtRho -> Right "ρ"       other -> patterned place (ExDispatch ExXi other)     argument :: Text -> Argument -> Either SodgException (Text, Expression)-    argument place = \case-      ArTau attr value -> (,value) <$> attribute place attr-      ArAlpha (Alpha idx) value -> Right ("α" <> T.pack (show idx), value)-      other -> patterned place (ExApplication ExXi other)+    argument place (ArTau attr value) = (,value) <$> attribute place attr     bytes :: Text -> Bytes -> Either SodgException Text     bytes place = \case       BtEmpty -> Right "--"
src/Sugar.hs view
@@ -64,19 +64,7 @@       | otherwise = Just (AA_TAU (APP_BINDING (goPair pair)))     goArgument (AA_TAUS binding) = case goArgBinding binding of       BI_EMPTY{} -> Nothing-      binding'-        | sugar == SWEET, Just args <- positional binding' -> Just (AA_EXPRS args)-        | otherwise -> Just (AA_TAUS binding')-    goArgument (AA_EXPRS args) = Just (AA_EXPRS (goAppArg args))-    positional :: BINDING -> Maybe APP_ARG-    positional (BI_PAIR (PA_ALPHA (AL_IDX _ 0) _ first) rest _) = APP_ARG first <$> following 1 rest-      where-        following :: Int -> BINDINGS -> Maybe APP_ARGS-        following _ BDS_EMPTY{} = Just AAS_EMPTY-        following next (BDS_PAIR eol' tab' (PA_ALPHA (AL_IDX _ index) _ arg) more)-          | index == next = AAS_EXPR eol' tab' arg <$> following (next + 1) more-        following _ _ = Nothing-    positional _ = Nothing+      binding' -> Just (AA_TAUS binding')     goArgBinding :: BINDING -> BINDING     goArgBinding empty@BI_EMPTY{} = empty     goArgBinding BI_META{..} = BI_META meta (goArgBindings bindings) tab@@ -89,14 +77,8 @@     goArgBindings BDS_PAIR{..}       | isRho pair = goArgBindings bindings       | otherwise = BDS_PAIR eol tab (goPair pair) (goArgBindings bindings)-    goAppArg :: APP_ARG -> APP_ARG-    goAppArg APP_ARG{..} = APP_ARG (goExpr expr) (goAppArgs args)-    goAppArgs :: APP_ARGS -> APP_ARGS-    goAppArgs AAS_EMPTY = AAS_EMPTY-    goAppArgs AAS_EXPR{..} = AAS_EXPR eol tab (goExpr expr) (goAppArgs args)     goPair :: PAIR -> PAIR     goPair PA_TAU{..} = PA_TAU attr arrow (goExpr expr)-    goPair PA_ALPHA{..} = PA_ALPHA alpha arrow (goExpr expr)     goPair PA_FORMATION{..} = case filter (not . rho) voids of       [] -> PA_TAU attr arrow (goExpr expr)       voids' -> PA_FORMATION attr voids' arrow (goExpr expr)@@ -108,7 +90,6 @@     sugared :: PAIR -> Bool     sugared PA_TAU{attr = AT_DELTA{}} = False     sugared PA_TAU{attr = AT_LAMBDA{}} = False-    sugared PA_ALPHA{} = False     sugared PA_FORMATION{voids = []} = True     sugared PA_FORMATION{} = False     sugared _ = True@@ -136,12 +117,6 @@     goArgument :: APP_ARGUMENT -> APP_ARGUMENT     goArgument (AA_TAU (APP_BINDING pair)) = AA_TAU (APP_BINDING (goPair pair))     goArgument (AA_TAUS binding) = AA_TAUS (goBinding binding)-    goArgument (AA_EXPRS arg) = AA_EXPRS (goAppArg arg)-    goAppArg :: APP_ARG -> APP_ARG-    goAppArg APP_ARG{..} = APP_ARG (goExpr expr) (goAppArgs args)-    goAppArgs :: APP_ARGS -> APP_ARGS-    goAppArgs AAS_EMPTY = AAS_EMPTY-    goAppArgs AAS_EXPR{..} = AAS_EXPR eol tab (goExpr expr) (goAppArgs args)     goBinding :: BINDING -> BINDING     goBinding BI_PAIR{..} = BI_PAIR (goPair pair) (goBindings bindings) tab     goBinding binding = binding@@ -150,7 +125,6 @@     goBindings bindings = bindings     goPair :: PAIR -> PAIR     goPair PA_TAU{..} = PA_TAU attr arrow (goExpr expr)-    goPair PA_ALPHA{..} = PA_ALPHA alpha arrow (goExpr expr)     goPair PA_FORMATION{..} = PA_FORMATION attr voids arrow (goExpr expr)     goPair pair = pair @@ -180,16 +154,6 @@       tausToPairs BDS_EMPTY{} = []       tausToPairs BDS_PAIR{..} = pair : tausToPairs bindings       tausToPairs (BDS_META _ _ mt _) = error $ "BDS_META " ++ show mt ++ " unexpected in tausToPairs"-  toSalty EX_APPLICATION{argument = AA_EXPRS args, ..} = toSalty (EX_APPLICATION expr space EOL (TAB indent) (AA_TAUS (argToBinding args tab)) EOL (TAB (indent - 1)) indent)-    where-      argToBinding :: APP_ARG -> TAB -> BINDING-      argToBinding APP_ARG{..} =-        BI_PAIR-          (PA_ALPHA (AL_IDX ALPHA 0) ARROW expr)-          (argsToBindings args 1 tab)-      argsToBindings :: APP_ARGS -> Int -> TAB -> BINDINGS-      argsToBindings AAS_EMPTY _ tab = BDS_EMPTY tab-      argsToBindings AAS_EXPR{..} idx tb = BDS_PAIR eol tb (PA_ALPHA (AL_IDX ALPHA idx) ARROW expr) (argsToBindings args (idx + 1) tb)   toSalty EX_NUMBER{num, tab = tab@TAB{..}, rhos} =     saltifyPrimitive       (toCST (BaseObject "number") (indent + 1, EOL))@@ -271,7 +235,6 @@  instance ToSalty PAIR where   toSalty PA_TAU{..} = PA_TAU attr arrow (toSalty expr)-  toSalty PA_ALPHA{..} = PA_ALPHA alpha arrow (toSalty expr)   toSalty PA_FORMATION{voids, attr, arrow, expr = EX_SINGLE{formation}} = toSalty (PA_FORMATION attr voids arrow formation)   toSalty PA_FORMATION{voids, attr, arrow, expr = EX_FORMATION{..}} =     PA_TAU attr arrow (toSalty (EX_FORMATION lsb eol tab (joinToBinding voids binding) eol' tab' rsb))@@ -292,7 +255,6 @@  instance ToSalty NUMBER where   toSalty LENGTH{..} = LENGTH (toSalty binding)-  toSalty DOMAIN{..} = DOMAIN (toSalty binding)   toSalty num = num  instance ToSalty COMPARABLE where
src/Tau.hs view
@@ -50,7 +50,6 @@  argumentLabels :: Argument -> Set Text argumentLabels (ArTau attr expr) = attrLabel attr <> exprLabels expr-argumentLabels (ArAlpha _ expr) = exprLabels expr  attrLabel :: Attribute -> Set Text attrLabel (AtLabel label) = Set.singleton label
src/XMIR.hs view
@@ -48,7 +48,6 @@ import Paths_phino (version) import Printer import Text.Printf (printf)-import qualified Text.Read as TR import Text.XML import qualified Text.XML.Cursor as C @@ -165,7 +164,6 @@   where     (as, texpr) = case arg of       ArTau attr value -> (printAttribute attr, value)-      ArAlpha alpha value -> (printAlpha alpha, value) expression expr _ = throwIO (UnsupportedExpression expr)  metaAttribute :: Attribute -> Bool@@ -497,7 +495,6 @@       name <- getAttr "name" cur       case name of         "λ" -> BiLambda . Function <$> lambdaName derived cur fqn-        ('α' : _) -> throwIO (InvalidXMIRFormat "Formation child @name can't start with α" cur)         "φ" -> BiTau AtPhi <$> xmirToFormation derived cur (name : fqn)         "ρ" -> BiTau AtRho <$> xmirToFormation derived cur (name : fqn)         ('+' : test) -> toAttr test cur >> BiTau (AtLabel (T.pack name)) <$> xmirToFormation derived cur (name : fqn)@@ -509,7 +506,6 @@       attr <- case name of         "φ" -> pure AtPhi         "ρ" -> pure AtRho-        ('α' : _) -> throwIO (InvalidXMIRFormat "Formation child @name can't start with α" cur)         ('+' : test) -> toAttr test cur >> pure (AtLabel (T.pack name))         ('-' : test) -> toAttr test cur >> pure (AtLabel (T.pack name))         _ -> toAttr name cur@@ -636,45 +632,35 @@           xmirToApplication derived head' (c C.$/ C.element (toName "o")) names  xmirToApplication :: Derived -> Expression -> [C.Cursor] -> [String] -> IO Expression-xmirToApplication derived = xmirToApplication' 0+xmirToApplication _ expr [] _ = pure expr+xmirToApplication derived expr (arg : args) fqn = do+  app <- applied+  xmirToApplication derived app args fqn   where-    xmirToApplication' :: Int -> Expression -> [C.Cursor] -> [String] -> IO Expression-    xmirToApplication' _ expr [] _ = pure expr-    xmirToApplication' idx expr (arg : args) fqn = do-      let app-            | hasAttr "name" arg = throwIO (InvalidXMIRFormat "Application argument can't have @name attribute" arg)-            | hasAttr "base" arg && hasText arg = throwIO (InvalidXMIRFormat "It's illegal in XMIR to have @base and text() at the same time" arg)-            | not (hasAttr "base" arg) = do-                key <- asToKey arg idx-                arg' <- xmirToFormation derived arg fqn-                pure (ExApplication expr (mkArg key arg'))-            | otherwise = do-                key <- asToKey arg idx-                arg' <- xmirToExpression derived arg fqn-                pure (ExApplication expr (mkArg key arg'))-      app' <- app-      xmirToApplication' (idx + 1) app' args fqn-    mkArg :: Either Alpha Attribute -> Expression -> Argument-    mkArg (Left alpha) expr = ArAlpha alpha expr-    mkArg (Right attr) expr = ArTau attr expr-    asToKey :: C.Cursor -> Int -> IO (Either Alpha Attribute)-    asToKey cur position+    applied :: IO Expression+    applied+      | hasAttr "name" arg = throwIO (InvalidXMIRFormat "Application argument can't have @name attribute" arg)+      | hasAttr "base" arg && hasText arg = throwIO (InvalidXMIRFormat "It's illegal in XMIR to have @base and text() at the same time" arg)+      | not (hasAttr "base" arg) = do+          key <- asToKey arg+          ExApplication expr . ArTau key <$> xmirToFormation derived arg fqn+      | otherwise = do+          key <- asToKey arg+          ExApplication expr . ArTau key <$> xmirToExpression derived arg fqn+    asToKey :: C.Cursor -> IO Attribute+    asToKey cur       | hasAttr "as" cur = do           as <- getAttr "as" cur           case as of-            'α' : rest' -> case TR.readMaybe rest' :: Maybe Integer of-              Just idx-                | all isDigit rest' && idx <= toInteger (maxBound :: Int) -> pure (Left (Alpha (fromInteger idx)))-              _ -> throwIO (InvalidXMIRFormat (printf "The attribute started with 'α' must be followed by a non-negative integer that fits into %d" (maxBound :: Int)) cur)+            'α' : _ -> throwIO (InvalidXMIRFormat (printf "The positional @as='%s' is not supported, since an application argument is given by the name of the attribute it goes to" as) cur)             "ρ" -> throwIO (InvalidXMIRFormat "The 'ρ' in @as attribute is illegal in XMIR" cur)-            _ -> Right <$> toAttr as cur-      | otherwise = pure (Left (Alpha position))+            _ -> toAttr as cur+      | otherwise = throwIO (InvalidXMIRFormat "Application argument must have @as attribute, since a positional argument is not supported" cur)  toAttr :: String -> C.Cursor -> IO Attribute toAttr attr cur = case attr of   "φ" -> pure AtPhi   "ρ" -> pure AtRho-  'α' : _ -> throwIO (InvalidXMIRFormat "α-index is not a valid dispatch attribute in XMIR" cur)   ch : _     | ch `notElem` ['a' .. 'z'] -> throwIO (InvalidXMIRFormat (printf "The attribute '%s' must start with ['a'..'z']" attr) cur)     | '.' `elem` attr -> throwIO (InvalidXMIRFormat "Attribute can't contain dots" cur)
src/Yaml.hs view
@@ -84,9 +84,6 @@             Right attr -> pure attr       ) -instance FromJSON Alpha where-  parseJSON = parseJSON' "Alpha" parseAlpha- instance FromJSON Bytes where   parseJSON = parseJSON' "Bytes" parseBytes @@ -99,21 +96,14 @@ instance FromJSON Number where   parseJSON v = case v of     Object o -> do-      validateYamlObject o ["length", "domain"]-      asum-        [ Length <$> o .: "length"-        , Domain <$> o .: "domain"-        ]+      validateYamlObject o ["length"]+      Length <$> o .: "length"     Number num       | toRational (round num :: Integer) /= toRational num -> fail (printf "Expected an integer, got a fractional number %s" (show num))       | (round num :: Integer) < toInteger (minBound :: Int) || (round num :: Integer) > toInteger (maxBound :: Int) -> fail (printf "The literal %s does not fit into Int" (show num))       | otherwise -> pure (Literal (round num))-    String txt -> case parseIndex (unpack txt) of-      Right (Right mt) -> pure (MetaIndex mt)-      Right (Left slot) -> pure (AnyIndex slot)-      Left err -> fail err     _ ->-      fail "Expected a numerable expression (object, number or index meta)"+      fail "Expected a numerable expression (object or number)"  instance FromJSON Comparable where   parseJSON (Number num)@@ -125,10 +115,9 @@     foldr1       (<|>)       [ CmpAttr <$> parseJSON v-      , CmpNum <$> parseJSON v       , CmpExpr <$> parseJSON v       ]-  parseJSON _ = fail "An argument of 'eq' or 'gt' is a number, an attribute, an expression, or an object of 'length' or 'domain'"+  parseJSON _ = fail "An argument of 'eq' or 'gt' is a number, an attribute, an expression, or an object of 'length'"  instance FromJSON Condition where   parseJSON = withObject "Condition" $ \v -> do@@ -291,10 +280,7 @@   parseJSON value = genericParseJSON defaultOptions value  data Number-  = MetaIndex Text-  | AnyIndex Slot-  | Length Binding-  | Domain Binding+  = Length Binding   | Literal Int   deriving (Eq, Generic, Show) @@ -365,10 +351,7 @@   slots (CmpExpr expr) = slots expr  instance Slots Number where-  slots (AnyIndex slot) = [slot]   slots (Length bd) = slots bd-  slots (Domain bd) = slots bd-  slots (MetaIndex _) = []   slots (Literal _) = []  instance Slots ExtraArgument where@@ -425,14 +408,9 @@   bare names (CmpExpr expr) = CmpExpr (bare names expr)  instance Metas Number where-  metas (MetaIndex named) = metas named-  metas (AnyIndex slot) = metas slot   metas (Length bd) = metas bd-  metas (Domain bd) = metas bd   metas (Literal _) = []-  bare names (MetaIndex named) = MetaIndex (bare names named)   bare names (Length bd) = Length (bare names bd)-  bare names (Domain bd) = Domain (bare names bd)   bare _ num = num  instance Metas ExtraArgument where
test-resources/cli/rules/swap-a.yaml view
@@ -3,4 +3,4 @@ --- name: swap-a pattern: ⟦ x -> !e1 ⟧-result: Q.a(!e1)+result: Q.a(k -> !e1)
test-resources/cli/rules/swap-b.yaml view
@@ -3,4 +3,4 @@ --- name: swap-b pattern: ⟦ x -> !e1 ⟧-result: Q.b(!e1)+result: Q.b(k -> !e1)
− test-resources/condition-packs/alpha-simple.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----expression: '[[ xxxx -> ? ]](~0 -> Q.y)'-pattern: '[[ !B1, !t1 -> ?, !B2 ]](α𝑖1 ↦ !e1)'-condition:-  eq:-    - 𝑖1-    - length: '!B1'
− test-resources/condition-packs/domain-meta-missing.yaml
@@ -1,10 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----expression: '[[ x -> $, w -> $ ]](~0 -> Q)'-pattern: '[[ !B1 ]](α𝑖1 ↦ Q)'-condition:-  not:-    gt:-      - domain: '!Bx'-      - '𝑖1'
− test-resources/condition-packs/gt-domain.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----expression: '[[ x -> $, w -> $ ]](~0 -> Q)'-pattern: '[[ !B1 ]](α𝑖1 ↦ Q)'-condition:-  gt:-    - domain: '!B1'-    - '𝑖1'
+ test-resources/condition-packs/gt-length.yaml view
@@ -0,0 +1,9 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+expression: '[[ x -> $, w -> $ ]](x -> Q)'+pattern: '[[ !B1 ]](!t1 -> Q)'+condition:+  gt:+    - length: '!B1'+    - 0
+ test-resources/condition-packs/gt-meta-missing.yaml view
@@ -0,0 +1,10 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+expression: '[[ x -> $, w -> $ ]](x -> Q)'+pattern: '[[ !B1 ]](!t1 -> Q)'+condition:+  not:+    gt:+      - length: '!Bx'+      - 0
test-resources/condition-packs/length-meta-missing.yaml view
@@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com # SPDX-License-Identifier: MIT ----expression: '[[ x -> Q.y, w -> $ ]](~0 -> Q)'-pattern: '[[ !B1 ]](α𝑖1 ↦ Q)'+expression: '[[ x -> Q.y, w -> $ ]](x -> Q)'+pattern: '[[ !B1 ]](!t1 -> Q)' condition:   not:     eq:
test-resources/condition-packs/length-non-meta-binding.yaml view
@@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com # SPDX-License-Identifier: MIT ----expression: '[[ x -> Q.y, w -> $ ]](~0 -> Q)'-pattern: '[[ !B1 ]](α𝑖1 ↦ Q)'+expression: '[[ x -> Q.y, w -> $ ]](x -> Q)'+pattern: '[[ !B1 ]](!t1 -> Q)' condition:   not:     eq:
test-resources/condition-packs/length.yaml view
@@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com # SPDX-License-Identifier: MIT ----expression: '[[ x -> Q.y, w -> $ ]](~0 -> Q)'-pattern: '[[ !B1 ]](α𝑖1 ↦ Q)'+expression: '[[ x -> Q.y, w -> $ ]](x -> Q)'+pattern: '[[ !B1 ]](!t1 -> Q)' condition:   eq:     - length: '!B1'
− test-resources/condition-packs/metaindex-missing.yaml
@@ -1,10 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----expression: '[[ ^ -> Q.x ]]'-pattern: '[[ !t1 -> !e1 ]]'-condition:-  not:-    eq:-      - 𝑖1-      - 0
test-resources/condition-packs/not-gt.yaml view
@@ -2,9 +2,9 @@ # SPDX-License-Identifier: MIT --- failure: true-expression: '[[ x -> $, w -> $ ]](~3 -> Q)'-pattern: '[[ !B1 ]](α𝑖1 ↦ Q)'+expression: '[[ x -> $, w -> $ ]](x -> Q)'+pattern: '[[ !B1 ]](!t1 -> Q)' condition:   gt:-    - domain: '!B1'-    - '𝑖1'+    - length: '!B1'+    - 3
− test-resources/condition-packs/ordinal.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----expression: '[[ x -> Q.y ]](~0 -> Q)'-pattern: '[[ !B1 ]](α𝑖1 ↦ !e1)'-condition:-  eq:-    - 𝑖1-    - 0
test-resources/cst/printing-packs/jeo.yaml view
@@ -4,23 +4,23 @@ --- expression: |   ⟦-    x ↦ Φ.x(Φ.jeo.opcode.lconst_0(-      9+    x ↦ Φ.x(a ↦ Φ.jeo.opcode.lconst_0(+      v ↦ 9     ),-    Φ.jeo.opcode.lstore(-      55,-      1+    b ↦ Φ.jeo.opcode.lstore(+      v ↦ 55,+      w ↦ 1     ),-    Φ.jeo.opcode.iconst_0(-      3+    c ↦ Φ.jeo.opcode.iconst_0(+      v ↦ 3     ),-    Φ.jeo.opcode.istore(-      54,-      3+    d ↦ Φ.jeo.opcode.istore(+      v ↦ 54,+      w ↦ 3     ),-    Φ.jeo.label(-      Φ.bytes(-        ⟦+    e ↦ Φ.jeo.label(+      v ↦ Φ.bytes(+        φ ↦ ⟦           Δ ⤍ 4C-31-32-38-34-34-34-35-32-36-37         ⟧       )@@ -28,9 +28,9 @@   ⟧ result: |-   Φ.x(-    Φ.jeo.opcode.lconst_0( 9.0 ),-    Φ.jeo.opcode.lstore( 55.0, 1.0 ),-    Φ.jeo.opcode.iconst_0( 3.0 ),-    Φ.jeo.opcode.istore( 54.0, 3.0 ),-    Φ.jeo.label( Φ.bytes( 4C-31-32-38-34-34-34-35-32-36-37:Δ ) )+    a ↦ Φ.jeo.opcode.lconst_0( v ↦ 9.0 ),+    b ↦ Φ.jeo.opcode.lstore( v ↦ 55.0, w ↦ 1.0 ),+    c ↦ Φ.jeo.opcode.iconst_0( v ↦ 3.0 ),+    d ↦ Φ.jeo.opcode.istore( v ↦ 54.0, w ↦ 3.0 ),+    e ↦ Φ.jeo.label( v ↦ Φ.bytes( φ ↦ 4C-31-32-38-34-34-34-35-32-36-37:Δ ) )   ):x
test-resources/cst/printing-packs/non-finite-doubles.yaml view
@@ -4,11 +4,11 @@ --- expression: |   [[-    nan -> Q.number(Q.bytes([[ D> 7F-F8-00-00-00-00-00-00 ]])),-    pinf -> Q.number(Q.bytes([[ D> 7F-F0-00-00-00-00-00-00 ]])),-    ninf -> Q.number(Q.bytes([[ D> FF-F0-00-00-00-00-00-00 ]])),-    with-rho -> Q.number(~0 -> Q.bytes([[ D> 7F-F8-00-00-00-00-00-00 ]]), ^ -> Q.x.y.z),-    payload -> Q.number(Q.bytes([[ D> 7F-F8-00-00-00-00-00-01 ]]))+    nan -> Q.number(@ -> Q.bytes(@ -> [[ D> 7F-F8-00-00-00-00-00-00 ]])),+    pinf -> Q.number(@ -> Q.bytes(@ -> [[ D> 7F-F0-00-00-00-00-00-00 ]])),+    ninf -> Q.number(@ -> Q.bytes(@ -> [[ D> FF-F0-00-00-00-00-00-00 ]])),+    with-rho -> Q.number(@ -> Q.bytes(@ -> [[ D> 7F-F8-00-00-00-00-00-00 ]]), ^ -> Q.x.y.z),+    payload -> Q.number(@ -> Q.bytes(@ -> [[ D> 7F-F8-00-00-00-00-00-01 ]]))   ]] result: |-   ⟦@@ -16,5 +16,5 @@     pinf ↦ Φ.pinf,     ninf ↦ Φ.ninf,     with-rho ↦ Φ.nan,-    payload ↦ Φ.number( Φ.bytes( 7F-F8-00-00-00-00-00-01:Δ ) )+    payload ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ 7F-F8-00-00-00-00-00-01:Δ ) )   ⟧
test-resources/cst/printing-packs/non-primitive-data-object.yaml view
@@ -3,6 +3,6 @@ # yamllint disable rule:line-length --- expression: |-  [[ x -> Q.foo(~0 -> Q.bytes([[ D> 3F-F0-00-00-00-00-00-00 ]])) ]]+  [[ x -> Q.foo(k -> Q.bytes(@ -> [[ D> 3F-F0-00-00-00-00-00-00 ]])) ]] result: |--  Φ.foo( Φ.bytes( 3F-F0-00-00-00-00-00-00:Δ ) ):x+  Φ.foo( k ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ) ):x
test-resources/cst/printing-packs/primitives-without-rhos.yaml view
@@ -4,8 +4,8 @@ --- expression: |   [[-    x -> Q.number(~0 -> Q.bytes([[ D> 3F-F0-00-00-00-00-00-00 ]]), ^ -> [[ t -> 42 ]], ^ -> Q.x.y.z),-    y -> Q.string(~0 -> Q.bytes([[ D> 68-65-79 ]]), ^ -> Q.x.y.z)+    x -> Q.number(@ -> Q.bytes(@ -> [[ D> 3F-F0-00-00-00-00-00-00 ]]), ^ -> [[ t -> 42 ]], ^ -> Q.x.y.z),+    y -> Q.string(@ -> Q.bytes(@ -> [[ D> 68-65-79 ]]), ^ -> Q.x.y.z)   ]] result: |-   ⟦ x ↦ 1.0, y ↦ "hey" ⟧
test-resources/cst/printing-packs/simple.yaml view
@@ -6,8 +6,8 @@   [[     foo -> [[       @ -> $.^.z,-      bar -> Q.y(5, "foo")+      bar -> Q.y(a -> 5, b -> "foo")     ]]   ]] result: |--  ⟦ φ ↦ ρ.z, bar ↦ Φ.y( 5.0, "foo" ) ⟧:foo+  ⟦ φ ↦ ρ.z, bar ↦ Φ.y( a ↦ 5.0, b ↦ "foo" ) ⟧:foo
test-resources/cst/to-ascii-packs/complex.yaml view
@@ -9,7 +9,7 @@       b ↦ Φ.org.ρ.φ,       c ↦ ξ.xyz(         q ↦ Φ.y,-        α0 ↦ ξ.a.b+        r ↦ ξ.a.b       ),       z ↦ ⟦         λ ⤍ Func,@@ -23,7 +23,7 @@   [[     number(a) -> [[       b -> Q.org.^.@,-      c -> xyz( q -> Q.y, ~0 -> a.b ),+      c -> xyz( q -> Q.y, r -> a.b ),       z -> [[ L> Func, D> 00-, def -> Q.txt.sprintf ]],       error -> T     ]]
− test-resources/cst/to-salty-packs/application-with-alphas.yaml
@@ -1,26 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----expression: |-  [[ x -> Q.y(1, 2) ]]-result: |--  ⟦-    x ↦ Φ.y(-      α0 ↦ Φ.number(-        φ ↦ Φ.bytes(-          φ ↦ ⟦-            Δ ⤍ 3F-F0-00-00-00-00-00-00-          ⟧-        )-      )-    )(-      α1 ↦ Φ.number(-        φ ↦ Φ.bytes(-          φ ↦ ⟦-            Δ ⤍ 40-00-00-00-00-00-00-00-          ⟧-        )-      )-    )-  ⟧
test-resources/cst/to-salty-packs/non-finite-doubles.yaml view
@@ -6,7 +6,7 @@   [[     nan -> Q.nan,     pinf -> Q.pinf,-    ninf -> Q.number(~0 -> Q.bytes([[D> FF-F0-00-00-00-00-00-00]]), ^ -> Q.x)+    ninf -> Q.number(@ -> Q.bytes(@ -> [[D> FF-F0-00-00-00-00-00-00]]), ^ -> Q.x)   ]] result: |-   ⟦
test-resources/cst/to-salty-packs/primitives-with-rhos.yaml view
@@ -5,10 +5,10 @@ expression: |   [[     x -> Q.number(-      ~0 -> Q.bytes([[D> 3F-F0-00-00-00-00-00-00]]), ^ -> Q.x, ^ -> [[ ]]+      @ -> Q.bytes(@ -> [[D> 3F-F0-00-00-00-00-00-00]]), ^ -> Q.x, ^ -> [[ ]]     ),     y -> Q.string(-      ~0 -> Q.bytes([[D> 48-65-79]]), ^ -> $.x+      @ -> Q.bytes(@ -> [[D> 48-65-79]]), ^ -> $.x     )   ]] result: |-
test-resources/dataization-packs/dataizes-a-chain-of-firings-to-the-manufactured-datum.yaml view
@@ -6,5 +6,5 @@ # of firings ends where a single one does. model: true symbolic: true-input: '5.plus( 6 ).plus( 7 )'+input: '5.plus( x -> 6 ).plus( x -> 7 )' result: '40-45-00-00-00-00-00-00'
test-resources/dataization-packs/dataizes-a-symbolic-sum-to-the-manufactured-datum.yaml view
@@ -5,5 +5,5 @@ # datum every symbol is manufactured the same one of, and not the sum at all. model: true symbolic: true-input: '5.plus( 6 )'+input: '5.plus( x -> 6 )' result: '40-45-00-00-00-00-00-00'
test-resources/dataization-packs/dataizes-the-one-branch-an-undecided-condition-joins.yaml view
@@ -5,5 +5,5 @@ # the join answers that number and the program needs no decision at all. model: true symbolic: true-input: '5.gt( 6 ).if( 1, 1 )'+input: '5.gt( x -> 6 ).if( then -> 1, else -> 1 )' result: '3F-F0-00-00-00-00-00-00'
test-resources/dataization-packs/gets-stuck-on-branches-an-undecided-condition-cannot-join.yaml view
@@ -6,5 +6,5 @@ # 'if' gets stuck instead of picking a branch (#1996). model: true symbolic: true-input: '5.gt( 6 ).if( 1, 2 )'+input: '5.gt( x -> 6 ).if( then -> 1, else -> 2 )' fails: "No entry of --symbolic answers the λ function 'L_fork'"
+ test-resources/evaluate-packs/answers-a-dispatch-off-a-symbol-outside-a-join.yaml view
@@ -0,0 +1,40 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# An entry that does not join morphs an operand dispatching off a bare+# symbol. The dispatch is 'opaque' and gives a new symbol (#2479), so the+# firing answers it and the run goes on instead of getting stuck.+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.on🌵+    morph:+      𝑛1: $.left🌵+      𝑛2: $.right🌵+    join:+      on: 𝛿1+      left: 𝑛1+      right: 𝑛2+      otherwise: L_fork+  - λ: L_id+    morph:+      𝑛1: $.x+    𝑛: 𝑛1+location: 'Q.e1'+input: '⟦ e1 ↦ ⟦ λ ⤍ L_id, x ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧.φ ⟧'+result: '𝜎3:λ'+protocol: |+  𝕄(Φ.e1):+    𝔼(L_id):+      𝕄(ξ.x):+        opaque 𝜎2:λ ≔ 𝜎1:λ.q+        morphed 𝑛·1·1 ≔ 𝜎2:λ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.x)+      𝑛·1·2 ≔ 𝑛1·1  # 𝑛 of L_id+      𝕄(𝑛·1·2):+        morphed 𝑛·1·3 ≔ 𝑛1·1+      𝑛·1·4 ≔ 𝑛1·1  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧+    opaque 𝜎3:λ ≔ 𝜎2:λ.φ+    morphed 𝑛·0·1 ≔ 𝜎3:λ
+ test-resources/evaluate-packs/answers-a-dispatch-off-a-symbol.yaml view
@@ -0,0 +1,19 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# A λ binding naming a symbol rather than a name, which is what a value nobody+# worked out looks like: ⟦ λ ⤍ 𝜎1 ⟧. An attribute of an object nobody knows is+# another object nobody knows, so dispatching 'plus' off it is 'opaque' and+# gives a new symbol, 𝜎2 (#2479), the way an argument fed to a bare symbol+# gives one (#2476). The argument then fed to 𝜎2 gives 𝜎3.+symbolic: '[]'+location: 'Q.a'+partial: true+input: '⟦ a ↦ ⟦ λ ⤍ 𝜎1 ⟧.plus( x ↦ 5 ) ⟧'+result: '𝜎3:λ'+protocol: |+  𝕄(Φ.a):+    opaque 𝜎2:λ ≔ 𝜎1:λ.plus+    fed 𝜎3:λ ≔ 𝜎2:λ( x ↦ 5.0 )+    morphed 𝑛·0·1 ≔ 𝜎3:λ
test-resources/evaluate-packs/answers-a-firing-whose-operand-loops.yaml view
@@ -7,7 +7,7 @@ # again. The cut answers the whole dispatch with a fresh symbol, named by the # symbol alone, since no fact leads that formation back to the world (#2307). # The operand comes down to the datum of the symbol and 'L_outer' answers, and-# the dispatch of 'bar' off its answer is what the run parks on.+# the dispatch of 'bar' off its answer gives a new symbol (#2479). symbolic: |   - λ: L_outer     dataize:@@ -21,25 +21,26 @@ partial: true input: >   ⟦ x ↦ ⟦ arg ↦ ⟦ λ ⤍ L_loop ⟧.foo, λ ⤍ L_outer ⟧.bar ⟧-result: '𝜎2:λ.bar'+result: '𝜎3:λ' protocol: |   𝕄(Φ.x):     𝔼(L_outer):       𝔻(ξ.arg):         𝕄(ξ.arg):           𝔼(L_loop):-            𝑛·2·1 := L_loop:λ  # 𝑛 of L_loop+            𝑛·2·1 ≔ L_loop:λ  # 𝑛 of L_loop             𝕄(𝑛·2·1):-              morphed 𝑛·2·2 := L_loop:λ-            𝑛·2·3 := L_loop:λ  # 𝕄(𝑛·2·1)-            evaluated 𝑛·2·4 := L_loop:λ  # L_loop:λ+              morphed 𝑛·2·2 ≔ L_loop:λ+            𝑛·2·3 ≔ L_loop:λ  # 𝕄(𝑛·2·1)+            evaluated 𝑛·2·4 ≔ L_loop:λ  # L_loop:λ           looped 𝜎1  # proven, repeats L_loop:λ-          morphed 𝑛·1·1 := 𝜎1:λ-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.arg)-      𝑛·1·2 := 𝜎2:λ  # 𝑛 of L_outer+          morphed 𝑛·1·1 ≔ 𝜎1:λ+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.arg)+      𝑛·1·2 ≔ 𝜎2:λ  # 𝑛 of L_outer       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := 𝜎2:λ-      𝑛·1·4 := 𝑛·1·3  # 𝕄(𝑛·1·2)-      evaluated 𝑛·1·5 := 𝑛·1·4  # ⟦ arg ↦ L_loop:λ.foo, λ ⤍ L_outer ⟧-    opaque 𝜎2  # 𝕄(𝜎2:λ.bar)+        morphed 𝑛·1·3 ≔ 𝜎2:λ+      𝑛·1·4 ≔ 𝑛·1·3  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ arg ↦ L_loop:λ.foo, λ ⤍ L_outer ⟧+    opaque 𝜎3:λ ≔ 𝜎2:λ.bar+    morphed 𝑛·0·1 ≔ 𝜎3:λ
test-resources/evaluate-packs/answers-a-symbol-nobody-has-worked-out.yaml view
@@ -16,54 +16,54 @@ input: >   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.plus( 6 ).φ ⟧+    φ ↦ 5.plus( x ↦ 6 ).φ ⟧ result: '𝜎1:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ 6.0 )-    𝑛·0·6 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 6.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 6.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 6.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·22):-        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )-        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·1·25 := 𝑛·1·24-      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·6-    normalized 𝑛·0·7 := 𝜎1:λ  # 𝑛·1·27.φ-    morphed 𝑛·0·8 := 𝑛·0·7+        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )+        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·1·25 ≔ 𝑛·1·24+      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ 𝜎1:λ  # 𝑛·1·27.φ+    morphed 𝑛·0·8 ≔ 𝑛·0·7
test-resources/evaluate-packs/answers-a-whole-family-of-names-with-one-entry.yaml view
@@ -16,89 +16,89 @@     number(φ) ↦ ⟦       plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧,       times(ρ, x) ↦ ⟦ λ ⤍ L_number_times ⟧ ⟧,-    φ ↦ 5.plus( 6 ).times( 7 ).φ ⟧+    φ ↦ 5.plus( x ↦ 6 ).times( x ↦ 7 ).φ ⟧ result: '𝜎2:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ 6.0 )-    𝑛·0·6 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 6.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 6.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 6.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·22):-        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )-        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧-        morphed 𝑛·1·25 := 𝑛·1·24-      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·6-    normalized 𝑛·0·7 := ⟦ x ↦ ∅, λ ⤍ L_number_times ⟧  # 𝑛·1·27.times-    𝑛·0·8 := 𝑛·1·23.times( x ↦ 7.0 )-    𝑛·0·9 := ⟦ x ↦ 7.0, λ ⤍ L_number_times ⟧+        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )+        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧+        morphed 𝑛·1·25 ≔ 𝑛·1·24+      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_times ⟧  # 𝑛·1·27.times+    𝑛·0·8 ≔ 𝑛·1·23.times( x ↦ 7.0 )+    𝑛·0·9 ≔ ⟦ x ↦ 7.0, λ ⤍ L_number_times ⟧     𝔼(L_number_times):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·2·1 := Φ.number( φ ↦ 𝜎1:λ )-          𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧-          morphed 𝑛·2·3 := 𝑛·1·26-        boxed 𝑛·2·4 := 𝑛·2·3.φ-        normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4-        𝛿·2·1 := 𝔻(𝜎1:λ)-      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+          𝑛·2·1 ≔ Φ.number( φ ↦ 𝜎1:λ )+          𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧+          morphed 𝑛·2·3 ≔ 𝑛·1·26+        boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+        normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4+        𝛿·2·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·2·6 := 7.0-          𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧-          morphed 𝑛·2·8 := 𝑛·2·7-        boxed 𝑛·2·9 := 𝑛·2·8.φ-        normalized 𝑛·2·10 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·9+          𝑛·2·6 ≔ 7.0+          𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧+          morphed 𝑛·2·8 ≔ 𝑛·2·7+        boxed 𝑛·2·9 ≔ 𝑛·2·8.φ+        normalized 𝑛·2·10 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·9         𝕄(𝑛·2·9):-          𝑛·2·11 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )-          𝑛·2·12 := 40-1C-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·2·13 := 𝑛·2·12-        boxed 𝑛·2·14 := 𝑛·2·13.φ-        normalized 𝑛·2·15 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·14-        𝛿·2·2 := 40-1C-00-00-00-00-00-00  # 7.0-      𝛿2·2 := 𝛿·2·2  # 𝔻(ξ.x)-      𝑛·2·16 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_times+          𝑛·2·11 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )+          𝑛·2·12 ≔ 40-1C-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·2·13 ≔ 𝑛·2·12+        boxed 𝑛·2·14 ≔ 𝑛·2·13.φ+        normalized 𝑛·2·15 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·14+        𝛿·2·2 ≔ 40-1C-00-00-00-00-00-00  # 7.0+      𝛿2·2 ≔ 𝛿·2·2  # 𝔻(ξ.x)+      𝑛·2·16 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_times       𝕄(𝑛·2·16):-        𝑛·2·17 := Φ.number( φ ↦ 𝜎2:λ )-        𝑛·2·18 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧-        morphed 𝑛·2·19 := 𝑛·2·18-      𝑛·2·20 := 𝑛·2·19  # 𝕄(𝑛·2·16)-      evaluated 𝑛·2·21 := 𝑛·2·20  # 𝑛·0·9-    normalized 𝑛·0·10 := 𝜎2:λ  # 𝑛·2·21.φ-    morphed 𝑛·0·11 := 𝑛·0·10+        𝑛·2·17 ≔ Φ.number( φ ↦ 𝜎2:λ )+        𝑛·2·18 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧+        morphed 𝑛·2·19 ≔ 𝑛·2·18+      𝑛·2·20 ≔ 𝑛·2·19  # 𝕄(𝑛·2·16)+      evaluated 𝑛·2·21 ≔ 𝑛·2·20  # 𝑛·0·9+    normalized 𝑛·0·10 ≔ 𝜎2:λ  # 𝑛·2·21.φ+    morphed 𝑛·0·11 ≔ 𝑛·0·10
test-resources/evaluate-packs/answers-an-operand-that-dataizes-in-circles-with-a-symbol.yaml view
@@ -19,36 +19,36 @@ acyclic: proven steps: 250 input: >-  ⟦ cyc ↦ ⟦ x ↦ ∅, φ ↦ Φ.cyc( ξ.x ) ⟧,-    x ↦ ⟦ arg ↦ Φ.cyc( ⟦⟧ ), λ ⤍ L_outer ⟧.bar ⟧+  ⟦ cyc ↦ ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ↦ ξ.x ) ⟧,+    x ↦ ⟦ arg ↦ Φ.cyc( x ↦ ⟦⟧ ), λ ⤍ L_outer ⟧.bar ⟧ result: '𝜎2:λ' protocol: |   𝕄(Φ.x):     𝔼(L_outer):       𝔻(ξ.arg):         𝕄(ξ.arg):-          remembered 𝑛·1·1 ≡ Φ.cyc  # ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ) ⟧-          𝑛·1·2 := Φ.cyc( x ↦ ⟦⟧ )-          𝑛·1·3 := ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ) ⟧+          remembered 𝑛·1·1 ≡ Φ.cyc  # ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ↦ x ) ⟧+          𝑛·1·2 ≔ Φ.cyc( x ↦ ⟦⟧ )+          𝑛·1·3 ≔ ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ↦ x ) ⟧           remembered 𝑛·1·3 ≡ 𝑛·1·1( x ↦ ⟦⟧ )-          morphed 𝑛·1·4 := 𝑛·1·3-        boxed 𝑛·1·5 := 𝑛·1·4.φ-        normalized 𝑛·1·6 := Φ.cyc( ⟦⟧ )  # 𝑛·1·5+          morphed 𝑛·1·4 ≔ 𝑛·1·3+        boxed 𝑛·1·5 ≔ 𝑛·1·4.φ+        normalized 𝑛·1·6 ≔ 𝑛·1·2  # 𝑛·1·5         𝕄(𝑛·1·5):-          𝑛·1·7 := Φ.cyc( x ↦ ⟦⟧ )-          𝑛·1·8 := ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ) ⟧-          morphed 𝑛·1·9 := 𝑛·1·8+          𝑛·1·7 ≔ Φ.cyc( x ↦ ⟦⟧ )+          𝑛·1·8 ≔ ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ↦ x ) ⟧+          morphed 𝑛·1·9 ≔ 𝑛·1·8         recalled 𝑛·1·3 ⇒ 𝑛·1·1( x ↦ ⟦⟧ )         recalled 𝑛·1·1 ⇒ Φ.cyc         𝕄(𝑛·1·9.x):-          morphed 𝑛·1·10 := ⟦⟧-        looped 𝜎1 := Φ.cyc( x ↦ 𝑛·1·10 )  # 𝔻(𝑛·1·5), proven, repeats 𝑛·1·9-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.arg)-      𝑛·1·11 := 𝜎2:λ:bar  # 𝑛 of L_outer+          morphed 𝑛·1·10 ≔ ⟦⟧+        looped 𝜎1 ≔ Φ.cyc( x ↦ 𝑛·1·10 )  # 𝔻(𝑛·1·5), proven, repeats 𝑛·1·9+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.arg)+      𝑛·1·11 ≔ 𝜎2:λ:bar  # 𝑛 of L_outer       𝕄(𝑛·1·11):-        morphed 𝑛·1·12 := 𝜎2:λ:bar-      𝑛·1·13 := 𝑛·1·12  # 𝕄(𝑛·1·11)-      evaluated 𝑛·1·14 := 𝑛·1·13  # ⟦ arg ↦ Φ.cyc( 𝑛·1·10 ), λ ⤍ L_outer ⟧-    normalized 𝑛·0·1 := 𝜎2:λ  # 𝑛·1·14.bar-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·12 ≔ 𝜎2:λ:bar+      𝑛·1·13 ≔ 𝑛·1·12  # 𝕄(𝑛·1·11)+      evaluated 𝑛·1·14 ≔ 𝑛·1·13  # ⟦ arg ↦ 𝑛·1·7, λ ⤍ L_outer ⟧+    normalized 𝑛·0·1 ≔ 𝜎2:λ  # 𝑛·1·14.bar+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/answers-bottom-for-a-meta-that-raises.yaml view
@@ -15,19 +15,19 @@       𝛿1: 𝑛1     𝑛: ⟦ λ ⤍ 𝜎 ⟧ location: 'Q.y'-input: '⟦ wrap(x) ↦ ⟦ λ ⤍ L_wrap ⟧, y ↦ Φ.wrap( ⟦ λ ⤍ L_throw ⟧ ).φ ⟧'+input: '⟦ wrap(x) ↦ ⟦ λ ⤍ L_wrap ⟧, y ↦ Φ.wrap( x ↦ ⟦ λ ⤍ L_throw ⟧ ).φ ⟧' result: '⊥' protocol: |   𝕄(Φ.y):     remembered 𝑛·0·1 ≡ Φ.wrap  # ⟦ x ↦ ∅, λ ⤍ L_wrap ⟧-    𝑛·0·2 := Φ.wrap( x ↦ L_throw:λ )-    𝑛·0·3 := ⟦ x ↦ L_throw:λ, λ ⤍ L_wrap ⟧+    𝑛·0·2 ≔ Φ.wrap( x ↦ L_throw:λ )+    𝑛·0·3 ≔ ⟦ x ↦ L_throw:λ, λ ⤍ L_wrap ⟧     remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ L_throw:λ )     𝔼(L_wrap):       𝕄(ξ.x):-        morphed 𝑛·1·1 := L_throw:λ-      𝑛1·1 := L_throw:λ  # 𝕄(ξ.x)-      𝑛·1·2 := ⊥-      evaluated 𝑛·1·3 := ⊥  # 𝑛·0·3-    normalized 𝑛·0·4 := ⊥  # ⊥.φ-    morphed 𝑛·0·5 := ⊥+        morphed 𝑛·1·1 ≔ L_throw:λ+      𝑛1·1 ≔ L_throw:λ  # 𝕄(ξ.x)+      𝑛·1·2 ≔ ⊥+      evaluated 𝑛·1·3 ≔ ⊥  # 𝑛·0·3+    normalized 𝑛·0·4 ≔ ⊥  # ⊥.φ+    morphed 𝑛·0·5 ≔ ⊥
− test-resources/evaluate-packs/answers-bottom-where-both-sides-dispatch-off-a-symbol.yaml
@@ -1,37 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----# yamllint disable rule:line-length-# Both sides dispatch off a bare symbol, so both are 'opaque' and both end as-# ⊥ (#2427). Two sides that are the same join, and the fork answers ⊥.-symbolic: |-  - λ: L_fork-    dataize:-      𝛿1: $.on🌵-    morph:-      𝑛1: $.left🌵-      𝑛2: $.right🌵-    join:-      on: 𝛿1-      left: 𝑛1-      right: 𝑛2-      otherwise: L_fork-location: 'Q.e1'-input: '⟦ e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧.p, right🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧.φ ⟧'-result: '⊥'-protocol: |-  𝕄(Φ.e1):-    𝔼(L_fork):-      𝔻(ξ.on🌵):-        𝛿·1·1 := 00--      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)-      𝕄(ξ.left🌵):-        opaque 𝜎1  # 𝕄(𝜎1:λ.p)-      𝑛1·1 := ⊥  # 𝕄(ξ.left🌵)-      𝕄(ξ.right🌵):-        opaque 𝜎1  # 𝕄(𝜎1:λ.q)-      𝑛2·1 := ⊥  # 𝕄(ξ.right🌵)-      𝑛·1·1 := ⊥-      evaluated 𝑛·1·2 := ⊥  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ 𝜎1:λ.p, right🌵 ↦ 𝜎1:λ.q ⟧-    normalized 𝑛·0·1 := ⊥  # ⊥.φ-    morphed 𝑛·0·2 := ⊥
test-resources/evaluate-packs/answers-its-own-sides-on-a-condition-another-join-read.yaml view
@@ -35,153 +35,153 @@     bool(φ) ↦ ⟦ if ↦ ⟦ ρ ↦ ∅, then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧ ⟧,     number(φ) ↦ ⟦ gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧ ⟧,     pick(x, y) ↦ ⟦ λ ⤍ L_pick ⟧,-    φ ↦ Φ.pick( 5.gt( 0 ).if( 7, 7 ), 5.gt( 0 ).if( 70, 70 ) ).φ ⟧+    φ ↦ Φ.pick( x ↦ 5.gt( x ↦ 0 ).if( then ↦ 7, else ↦ 7 ), y ↦ 5.gt( x ↦ 0 ).if( then ↦ 70, else ↦ 70 ) ).φ ⟧ result: '⟦ φ ↦ ⟦ Δ ⤍ 40-51-80-00-00-00-00-00 ⟧ ⟧' protocol: |   𝕄(Φ.φ):     remembered 𝑛·0·1 ≡ Φ.pick  # ⟦ x ↦ ∅, y ↦ ∅, λ ⤍ L_pick ⟧-    shared 𝑛·1 := 5.0.gt( 0.0 ).if( 7.0, 7.0 )-    𝑛·0·2 := Φ.pick( x ↦ 𝑛·1 )-    𝑛·0·3 := ⟦ x ↦ 𝑛·1, y ↦ ∅, λ ⤍ L_pick ⟧+    shared 𝑛·1 ≔ 5.0.gt( x ↦ 0.0 ).if( then ↦ 7.0, else ↦ 7.0 )+    𝑛·0·2 ≔ Φ.pick( x ↦ 𝑛·1 )+    𝑛·0·3 ≔ ⟦ x ↦ 𝑛·1, y ↦ ∅, λ ⤍ L_pick ⟧     remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ 𝑛·1 )-    shared 𝑛·2 := 5.0.gt( 0.0 ).if( 70.0, 70.0 )-    𝑛·0·4 := 𝑛·0·3( y ↦ 𝑛·2 )-    𝑛·0·5 := ⟦ x ↦ 𝑛·1, y ↦ 𝑛·2, λ ⤍ L_pick ⟧+    shared 𝑛·2 ≔ 5.0.gt( x ↦ 0.0 ).if( then ↦ 70.0, else ↦ 70.0 )+    𝑛·0·4 ≔ 𝑛·0·3( y ↦ 𝑛·2 )+    𝑛·0·5 ≔ ⟦ x ↦ 𝑛·1, y ↦ 𝑛·2, λ ⤍ L_pick ⟧     remembered 𝑛·0·5 ≡ 𝑛·0·4     𝔼(L_pick):       𝔻(ξ.x):         𝕄(ξ.x):-          normalized 𝑛·1·1 := ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ ⟧  # Φ.number-          𝑛·1·2 := 5.0-          𝑛·1·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧-          normalized 𝑛·1·4 := ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·1·3.gt-          𝑛·1·5 := 𝑛·1·2.gt( x ↦ 0.0 )-          𝑛·1·6 := ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧+          normalized 𝑛·1·1 ≔ ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ ⟧  # Φ.number+          𝑛·1·2 ≔ 5.0+          𝑛·1·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧+          normalized 𝑛·1·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·1·3.gt+          𝑛·1·5 ≔ 𝑛·1·2.gt( x ↦ 0.0 )+          𝑛·1·6 ≔ ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧           𝔼(L_number_gt):             𝔻(ξ.ρ):               𝕄(ξ.ρ):-                𝑛·2·1 := 5.0-                𝑛·2·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧-                morphed 𝑛·2·3 := 𝑛·2·2-              boxed 𝑛·2·4 := 𝑛·2·3.φ-              normalized 𝑛·2·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·2·4+                𝑛·2·1 ≔ 5.0+                𝑛·2·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧+                morphed 𝑛·2·3 ≔ 𝑛·2·2+              boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+              normalized 𝑛·2·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·2·4               𝕄(𝑛·2·4):-                normalized 𝑛·2·6 := ∅:φ  # Φ.bytes-                𝑛·2·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-                𝑛·2·8 := 40-14-00-00-00-00-00-00:Δ:φ-                morphed 𝑛·2·9 := 𝑛·2·8-              boxed 𝑛·2·10 := 𝑛·2·9.φ-              normalized 𝑛·2·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·2·10-              𝛿·2·1 := 40-14-00-00-00-00-00-00  # 5.0-            𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+                normalized 𝑛·2·6 ≔ ∅:φ  # Φ.bytes+                𝑛·2·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+                𝑛·2·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+                morphed 𝑛·2·9 ≔ 𝑛·2·8+              boxed 𝑛·2·10 ≔ 𝑛·2·9.φ+              normalized 𝑛·2·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·2·10+              𝛿·2·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+            𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)             𝔻(ξ.x):               𝕄(ξ.x):-                𝑛·2·12 := 0.0-                𝑛·2·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧-                morphed 𝑛·2·14 := 𝑛·2·13-              boxed 𝑛·2·15 := 𝑛·2·14.φ-              normalized 𝑛·2·16 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·2·15+                𝑛·2·12 ≔ 0.0+                𝑛·2·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧+                morphed 𝑛·2·14 ≔ 𝑛·2·13+              boxed 𝑛·2·15 ≔ 𝑛·2·14.φ+              normalized 𝑛·2·16 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·2·15               𝕄(𝑛·2·15):-                𝑛·2·17 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )-                𝑛·2·18 := 00-00-00-00-00-00-00-00:Δ:φ-                morphed 𝑛·2·19 := 𝑛·2·18-              boxed 𝑛·2·20 := 𝑛·2·19.φ-              normalized 𝑛·2·21 := 00-00-00-00-00-00-00-00:Δ  # 𝑛·2·20-              𝛿·2·2 := 00-00-00-00-00-00-00-00  # 0.0-            𝛿2·2 := 𝛿·2·2  # 𝔻(ξ.x)-            𝑛·2·22 := Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt+                𝑛·2·17 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )+                𝑛·2·18 ≔ 00-00-00-00-00-00-00-00:Δ:φ+                morphed 𝑛·2·19 ≔ 𝑛·2·18+              boxed 𝑛·2·20 ≔ 𝑛·2·19.φ+              normalized 𝑛·2·21 ≔ 00-00-00-00-00-00-00-00:Δ  # 𝑛·2·20+              𝛿·2·2 ≔ 00-00-00-00-00-00-00-00  # 0.0+            𝛿2·2 ≔ 𝛿·2·2  # 𝔻(ξ.x)+            𝑛·2·22 ≔ Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt             𝕄(𝑛·2·22):-              normalized 𝑛·2·23 := ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool-              𝑛·2·24 := Φ.bool( φ ↦ 𝜎1:λ )-              𝑛·2·25 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-              morphed 𝑛·2·26 := 𝑛·2·25-            𝑛·2·27 := 𝑛·2·26  # 𝕄(𝑛·2·22)+              normalized 𝑛·2·23 ≔ ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool+              𝑛·2·24 ≔ Φ.bool( φ ↦ 𝜎1:λ )+              𝑛·2·25 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+              morphed 𝑛·2·26 ≔ 𝑛·2·25+            𝑛·2·27 ≔ 𝑛·2·26  # 𝕄(𝑛·2·22)             memoized 𝑛·1·6 ⇛ 𝑛·2·27-            evaluated 𝑛·2·28 := 𝑛·2·27  # 𝑛·1·6-          normalized 𝑛·1·7 := ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·2·28.if-          𝑛·1·8 := 𝑛·2·24.if( then ↦ 7.0 )-          𝑛·1·9 := ⟦ then ↦ 7.0, else ↦ ∅, λ ⤍ L_fork ⟧-          𝑛·1·10 := 𝑛·1·8( else ↦ 7.0 )-          𝑛·1·11 := ⟦ then ↦ 7.0, else ↦ 7.0, λ ⤍ L_fork ⟧-          morphed 𝑛·1·12 := 𝑛·1·11+            evaluated 𝑛·2·28 ≔ 𝑛·2·27  # 𝑛·1·6+          normalized 𝑛·1·7 ≔ ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·2·28.if+          𝑛·1·8 ≔ 𝑛·2·24.if( then ↦ 7.0 )+          𝑛·1·9 ≔ ⟦ then ↦ 7.0, else ↦ ∅, λ ⤍ L_fork ⟧+          𝑛·1·10 ≔ 𝑛·1·8( else ↦ 7.0 )+          𝑛·1·11 ≔ ⟦ then ↦ 7.0, else ↦ 7.0, λ ⤍ L_fork ⟧+          morphed 𝑛·1·12 ≔ 𝑛·1·11         𝔼(L_fork):           𝔻(ξ.ρ):             𝕄(ξ.ρ):-              𝑛·3·1 := Φ.bool( φ ↦ 𝜎1:λ )-              𝑛·3·2 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-              morphed 𝑛·3·3 := 𝑛·2·27-            boxed 𝑛·3·4 := 𝑛·3·3.φ-            normalized 𝑛·3·5 := 𝜎1:λ  # 𝑛·3·4-            𝛿·3·1 := 𝔻(𝜎1:λ)-          𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.ρ)+              𝑛·3·1 ≔ Φ.bool( φ ↦ 𝜎1:λ )+              𝑛·3·2 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+              morphed 𝑛·3·3 ≔ 𝑛·2·27+            boxed 𝑛·3·4 ≔ 𝑛·3·3.φ+            normalized 𝑛·3·5 ≔ 𝜎1:λ  # 𝑛·3·4+            𝛿·3·1 ≔ 𝔻(𝜎1:λ)+          𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.ρ)           𝕄(ξ.then):-            𝑛·3·6 := 7.0-            𝑛·3·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧-            morphed 𝑛·3·8 := 𝑛·3·7+            𝑛·3·6 ≔ 7.0+            𝑛·3·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧+            morphed 𝑛·3·8 ≔ 𝑛·3·7           𝕄(ξ.else):-            𝑛·3·9 := 7.0-            𝑛·3·10 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧-            morphed 𝑛·3·11 := 𝑛·3·10-          𝑛·3·12 := 𝑛·3·11+            𝑛·3·9 ≔ 7.0+            𝑛·3·10 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧+            morphed 𝑛·3·11 ≔ 𝑛·3·10+          𝑛·3·12 ≔ 𝑛·3·11           memoized 𝑛·1·11 ⇛ 𝑛·3·12-          evaluated 𝑛·3·13 := 𝑛·3·12  # 𝑛·1·11-        boxed 𝑛·1·13 := 𝑛·3·13.φ-        normalized 𝑛·1·14 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·1·13+          evaluated 𝑛·3·13 ≔ 𝑛·3·12  # 𝑛·1·11+        boxed 𝑛·1·13 ≔ 𝑛·3·13.φ+        normalized 𝑛·1·14 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·1·13         𝕄(𝑛·1·13):-          𝑛·1·15 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )-          𝑛·1·16 := 40-1C-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·17 := 𝑛·1·16-        boxed 𝑛·1·18 := 𝑛·1·17.φ-        normalized 𝑛·1·19 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·1·18-        𝛿·1·1 := 40-1C-00-00-00-00-00-00  # 7.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.x)+          𝑛·1·15 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )+          𝑛·1·16 ≔ 40-1C-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·17 ≔ 𝑛·1·16+        boxed 𝑛·1·18 ≔ 𝑛·1·17.φ+        normalized 𝑛·1·19 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·1·18+        𝛿·1·1 ≔ 40-1C-00-00-00-00-00-00  # 7.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.x)       𝕄(ξ.y):-        𝑛·1·20 := Φ.number( φ ↦ 𝑛·2·7 )-        𝑛·1·21 := ⟦ φ ↦ 𝑛·2·7, gt(x) ↦ L_number_gt:λ ⟧-        normalized 𝑛·1·22 := ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·1·21.gt-        𝑛·1·23 := 𝑛·1·20.gt( x ↦ 𝑛·2·12 )-        𝑛·1·24 := ⟦ x ↦ 𝑛·2·12, λ ⤍ L_number_gt ⟧+        𝑛·1·20 ≔ Φ.number( φ ↦ 𝑛·2·7 )+        𝑛·1·21 ≔ ⟦ φ ↦ 𝑛·2·7, gt(x) ↦ L_number_gt:λ ⟧+        normalized 𝑛·1·22 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·1·21.gt+        𝑛·1·23 ≔ 𝑛·1·20.gt( x ↦ 𝑛·2·12 )+        𝑛·1·24 ≔ ⟦ x ↦ 𝑛·2·12, λ ⤍ L_number_gt ⟧         𝔼(L_number_gt):           recalled 𝑛·1·6 ⇒ 𝑛·2·27-          𝑛·4·1 := 𝑛·3·1  # 𝑛 of L_number_gt-          𝑛·4·2 := 𝑛·2·27  # 𝕄(𝑛·4·1)-          evaluated 𝑛·4·3 := 𝑛·4·2  # 𝑛·1·24-        normalized 𝑛·1·25 := ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·4·3.if-        𝑛·1·26 := 𝑛·3·1.if( then ↦ 70.0 )-        𝑛·1·27 := ⟦ then ↦ 70.0, else ↦ ∅, λ ⤍ L_fork ⟧-        𝑛·1·28 := 𝑛·1·26( else ↦ 70.0 )-        𝑛·1·29 := ⟦ then ↦ 70.0, else ↦ 70.0, λ ⤍ L_fork ⟧-        morphed 𝑛·1·30 := 𝑛·1·29-      𝑛1·1 := 𝑛·1·29  # 𝕄(ξ.y)+          𝑛·4·1 ≔ 𝑛·3·1  # 𝑛 of L_number_gt+          𝑛·4·2 ≔ 𝑛·2·27  # 𝕄(𝑛·4·1)+          evaluated 𝑛·4·3 ≔ 𝑛·4·2  # 𝑛·1·24+        normalized 𝑛·1·25 ≔ ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·4·3.if+        𝑛·1·26 ≔ 𝑛·3·1.if( then ↦ 70.0 )+        𝑛·1·27 ≔ ⟦ then ↦ 70.0, else ↦ ∅, λ ⤍ L_fork ⟧+        𝑛·1·28 ≔ 𝑛·1·26( else ↦ 70.0 )+        𝑛·1·29 ≔ ⟦ then ↦ 70.0, else ↦ 70.0, λ ⤍ L_fork ⟧+        morphed 𝑛·1·30 ≔ 𝑛·1·29+      𝑛1·1 ≔ 𝑛·1·29  # 𝕄(ξ.y)       𝔼(L_fork):  # 𝔼(𝑛1 of L_pick)         𝔻(ξ.ρ):           𝕄(ξ.ρ):-            𝑛·5·1 := Φ.bool( φ ↦ 𝜎1:λ )-            𝑛·5·2 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-            morphed 𝑛·5·3 := 𝑛·4·2-          boxed 𝑛·5·4 := 𝑛·5·3.φ-          𝛿·5·1 := 𝔻(𝜎1:λ)-        𝛿1·5 := 𝛿·5·1  # 𝔻(ξ.ρ)+            𝑛·5·1 ≔ Φ.bool( φ ↦ 𝜎1:λ )+            𝑛·5·2 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+            morphed 𝑛·5·3 ≔ 𝑛·4·2+          boxed 𝑛·5·4 ≔ 𝑛·5·3.φ+          𝛿·5·1 ≔ 𝔻(𝜎1:λ)+        𝛿1·5 ≔ 𝛿·5·1  # 𝔻(ξ.ρ)         𝕄(ξ.then):-          𝑛·5·5 := 70.0-          𝑛·5·6 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-51-80-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧-          morphed 𝑛·5·7 := 𝑛·5·6+          𝑛·5·5 ≔ 70.0+          𝑛·5·6 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-51-80-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧+          morphed 𝑛·5·7 ≔ 𝑛·5·6         𝕄(ξ.else):-          𝑛·5·8 := 70.0-          𝑛·5·9 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-51-80-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧-          morphed 𝑛·5·10 := 𝑛·5·9-        𝑛·5·11 := 𝑛·5·10+          𝑛·5·8 ≔ 70.0+          𝑛·5·9 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-51-80-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ ⟧+          morphed 𝑛·5·10 ≔ 𝑛·5·9+        𝑛·5·11 ≔ 𝑛·5·10         memoized 𝑛·1·29 ⇛ 𝑛·5·11-        evaluated 𝑛·5·12 := 𝑛·5·11  # 𝑛·1·29-      𝑛2·1 := 𝑛·5·12  # 𝔼(𝑛1 of L_pick)-      𝑛·1·31 := 𝑛·5·12  # 𝑛 of L_pick+        evaluated 𝑛·5·12 ≔ 𝑛·5·11  # 𝑛·1·29+      𝑛2·1 ≔ 𝑛·5·12  # 𝔼(𝑛1 of L_pick)+      𝑛·1·31 ≔ 𝑛·5·12  # 𝑛 of L_pick       𝕄(𝑛·1·31):-        morphed 𝑛·1·32 := 𝑛·5·12-      𝑛·1·33 := 𝑛·1·32  # 𝕄(𝑛·1·31)+        morphed 𝑛·1·32 ≔ 𝑛·5·12+      𝑛·1·33 ≔ 𝑛·1·32  # 𝕄(𝑛·1·31)       remembered 𝑛·1·33 ≡ 𝑛·0·5       memoized 𝑛·0·5 ⇛ 𝑛·1·33-      evaluated 𝑛·1·34 := 𝑛·1·33  # 𝑛·0·5-    normalized 𝑛·0·6 := Φ.bytes( φ ↦ 40-51-80-00-00-00-00-00:Δ )  # 𝑛·1·34.φ-    𝑛·0·7 := Φ.bytes( φ ↦ 40-51-80-00-00-00-00-00:Δ )-    𝑛·0·8 := 40-51-80-00-00-00-00-00:Δ:φ-    morphed 𝑛·0·9 := 𝑛·0·8+      evaluated 𝑛·1·34 ≔ 𝑛·1·33  # 𝑛·0·5+    normalized 𝑛·0·6 ≔ Φ.bytes( φ ↦ 40-51-80-00-00-00-00-00:Δ )  # 𝑛·1·34.φ+    𝑛·0·7 ≔ Φ.bytes( φ ↦ 40-51-80-00-00-00-00-00:Δ )+    𝑛·0·8 ≔ 40-51-80-00-00-00-00-00:Δ:φ+    morphed 𝑛·0·9 ≔ 𝑛·0·8
test-resources/evaluate-packs/answers-the-same-dataization-loop-under-partial.yaml view
@@ -16,36 +16,36 @@ partial: true steps: 250 input: >-  ⟦ cyc ↦ ⟦ x ↦ ∅, φ ↦ Φ.cyc( ξ.x ) ⟧,-    x ↦ ⟦ arg ↦ Φ.cyc( ⟦⟧ ), λ ⤍ L_outer ⟧.bar ⟧+  ⟦ cyc ↦ ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ↦ ξ.x ) ⟧,+    x ↦ ⟦ arg ↦ Φ.cyc( x ↦ ⟦⟧ ), λ ⤍ L_outer ⟧.bar ⟧ result: '𝜎2:λ' protocol: |   𝕄(Φ.x):     𝔼(L_outer):       𝔻(ξ.arg):         𝕄(ξ.arg):-          remembered 𝑛·1·1 ≡ Φ.cyc  # ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ) ⟧-          𝑛·1·2 := Φ.cyc( x ↦ ⟦⟧ )-          𝑛·1·3 := ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ) ⟧+          remembered 𝑛·1·1 ≡ Φ.cyc  # ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ↦ x ) ⟧+          𝑛·1·2 ≔ Φ.cyc( x ↦ ⟦⟧ )+          𝑛·1·3 ≔ ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ↦ x ) ⟧           remembered 𝑛·1·3 ≡ 𝑛·1·1( x ↦ ⟦⟧ )-          morphed 𝑛·1·4 := 𝑛·1·3-        boxed 𝑛·1·5 := 𝑛·1·4.φ-        normalized 𝑛·1·6 := Φ.cyc( ⟦⟧ )  # 𝑛·1·5+          morphed 𝑛·1·4 ≔ 𝑛·1·3+        boxed 𝑛·1·5 ≔ 𝑛·1·4.φ+        normalized 𝑛·1·6 ≔ 𝑛·1·2  # 𝑛·1·5         𝕄(𝑛·1·5):-          𝑛·1·7 := Φ.cyc( x ↦ ⟦⟧ )-          𝑛·1·8 := ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ) ⟧-          morphed 𝑛·1·9 := 𝑛·1·8+          𝑛·1·7 ≔ Φ.cyc( x ↦ ⟦⟧ )+          𝑛·1·8 ≔ ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ↦ x ) ⟧+          morphed 𝑛·1·9 ≔ 𝑛·1·8         recalled 𝑛·1·3 ⇒ 𝑛·1·1( x ↦ ⟦⟧ )         recalled 𝑛·1·1 ⇒ Φ.cyc         𝕄(𝑛·1·9.x):-          morphed 𝑛·1·10 := ⟦⟧-        looped 𝜎1 := Φ.cyc( x ↦ 𝑛·1·10 )  # 𝔻(𝑛·1·5), proven, repeats 𝑛·1·9-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.arg)-      𝑛·1·11 := 𝜎2:λ:bar  # 𝑛 of L_outer+          morphed 𝑛·1·10 ≔ ⟦⟧+        looped 𝜎1 ≔ Φ.cyc( x ↦ 𝑛·1·10 )  # 𝔻(𝑛·1·5), proven, repeats 𝑛·1·9+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.arg)+      𝑛·1·11 ≔ 𝜎2:λ:bar  # 𝑛 of L_outer       𝕄(𝑛·1·11):-        morphed 𝑛·1·12 := 𝜎2:λ:bar-      𝑛·1·13 := 𝑛·1·12  # 𝕄(𝑛·1·11)-      evaluated 𝑛·1·14 := 𝑛·1·13  # ⟦ arg ↦ Φ.cyc( 𝑛·1·10 ), λ ⤍ L_outer ⟧-    normalized 𝑛·0·1 := 𝜎2:λ  # 𝑛·1·14.bar-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·12 ≔ 𝜎2:λ:bar+      𝑛·1·13 ≔ 𝑛·1·12  # 𝕄(𝑛·1·11)+      evaluated 𝑛·1·14 ≔ 𝑛·1·13  # ⟦ arg ↦ 𝑛·1·7, λ ⤍ L_outer ⟧+    normalized 𝑛·0·1 ≔ 𝜎2:λ  # 𝑛·1·14.bar+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/answers-the-same-under-acyclic.yaml view
@@ -17,54 +17,54 @@ input: >   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.plus( 6 ).φ ⟧+    φ ↦ 5.plus( x ↦ 6 ).φ ⟧ result: '𝜎1:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ 6.0 )-    𝑛·0·6 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 6.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 6.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 6.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·22):-        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )-        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·1·25 := 𝑛·1·24-      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·6-    normalized 𝑛·0·7 := 𝜎1:λ  # 𝑛·1·27.φ-    morphed 𝑛·0·8 := 𝑛·0·7+        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )+        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·1·25 ≔ 𝑛·1·24+      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ 𝜎1:λ  # 𝑛·1·27.φ+    morphed 𝑛·0·8 ≔ 𝑛·0·7
+ test-resources/evaluate-packs/assumes-a-side-read-off-a-path-that-dispatches-off-a-symbol.yaml view
@@ -0,0 +1,35 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# The join reads its left side off a path, which dispatches 'q' off a bare+# symbol and is 'opaque', giving a new symbol (#2479). The join takes the right+# side for that symbol and writes an 'assumed' line (#2469).+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.on🌵+    join:+      on: 𝛿1+      left: $.left🌵+      right: $.right🌵+location: 'Q.e1'+input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧.q, right🌵 ↦ ⟦ φ ↦ Φ.k ⟧ ⟧.φ ⟧'+result: '⟦⟧:q'+protocol: |+  𝕄(Φ.e1):+    𝔼(L_fork):+      𝔻(ξ.on🌵):+        𝛿·1·1 ≔ 00-+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)+      𝕄(ξ.left🌵):+        opaque 𝜎2:λ ≔ 𝜎1:λ.q+        morphed 𝑛·1·1 ≔ 𝜎2:λ+      𝕄(ξ.right🌵):+        morphed 𝑛·1·2 ≔ Φ.k:φ+      assumed 𝜎2:λ ≡ 𝑛·1·2+      𝑛·1·3 ≔ 𝑛·1·2+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ 𝜎1:λ.q, right🌵 ↦ 𝑛·1·3 ⟧+    normalized 𝑛·0·1 ≔ Φ.k  # 𝑛·1·4.φ+    normalized 𝑛·0·2 ≔ ⟦⟧:q  # Φ.k+    morphed 𝑛·0·3 ≔ 𝑛·0·2
+ test-resources/evaluate-packs/assumes-a-side-that-dispatches-off-a-symbol.yaml view
@@ -0,0 +1,41 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# The right side dispatches 'q' off a bare symbol, which nothing answers, so+# its morph is 'opaque' and gives a new symbol (#2479). The join takes the+# left side for that symbol and writes an 'assumed' line (#2469).+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.on🌵+    morph:+      𝑛1: $.left🌵+      𝑛2: $.right🌵+    join:+      on: 𝛿1+      left: 𝑛1+      right: 𝑛2+      otherwise: L_fork+location: 'Q.e1'+input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ φ ↦ Φ.k ⟧, right🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧.φ ⟧'+result: '⟦⟧:q'+protocol: |+  𝕄(Φ.e1):+    𝔼(L_fork):+      𝔻(ξ.on🌵):+        𝛿·1·1 ≔ 00-+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)+      𝕄(ξ.left🌵):+        morphed 𝑛·1·1 ≔ Φ.k:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.left🌵)+      𝕄(ξ.right🌵):+        opaque 𝜎2:λ ≔ 𝜎1:λ.q+        morphed 𝑛·1·2 ≔ 𝜎2:λ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.right🌵)+      assumed 𝜎2:λ ≡ 𝑛1·1+      𝑛·1·3 ≔ 𝑛·1·1+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ 𝑛·1·3, right🌵 ↦ 𝜎1:λ.q ⟧+    normalized 𝑛·0·1 ≔ Φ.k  # 𝑛·1·4.φ+    normalized 𝑛·0·2 ≔ ⟦⟧:q  # Φ.k+    morphed 𝑛·0·3 ≔ 𝑛·0·2
+ test-resources/evaluate-packs/assumes-a-side-whose-evaluate-line-dispatches-off-a-symbol.yaml view
@@ -0,0 +1,56 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# An 'evaluate' line of a joining entry fires a copy of 'L_id', whose operand+# dispatches off a bare symbol and is 'opaque', giving a new symbol (#2479).+# 'L_id' answers it, and the join takes the right side for that symbol.+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.on🌵+    morph:+      𝑛1: $.left🌵+      𝑛2: $.right🌵+    evaluate:+      𝑛3: 𝑛1+    join:+      on: 𝛿1+      left: 𝑛3+      right: 𝑛2+  - λ: L_id+    morph:+      𝑛1: $.x+    𝑛: 𝑛1+location: 'Q.e1'+input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ λ ⤍ L_id, x ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧, right🌵 ↦ ⟦ φ ↦ Φ.k ⟧ ⟧.φ ⟧'+result: '⟦⟧:q'+protocol: |+  𝕄(Φ.e1):+    𝔼(L_fork):+      𝔻(ξ.on🌵):+        𝛿·1·1 ≔ 00-+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)+      𝕄(ξ.left🌵):+        morphed 𝑛·1·1 ≔ ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧+      𝑛1·1 ≔ ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧  # 𝕄(ξ.left🌵)+      𝕄(ξ.right🌵):+        morphed 𝑛·1·2 ≔ Φ.k:φ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.right🌵)+      𝔼(L_id):  # 𝔼(𝑛1 of L_fork)+        𝕄(ξ.x):+          opaque 𝜎2:λ ≔ 𝜎1:λ.q+          morphed 𝑛·2·1 ≔ 𝜎2:λ+        𝑛1·2 ≔ 𝑛·2·1  # 𝕄(ξ.x)+        𝑛·2·2 ≔ 𝑛1·2  # 𝑛 of L_id+        𝕄(𝑛·2·2):+          morphed 𝑛·2·3 ≔ 𝑛1·2+        𝑛·2·4 ≔ 𝑛1·2  # 𝕄(𝑛·2·2)+        evaluated 𝑛·2·5 ≔ 𝑛·2·4  # ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧+      𝑛3·1 ≔ 𝑛·2·4  # 𝔼(𝑛1 of L_fork)+      assumed 𝜎2:λ ≡ 𝑛2·1+      𝑛·1·3 ≔ 𝑛·1·2+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧, right🌵 ↦ 𝑛·1·3 ⟧+    normalized 𝑛·0·1 ≔ Φ.k  # 𝑛·1·4.φ+    normalized 𝑛·0·2 ≔ ⟦⟧:q  # Φ.k+    morphed 𝑛·0·3 ≔ 𝑛·0·2
test-resources/evaluate-packs/binds-a-copy-over-no-bare-symbol-as-it-is.yaml view
@@ -21,14 +21,14 @@     𝔼(L_hold):       𝕄(ξ.b):         remembered 𝑛·1·1 ≡ Φ.step  # ⟦ tup ↦ ∅, φ ↦ tup.next ⟧-        𝑛·1·2 := Φ.step( tup ↦ Φ.items.tail )-        𝑛·1·3 := ⟦ tup ↦ Φ.items.tail, φ ↦ tup.next ⟧+        𝑛·1·2 ≔ Φ.step( tup ↦ Φ.items.tail )+        𝑛·1·3 ≔ ⟦ tup ↦ Φ.items.tail, φ ↦ tup.next ⟧         remembered 𝑛·1·3 ≡ 𝑛·1·1( tup ↦ Φ.items.tail )-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·4  # 𝕄(ξ.b)-      𝑛·1·5 := 𝑛·1·4:φ  # 𝑛 of L_hold+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·4  # 𝕄(ξ.b)+      𝑛·1·5 ≔ 𝑛·1·4:φ  # 𝑛 of L_hold       𝕄(𝑛·1·5):-        morphed 𝑛·1·6 := 𝑛·1·4:φ-      𝑛·1·7 := 𝑛·1·6  # 𝕄(𝑛·1·5)-      evaluated 𝑛·1·8 := 𝑛·1·7  # ⟦ b ↦ 𝑛·1·2, λ ⤍ L_hold ⟧-    morphed 𝑛·0·1 := 𝑛·1·4+        morphed 𝑛·1·6 ≔ 𝑛·1·4:φ+      𝑛·1·7 ≔ 𝑛·1·6  # 𝕄(𝑛·1·5)+      evaluated 𝑛·1·8 ≔ 𝑛·1·7  # ⟦ b ↦ 𝑛·1·2, λ ⤍ L_hold ⟧+    morphed 𝑛·0·1 ≔ 𝑛·1·4
test-resources/evaluate-packs/binds-a-copy-whose-method-alone-reads-to-a-bare-symbol-as-it-is.yaml view
@@ -21,14 +21,14 @@     𝔼(L_hold):       𝕄(ξ.b):         remembered 𝑛·1·1 ≡ Φ.step  # ⟦ tup ↦ ∅, φ ↦ Φ.done, m ↦ Φ.items.tail ⟧-        𝑛·1·2 := Φ.step( tup ↦ Φ.items.head )-        𝑛·1·3 := ⟦ tup ↦ Φ.items.head, φ ↦ Φ.done, m ↦ Φ.items.tail ⟧+        𝑛·1·2 ≔ Φ.step( tup ↦ Φ.items.head )+        𝑛·1·3 ≔ ⟦ tup ↦ Φ.items.head, φ ↦ Φ.done, m ↦ Φ.items.tail ⟧         remembered 𝑛·1·3 ≡ 𝑛·1·1( tup ↦ Φ.items.head )-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·4  # 𝕄(ξ.b)-      𝑛·1·5 := 𝑛·1·4:φ  # 𝑛 of L_hold+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·4  # 𝕄(ξ.b)+      𝑛·1·5 ≔ 𝑛·1·4:φ  # 𝑛 of L_hold       𝕄(𝑛·1·5):-        morphed 𝑛·1·6 := 𝑛·1·4:φ-      𝑛·1·7 := 𝑛·1·6  # 𝕄(𝑛·1·5)-      evaluated 𝑛·1·8 := 𝑛·1·7  # ⟦ b ↦ 𝑛·1·2, λ ⤍ L_hold ⟧-    morphed 𝑛·0·1 := 𝑛·1·4+        morphed 𝑛·1·6 ≔ 𝑛·1·4:φ+      𝑛·1·7 ≔ 𝑛·1·6  # 𝕄(𝑛·1·5)+      evaluated 𝑛·1·8 ≔ 𝑛·1·7  # ⟦ b ↦ 𝑛·1·2, λ ⤍ L_hold ⟧+    morphed 𝑛·0·1 ≔ 𝑛·1·4
test-resources/evaluate-packs/binds-a-copy-whose-phi-repeats-the-formation-fired-as-it-is.yaml view
@@ -36,48 +36,48 @@ input: >   ⟦ no ↦ ⟦ φ ↦ 00-:Δ, not ↦ FF-:Δ ⟧,     fork(on🌵, left🌵, right🌵) ↦ ⟦ λ ⤍ L_fork ⟧,-    down(i) ↦ ⟦ φ ↦ Φ.fork( 𝜎1:λ, Φ.down( i ↦ 𝜎2:λ ), Φ.no ) ⟧,+    down(i) ↦ ⟦ φ ↦ Φ.fork( on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ), right🌵 ↦ Φ.no ) ⟧,     y ↦ Φ.down( i ↦ 𝜎3:λ ).not ⟧ result: '⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.not, right🌵 ↦ ρ.right🌵.not ⟧' protocol: |   𝕄(Φ.y):-    remembered 𝑛·0·1 ≡ Φ.down  # ⟦ i ↦ ∅, φ ↦ Φ.fork( 𝜎1:λ, Φ.down( i ↦ 𝜎2:λ ), Φ.no ) ⟧-    𝑛·0·2 := Φ.down( i ↦ 𝜎3:λ )-    𝑛·0·3 := ⟦ i ↦ 𝜎3:λ, φ ↦ Φ.fork( 𝜎1:λ, Φ.down( i ↦ 𝜎2:λ ), Φ.no ) ⟧+    remembered 𝑛·0·1 ≡ Φ.down  # ⟦ i ↦ ∅, φ ↦ Φ.fork( on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ), right🌵 ↦ Φ.no ) ⟧+    𝑛·0·2 ≔ Φ.down( i ↦ 𝜎3:λ )+    𝑛·0·3 ≔ ⟦ i ↦ 𝜎3:λ, φ ↦ Φ.fork( on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ), right🌵 ↦ Φ.no ) ⟧     remembered 𝑛·0·3 ≡ 𝑛·0·1( i ↦ 𝜎3:λ )-    normalized 𝑛·0·4 := Φ.fork( 𝜎1:λ, Φ.down( i ↦ 𝜎2:λ ), Φ.no ).not  # 𝑛·0·3.φ.not+    normalized 𝑛·0·4 ≔ Φ.fork( on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ), right🌵 ↦ Φ.no ).not  # 𝑛·0·3.φ.not     remembered 𝑛·0·5 ≡ Φ.fork  # ⟦ on🌵 ↦ ∅, left🌵 ↦ ∅, right🌵 ↦ ∅, λ ⤍ L_fork ⟧-    𝑛·0·6 := Φ.fork( on🌵 ↦ 𝜎1:λ )-    𝑛·0·7 := ⟦ on🌵 ↦ 𝜎1:λ, left🌵 ↦ ∅, right🌵 ↦ ∅, λ ⤍ L_fork ⟧+    𝑛·0·6 ≔ Φ.fork( on🌵 ↦ 𝜎1:λ )+    𝑛·0·7 ≔ ⟦ on🌵 ↦ 𝜎1:λ, left🌵 ↦ ∅, right🌵 ↦ ∅, λ ⤍ L_fork ⟧     remembered 𝑛·0·7 ≡ 𝑛·0·5( on🌵 ↦ 𝜎1:λ )-    𝑛·0·8 := 𝑛·0·6( left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ) )-    𝑛·0·9 := ⟦ on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ), right🌵 ↦ ∅, λ ⤍ L_fork ⟧+    𝑛·0·8 ≔ 𝑛·0·6( left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ) )+    𝑛·0·9 ≔ ⟦ on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ), right🌵 ↦ ∅, λ ⤍ L_fork ⟧     remembered 𝑛·0·9 ≡ 𝑛·0·7( left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ) )-    𝑛·0·10 := 𝑛·0·8( right🌵 ↦ Φ.no )-    𝑛·0·11 := ⟦ on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ), right🌵 ↦ Φ.no, λ ⤍ L_fork ⟧+    𝑛·0·10 ≔ 𝑛·0·8( right🌵 ↦ Φ.no )+    𝑛·0·11 ≔ ⟦ on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.down( i ↦ 𝜎2:λ ), right🌵 ↦ Φ.no, λ ⤍ L_fork ⟧     remembered 𝑛·0·11 ≡ 𝑛·0·9( right🌵 ↦ Φ.no )     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        𝑛·1·1 := Φ.down( i ↦ 𝜎2:λ )-        𝑛·1·2 := ⟦ i ↦ 𝜎2:λ, φ ↦ Φ.fork( 𝜎1:λ, Φ.down( i ↦ 𝜎2:λ ), Φ.no ) ⟧+        𝑛·1·1 ≔ Φ.down( i ↦ 𝜎2:λ )+        𝑛·1·2 ≔ ⟦ i ↦ 𝜎2:λ, φ ↦ 𝑛·0·10 ⟧         remembered 𝑛·1·2 ≡ 𝑛·0·1( i ↦ 𝜎2:λ )-        morphed 𝑛·1·3 := 𝑛·1·2+        morphed 𝑛·1·3 ≔ 𝑛·1·2         recalled 𝑛·1·2 ⇒ 𝑛·0·1( i ↦ 𝜎2:λ )         recalled 𝑛·0·1 ⇒ Φ.down-        passed 𝑛·1·4 := Φ.down( i ↦ 𝜎2:λ )  # plausible, repeats 𝑛·0·3-      𝑛1·1 := 𝑛·1·4  # 𝕄(ξ.left🌵)+        passed 𝑛·1·4 ≔ Φ.down( i ↦ 𝜎2:λ )  # plausible, repeats 𝑛·0·3+      𝑛1·1 ≔ 𝑛·1·4  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):         remembered 𝑛·1·5 ≡ Φ.no  # ⟦ φ ↦ 00-:Δ, not ↦ FF-:Δ ⟧-        morphed 𝑛·1·6 := 𝑛·1·5-      𝑛2·1 := 𝑛·1·6  # 𝕄(ξ.right🌵)-      symbolized 𝜎4 := 00--      𝑛4·1 := ⟦ φ ↦ 𝜎4:λ, not ↦ FF-:Δ ⟧  # symbolize(𝑛2 of L_fork)-      fabricated 𝑛·1·7 := 𝑛·1·4 and 𝑛4·1  # ⟦ left🌵 ↦ 𝑛·1·4, right🌵 ↦ 𝑛4·1, i ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.i, right🌵 ↦ ρ.right🌵.i ⟧, φ ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, not ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.not, right🌵 ↦ ρ.right🌵.not ⟧ ⟧+        morphed 𝑛·1·6 ≔ 𝑛·1·5+      𝑛2·1 ≔ 𝑛·1·6  # 𝕄(ξ.right🌵)+      symbolized 𝜎4 ≔ 00-+      𝑛4·1 ≔ ⟦ φ ↦ 𝜎4:λ, not ↦ FF-:Δ ⟧  # symbolize(𝑛2 of L_fork)+      fabricated 𝑛·1·7 ≔ 𝑛·1·4 and 𝑛4·1  # ⟦ left🌵 ↦ 𝑛·1·4, right🌵 ↦ 𝑛4·1, i ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.i, right🌵 ↦ ρ.right🌵.i ⟧, φ ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, not ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.not, right🌵 ↦ ρ.right🌵.not ⟧ ⟧       remembered 𝑛·1·7 ≡ 𝑛·0·11       memoized 𝑛·0·11 ⇛ 𝑛·1·7-      evaluated 𝑛·1·8 := 𝑛·1·7  # 𝑛·0·11+      evaluated 𝑛·1·8 ≔ 𝑛·1·7  # 𝑛·0·11     remembered 𝑛·0·12 ≡ 𝑛·1·8.not  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.not, right🌵 ↦ ρ.right🌵.not ⟧-    morphed 𝑛·0·13 := 𝑛·0·12+    morphed 𝑛·0·13 ≔ 𝑛·0·12
test-resources/evaluate-packs/copies-a-call-written-twice-once.yaml view
@@ -11,8 +11,9 @@ result: '⟦ x ↦ 𝜎1:λ, φ ↦ x ⟧' protocol: |   𝕄(Φ.y):-    𝑛·0·1 := ⟦ x ↦ ∅, φ ↦ x ⟧( x ↦ 𝜎1:λ )-    𝑛·0·2 := ⟦ x ↦ 𝜎1:λ, φ ↦ x ⟧+    𝑛·0·1 ≔ ⟦ x ↦ ∅, φ ↦ x ⟧( x ↦ 𝜎1:λ )+    𝑛·0·2 ≔ ⟦ x ↦ 𝜎1:λ, φ ↦ x ⟧     recalled 𝑛·0·1 ⇒ 𝑛·0·2-    normalized 𝑛·0·3 := ⟦ a ↦ 𝑛·0·2, b ↦ 𝑛·0·2 ⟧  # Φ.c-    morphed 𝑛·0·4 := 𝑛·0·2+    normalized 𝑛·0·3 ≔ ⟦ a ↦ 𝑛·0·2, b ↦ 𝑛·0·2 ⟧  # Φ.c+    remembered 𝑛·0·2 ≡ Φ.c.b+    morphed 𝑛·0·4 ≔ 𝑛·0·2
test-resources/evaluate-packs/cuts-a-loop-met-at-a-dispatch-off-an-atom.yaml view
@@ -23,48 +23,49 @@ input: >   ⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧,     times(b) ↦ ⟦ λ ⤍ L_times ⟧,-    x ↦ Φ.times( Φ.dataized( Φ.x.q ) ),+    x ↦ Φ.times( b ↦ Φ.dataized( target ↦ Φ.x.q ) ),     y ↦ Φ.x.q ⟧-result: '𝜎3:λ.q'+result: '𝜎4:λ' protocol: |   𝕄(Φ.y):-    normalized 𝑛·0·1 := Φ.times( Φ.dataized( Φ.x.q ) )  # Φ.x+    normalized 𝑛·0·1 ≔ Φ.times( b ↦ Φ.dataized( target ↦ Φ.x.q ) )  # Φ.x     remembered 𝑛·0·2 ≡ Φ.times  # ⟦ b ↦ ∅, λ ⤍ L_times ⟧-    𝑛·0·3 := Φ.times( b ↦ Φ.dataized( Φ.x.q ) )-    𝑛·0·4 := ⟦ b ↦ Φ.dataized( Φ.x.q ), λ ⤍ L_times ⟧-    remembered 𝑛·0·4 ≡ 𝑛·0·2( b ↦ Φ.dataized( Φ.x.q ) )+    𝑛·0·3 ≔ Φ.times( b ↦ Φ.dataized( target ↦ Φ.x.q ) )+    𝑛·0·4 ≔ ⟦ b ↦ Φ.dataized( target ↦ Φ.x.q ), λ ⤍ L_times ⟧+    remembered 𝑛·0·4 ≡ 𝑛·0·2( b ↦ Φ.dataized( target ↦ Φ.x.q ) )     𝔼(L_times):       𝔻(ξ.b):         𝕄(ξ.b):           remembered 𝑛·1·1 ≡ Φ.dataized  # ⟦ target ↦ ∅, λ ⤍ L_dataized ⟧-          𝑛·1·2 := Φ.dataized( target ↦ Φ.x.q )-          𝑛·1·3 := ⟦ target ↦ Φ.x.q, λ ⤍ L_dataized ⟧+          𝑛·1·2 ≔ Φ.dataized( target ↦ Φ.x.q )+          𝑛·1·3 ≔ ⟦ target ↦ Φ.x.q, λ ⤍ L_dataized ⟧           remembered 𝑛·1·3 ≡ 𝑛·1·1( target ↦ Φ.x.q )-          morphed 𝑛·1·4 := 𝑛·1·3+          morphed 𝑛·1·4 ≔ 𝑛·1·3         𝔼(L_dataized):           𝔻(ξ.target):             𝕄(ξ.target):-              normalized 𝑛·2·1 := Φ.times( Φ.dataized( Φ.x.q ) )  # Φ.x-              𝑛·2·2 := Φ.times( b ↦ Φ.dataized( Φ.x.q ) )-              𝑛·2·3 := ⟦ b ↦ Φ.dataized( Φ.x.q ), λ ⤍ L_times ⟧-              recalled 𝑛·0·4 ⇒ 𝑛·0·2( b ↦ Φ.dataized( Φ.x.q ) )+              normalized 𝑛·2·1 ≔ 𝑛·0·3  # Φ.x+              𝑛·2·2 ≔ Φ.times( b ↦ 𝑛·1·2 )+              𝑛·2·3 ≔ ⟦ b ↦ 𝑛·1·2, λ ⤍ L_times ⟧+              recalled 𝑛·0·4 ⇒ 𝑛·0·2( b ↦ Φ.dataized( target ↦ Φ.x.q ) )               recalled 𝑛·0·2 ⇒ Φ.times-              looped 𝜎1 := 𝑛·2·2.q  # plausible, repeats 𝑛·2·3-              morphed 𝑛·2·4 := 𝜎1:λ-            𝛿·2·1 := 𝔻(𝜎1:λ)-          𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.target)-          𝑛·2·5 := 𝜎2:λ  # 𝑛 of L_dataized+              looped 𝜎1 ≔ 𝑛·2·2.q  # plausible, repeats 𝑛·2·3+              morphed 𝑛·2·4 ≔ 𝜎1:λ+            𝛿·2·1 ≔ 𝔻(𝜎1:λ)+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.target)+          𝑛·2·5 ≔ 𝜎2:λ  # 𝑛 of L_dataized           𝕄(𝑛·2·5):-            morphed 𝑛·2·6 := 𝜎2:λ-          𝑛·2·7 := 𝑛·2·6  # 𝕄(𝑛·2·5)+            morphed 𝑛·2·6 ≔ 𝜎2:λ+          𝑛·2·7 ≔ 𝑛·2·6  # 𝕄(𝑛·2·5)           memoized 𝑛·1·3 ⇛ 𝜎2:λ-          evaluated 𝑛·2·8 := 𝑛·2·7  # 𝑛·1·3-        𝛿·1·1 := 𝔻(𝜎2:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.b)-      𝑛·1·5 := 𝜎3:λ  # 𝑛 of L_times+          evaluated 𝑛·2·8 ≔ 𝑛·2·7  # 𝑛·1·3+        𝛿·1·1 ≔ 𝔻(𝜎2:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.b)+      𝑛·1·5 ≔ 𝜎3:λ  # 𝑛 of L_times       𝕄(𝑛·1·5):-        morphed 𝑛·1·6 := 𝜎3:λ-      𝑛·1·7 := 𝑛·1·6  # 𝕄(𝑛·1·5)+        morphed 𝑛·1·6 ≔ 𝜎3:λ+      𝑛·1·7 ≔ 𝑛·1·6  # 𝕄(𝑛·1·5)       memoized 𝑛·2·3 ⇛ 𝜎3:λ-      evaluated 𝑛·1·8 := 𝑛·1·7  # 𝑛·2·3-    opaque 𝜎3  # 𝕄(𝜎3:λ.q)+      evaluated 𝑛·1·8 ≔ 𝑛·1·7  # 𝑛·2·3+    opaque 𝜎4:λ ≔ 𝜎3:λ.q+    morphed 𝑛·0·5 ≔ 𝜎4:λ
test-resources/evaluate-packs/cuts-a-recursion-running-through-evaluate-lines.yaml view
@@ -8,8 +8,8 @@ # enters the formation the way 'ml' does, so the second firing is cut before # it opens and writes a 'looped' line where its block would have stood # (#1882). The formation is a copy of 'Φ.loop', so the cut answers it with a-# fresh symbol (#2275), and the dispatch of φ off that symbol is parked. The-# budget of firings is there only to end the run if the cut is ever lost+# fresh symbol (#2275), and the dispatch of φ off that symbol gives a new+# symbol (#2479). The budget of firings is there only to end the run if the cut is ever lost # again. symbolic: |   - λ: L_loop@@ -23,21 +23,22 @@ partial: true firings: 5 input: '⟦ loop ↦ ⟦ next🌵 ↦ Φ.loop, λ ⤍ L_loop ⟧, app ↦ Φ.loop.φ ⟧'-result: '𝜎1:λ.φ'+result: '𝜎2:λ' protocol: |   𝕄(Φ.app):     remembered 𝑛·0·1 ≡ Φ.loop  # ⟦ next🌵 ↦ Φ.loop, λ ⤍ L_loop ⟧     𝔼(L_loop):       𝕄(ξ.next🌵):-        morphed 𝑛·1·1 := 𝑛·0·1-      𝑛1·1 := 𝑛·0·1  # 𝕄(ξ.next🌵)+        morphed 𝑛·1·1 ≔ 𝑛·0·1+      𝑛1·1 ≔ 𝑛·0·1  # 𝕄(ξ.next🌵)       recalled 𝑛·0·1 ⇒ Φ.loop       recalled 𝑛·0·1 ⇒ Φ.loop-      looped 𝜎1 := Φ.loop  # 𝔼(𝑛1 of L_loop), proven, repeats 𝑛·0·1-      𝑛2·1 := 𝜎1:λ  # 𝔼(𝑛1 of L_loop)-      𝑛·1·2 := 𝑛2·1  # 𝑛 of L_loop+      looped 𝜎1 ≔ Φ.loop  # 𝔼(𝑛1 of L_loop), proven, repeats 𝑛·0·1+      𝑛2·1 ≔ 𝜎1:λ  # 𝔼(𝑛1 of L_loop)+      𝑛·1·2 ≔ 𝑛2·1  # 𝑛 of L_loop       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := 𝑛2·1-      𝑛·1·4 := 𝑛2·1  # 𝕄(𝑛·1·2)-      evaluated 𝑛·1·5 := 𝑛·1·4  # 𝑛·0·1-    opaque 𝜎1  # 𝕄(𝜎1:λ.φ)+        morphed 𝑛·1·3 ≔ 𝑛2·1+      𝑛·1·4 ≔ 𝑛2·1  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # 𝑛·0·1+    opaque 𝜎2:λ ≔ 𝜎1:λ.φ+    morphed 𝑛·0·2 ≔ 𝜎2:λ
test-resources/evaluate-packs/cuts-a-recursion-that-differs-by-symbols-only.yaml view
@@ -26,24 +26,24 @@ protocol: |   𝕄(Φ.y):     remembered 𝑛·0·1 ≡ Φ.down  # ⟦ x ↦ ∅, λ ⤍ L_down ⟧-    𝑛·0·2 := Φ.down( x ↦ 𝜎1:λ )-    𝑛·0·3 := ⟦ x ↦ 𝜎1:λ, λ ⤍ L_down ⟧+    𝑛·0·2 ≔ Φ.down( x ↦ 𝜎1:λ )+    𝑛·0·3 ≔ ⟦ x ↦ 𝜎1:λ, λ ⤍ L_down ⟧     remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ 𝜎1:λ )     𝔼(L_down):       𝔻(ξ.x):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.x)-      𝑛·1·1 := Φ.down( x ↦ 𝜎2:λ )  # 𝑛 of L_down+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.x)+      𝑛·1·1 ≔ Φ.down( x ↦ 𝜎2:λ )  # 𝑛 of L_down       𝕄(𝑛·1·1):-        𝑛·1·2 := Φ.down( x ↦ 𝜎2:λ )-        𝑛·1·3 := ⟦ x ↦ 𝜎2:λ, λ ⤍ L_down ⟧+        𝑛·1·2 ≔ Φ.down( x ↦ 𝜎2:λ )+        𝑛·1·3 ≔ ⟦ x ↦ 𝜎2:λ, λ ⤍ L_down ⟧         remembered 𝑛·1·3 ≡ 𝑛·0·1( x ↦ 𝜎2:λ )-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛·1·5 := 𝑛·1·3  # 𝕄(𝑛·1·1)+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛·1·5 ≔ 𝑛·1·3  # 𝕄(𝑛·1·1)       remembered 𝑛·1·3 ≡ 𝑛·0·3-      evaluated 𝑛·1·6 := 𝑛·1·3  # 𝑛·0·3+      evaluated 𝑛·1·6 ≔ 𝑛·1·3  # 𝑛·0·3     recalled 𝑛·1·3 ⇒ 𝑛·0·3     recalled 𝑛·0·3 ⇒ 𝑛·0·1( x ↦ 𝜎1:λ )     recalled 𝑛·0·1 ⇒ Φ.down-    looped 𝜎3 := 𝑛·0·2.φ  # proven, repeats 𝑛·0·3-    morphed 𝑛·0·4 := 𝜎3:λ+    looped 𝜎3 ≔ 𝑛·0·2.φ  # proven, repeats 𝑛·0·3+    morphed 𝑛·0·4 ≔ 𝜎3:λ
test-resources/evaluate-packs/cuts-an-entry-that-answers-with-a-firing-of-itself.yaml view
@@ -17,10 +17,10 @@ protocol: |   𝕄(Φ.x):     𝔼(L_loop):-      𝑛·1·1 := L_loop:λ  # 𝑛 of L_loop+      𝑛·1·1 ≔ L_loop:λ  # 𝑛 of L_loop       𝕄(𝑛·1·1):-        morphed 𝑛·1·2 := L_loop:λ-      𝑛·1·3 := L_loop:λ  # 𝕄(𝑛·1·1)-      evaluated 𝑛·1·4 := L_loop:λ  # L_loop:λ+        morphed 𝑛·1·2 ≔ L_loop:λ+      𝑛·1·3 ≔ L_loop:λ  # 𝕄(𝑛·1·1)+      evaluated 𝑛·1·4 ≔ L_loop:λ  # L_loop:λ     looped 𝜎1  # proven, repeats L_loop:λ-    morphed 𝑛·0·1 := 𝜎1:λ+    morphed 𝑛·0·1 ≔ 𝜎1:λ
+ test-resources/evaluate-packs/cuts-copies-of-one-atom-whatever-their-arguments.yaml view
@@ -0,0 +1,79 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# A recursion through copies of the atom 'f', each one fired inside the one+# before it, since 'L_g' dataizes its 'x', which comes to the next copy with a+# new argument, 'Φ.a1', 'Φ.a2', 'Φ.a3' and around again. The facts lead every+# copy back to 'Φ.f', so under '--acyclic=plausible' each repeats the copies+# fired above it and '--max-loops=1' lets one repeat through: the third copy is+# cut, however many objects the ring holds (#2466).+symbolic: |+  - λ: L_g+    dataize:+      𝛿1: $.x+    𝑛: ⟦ λ ⤍ 𝜎 ⟧+location: 'Q.app'+acyclic: plausible+loops: 1+partial: true+input: >+  ⟦ f(x) ↦ ⟦ λ ⤍ L_g ⟧,+    a1 ↦ ⟦ φ ↦ Φ.f( x ↦ Φ.a2 ) ⟧,+    a2 ↦ ⟦ φ ↦ Φ.f( x ↦ Φ.a3 ) ⟧,+    a3 ↦ ⟦ φ ↦ Φ.f( x ↦ Φ.a1 ) ⟧,+    app ↦ Φ.f( x ↦ Φ.a1 ).q ⟧+protocol: |+  𝕄(Φ.app):+    remembered 𝑛·0·1 ≡ Φ.f  # ⟦ x ↦ ∅, λ ⤍ L_g ⟧+    𝑛·0·2 ≔ Φ.f( x ↦ Φ.a1 )+    𝑛·0·3 ≔ ⟦ x ↦ Φ.a1, λ ⤍ L_g ⟧+    remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ Φ.a1 )+    𝔼(L_g):+      𝔻(ξ.x):+        𝕄(ξ.x):+          remembered 𝑛·1·1 ≡ Φ.a1  # Φ.f( x ↦ Φ.a2 ):φ+          morphed 𝑛·1·2 ≔ 𝑛·1·1+        boxed 𝑛·1·3 ≔ 𝑛·1·2.φ+        normalized 𝑛·1·4 ≔ Φ.f( x ↦ Φ.a2 )  # 𝑛·1·3+        𝕄(𝑛·1·3):+          𝑛·1·5 ≔ Φ.f( x ↦ Φ.a2 )+          𝑛·1·6 ≔ ⟦ x ↦ Φ.a2, λ ⤍ L_g ⟧+          remembered 𝑛·1·6 ≡ 𝑛·0·1( x ↦ Φ.a2 )+          morphed 𝑛·1·7 ≔ 𝑛·1·6+        𝔼(L_g):  # 𝔻(𝑛·1·3)+          𝔻(𝑛·1·3):+            𝕄(𝑛·1·3):+              remembered 𝑛·2·1 ≡ Φ.a2  # Φ.f( x ↦ Φ.a3 ):φ+              morphed 𝑛·2·2 ≔ 𝑛·2·1+            boxed 𝑛·2·3 ≔ 𝑛·2·2.φ+            normalized 𝑛·2·4 ≔ Φ.f( x ↦ Φ.a3 )  # 𝑛·2·3+            𝕄(𝑛·2·3):+              𝑛·2·5 ≔ Φ.f( x ↦ Φ.a3 )+              𝑛·2·6 ≔ ⟦ x ↦ Φ.a3, λ ⤍ L_g ⟧+              remembered 𝑛·2·6 ≡ 𝑛·0·1( x ↦ Φ.a3 )+              morphed 𝑛·2·7 ≔ 𝑛·2·6+            recalled 𝑛·2·6 ⇒ 𝑛·0·1( x ↦ Φ.a3 )+            recalled 𝑛·0·1 ⇒ Φ.f+            𝕄(𝑛·2·6.x):+              remembered 𝑛·2·8 ≡ Φ.a3  # 𝑛·0·2:φ+              morphed 𝑛·2·9 ≔ 𝑛·2·8+            looped 𝜎1 ≔ Φ.f( x ↦ 𝑛·2·9 )  # 𝔻(𝑛·2·3), plausible, repeats 𝑛·0·3+            𝛿·2·1 ≔ 𝔻(𝜎1:λ)+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.x)+          𝑛·2·10 ≔ 𝜎2:λ  # 𝑛 of L_g+          𝕄(𝑛·2·10):+            morphed 𝑛·2·11 ≔ 𝜎2:λ+          𝑛·2·12 ≔ 𝑛·2·11  # 𝕄(𝑛·2·10)+          memoized 𝑛·1·6 ⇛ 𝜎2:λ+          evaluated 𝑛·2·13 ≔ 𝑛·2·12  # 𝑛·1·6+        𝛿·1·1 ≔ 𝔻(𝜎2:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.x)+      𝑛·1·8 ≔ 𝜎3:λ  # 𝑛 of L_g+      𝕄(𝑛·1·8):+        morphed 𝑛·1·9 ≔ 𝜎3:λ+      𝑛·1·10 ≔ 𝑛·1·9  # 𝕄(𝑛·1·8)+      memoized 𝑛·0·3 ⇛ 𝜎3:λ+      evaluated 𝑛·1·11 ≔ 𝑛·1·10  # 𝑛·0·3+    opaque 𝜎4:λ ≔ 𝜎3:λ.q+    morphed 𝑛·0·4 ≔ 𝜎4:λ
+ test-resources/evaluate-packs/cuts-copies-of-one-nested-object-whatever-their-arguments.yaml view
@@ -0,0 +1,45 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# The recursion of #2462 with 'f' one level down, inside 'o', which binds+# neither φ nor λ. The facts never hold 'o', yet they lead every copy back to+# 'Φ.o.f', since a dispatch off 'Φ.o' is traced to that path all the same, so+# under '--acyclic=plausible' with '--max-loops=1' the third copy is cut, as+# it is for 'Φ.f' (#2464).+symbolic: |+  []+location: 'Q.app'+acyclic: plausible+loops: 1+partial: true+input: >+  ⟦ o ↦ ⟦ f(x) ↦ ⟦ φ ↦ ξ.x.call ⟧ ⟧,+    a1 ↦ ⟦ call ↦ Φ.o.f( x ↦ Φ.a2 ) ⟧,+    a2 ↦ ⟦ call ↦ Φ.o.f( x ↦ Φ.a3 ) ⟧,+    a3 ↦ ⟦ call ↦ Φ.o.f( x ↦ Φ.a1 ) ⟧,+    app ↦ Φ.o.f( x ↦ Φ.a1 ).q ⟧+result: '𝜎1:λ'+protocol: |+  𝕄(Φ.app):+    normalized 𝑛·0·1 ≔ ⟦ f(x) ↦ x.call:φ ⟧  # Φ.o+    remembered 𝑛·0·2 ≡ Φ.o.f  # ⟦ x ↦ ∅, φ ↦ x.call ⟧+    𝑛·0·3 ≔ 𝑛·0·2( x ↦ Φ.a1 )+    𝑛·0·4 ≔ ⟦ x ↦ Φ.a1, φ ↦ x.call ⟧+    remembered 𝑛·0·4 ≡ 𝑛·0·3+    normalized 𝑛·0·5 ≔ Φ.a1.call.q  # 𝑛·0·4.φ.q+    normalized 𝑛·0·6 ≔ Φ.o.f( x ↦ Φ.a2 ):call  # Φ.a1+    normalized 𝑛·0·7 ≔ Φ.o.f( x ↦ Φ.a2 )  # 𝑛·0·6.call+    𝑛·0·8 ≔ 𝑛·0·2( x ↦ Φ.a2 )+    𝑛·0·9 ≔ ⟦ x ↦ Φ.a2, φ ↦ x.call ⟧+    remembered 𝑛·0·9 ≡ 𝑛·0·8+    normalized 𝑛·0·10 ≔ Φ.a2.call.q  # 𝑛·0·9.φ.q+    normalized 𝑛·0·11 ≔ Φ.o.f( x ↦ Φ.a3 ):call  # Φ.a2+    normalized 𝑛·0·12 ≔ Φ.o.f( x ↦ Φ.a3 )  # 𝑛·0·11.call+    𝑛·0·13 ≔ 𝑛·0·2( x ↦ Φ.a3 )+    𝑛·0·14 ≔ ⟦ x ↦ Φ.a3, φ ↦ x.call ⟧+    remembered 𝑛·0·14 ≡ 𝑛·0·13+    recalled 𝑛·0·14 ⇒ 𝑛·0·13+    recalled 𝑛·0·2 ⇒ Φ.o.f+    looped 𝜎1 ≔ Φ.o.f( x ↦ Φ.a3 ).q  # plausible, repeats 𝑛·0·4+    morphed 𝑛·0·15 ≔ 𝜎1:λ
+ test-resources/evaluate-packs/cuts-copies-of-one-object-an-atom-gives-back.yaml view
@@ -0,0 +1,85 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# A recursion through copies of 'f', each one made inside the one before it+# with a new argument, 'Φ.a1', 'Φ.a2', 'Φ.a3' and around again, where the atom+# 'L_m' morphs the next copy and gives it back as its 'φ'. That copy gets a+# second fact, naming the place of the atom, such as 'Φ.a1.call.φ', yet the+# first one still leads it back to 'Φ.f', so under '--acyclic=plausible' it+# repeats the copies above it and '--max-loops=1' lets one repeat through: the+# third copy is cut, however many objects the ring holds (#2467).+symbolic: |+  - λ: L_m+    morph:+      𝑛1: $.t+    evaluate:+      𝑛2: 𝑛1+    𝑛: ⟦ φ ↦ 𝑛2 ⟧+location: 'Q.app'+acyclic: plausible+loops: 1+partial: true+input: >+  ⟦ f(x) ↦ ⟦ φ ↦ ξ.x.call ⟧,+    a1 ↦ ⟦ call ↦ ⟦ λ ⤍ L_m, t ↦ Φ.f( x ↦ Φ.a2 ) ⟧ ⟧,+    a2 ↦ ⟦ call ↦ ⟦ λ ⤍ L_m, t ↦ Φ.f( x ↦ Φ.a3 ) ⟧ ⟧,+    a3 ↦ ⟦ call ↦ ⟦ λ ⤍ L_m, t ↦ Φ.f( x ↦ Φ.a1 ) ⟧ ⟧,+    app ↦ Φ.f( x ↦ Φ.a1 ).q ⟧+result: '𝜎1:λ'+protocol: |+  𝕄(Φ.app):+    remembered 𝑛·0·1 ≡ Φ.f  # ⟦ x ↦ ∅, φ ↦ x.call ⟧+    𝑛·0·2 ≔ Φ.f( x ↦ Φ.a1 )+    𝑛·0·3 ≔ ⟦ x ↦ Φ.a1, φ ↦ x.call ⟧+    remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ Φ.a1 )+    normalized 𝑛·0·4 ≔ Φ.a1.call.q  # 𝑛·0·3.φ.q+    normalized 𝑛·0·5 ≔ ⟦ λ ⤍ L_m, t ↦ Φ.f( x ↦ Φ.a2 ) ⟧:call  # Φ.a1+    remembered 𝑛·0·6 ≡ Φ.a1.call  # ⟦ λ ⤍ L_m, t ↦ Φ.f( x ↦ Φ.a2 ) ⟧+    𝔼(L_m):+      𝕄(ξ.t):+        𝑛·1·1 ≔ Φ.f( x ↦ Φ.a2 )+        𝑛·1·2 ≔ ⟦ x ↦ Φ.a2, φ ↦ x.call ⟧+        remembered 𝑛·1·2 ≡ 𝑛·0·1( x ↦ Φ.a2 )+        morphed 𝑛·1·3 ≔ 𝑛·1·2+      𝑛1·1 ≔ 𝑛·1·3  # 𝕄(ξ.t)+      recalled 𝑛·1·2 ⇒ 𝑛·0·1( x ↦ Φ.a2 )+      recalled 𝑛·0·1 ⇒ Φ.f+      𝑛·1·4 ≔ 𝑛·1·3:φ  # 𝑛 of L_m+      𝕄(𝑛·1·4):+        morphed 𝑛·1·5 ≔ 𝑛·1·3:φ+      𝑛·1·6 ≔ 𝑛·1·5  # 𝕄(𝑛·1·4)+      remembered 𝑛·1·6 ≡ 𝑛·0·6+      memoized 𝑛·0·6 ⇛ 𝑛·1·6+      evaluated 𝑛·1·7 ≔ 𝑛·1·6  # 𝑛·0·6+    remembered 𝑛·1·3 ≡ 𝑛·1·7.φ+    normalized 𝑛·0·7 ≔ 𝑛·1·3.q  # 𝑛·1·7.φ.q+    normalized 𝑛·0·8 ≔ Φ.a2.call.q  # 𝑛·1·3.φ.q+    normalized 𝑛·0·9 ≔ ⟦ λ ⤍ L_m, t ↦ Φ.f( x ↦ Φ.a3 ) ⟧:call  # Φ.a2+    remembered 𝑛·0·10 ≡ Φ.a2.call  # ⟦ λ ⤍ L_m, t ↦ Φ.f( x ↦ Φ.a3 ) ⟧+    𝔼(L_m):+      𝕄(ξ.t):+        𝑛·2·1 ≔ Φ.f( x ↦ Φ.a3 )+        𝑛·2·2 ≔ ⟦ x ↦ Φ.a3, φ ↦ x.call ⟧+        remembered 𝑛·2·2 ≡ 𝑛·0·1( x ↦ Φ.a3 )+        morphed 𝑛·2·3 ≔ 𝑛·2·2+        recalled 𝑛·2·2 ⇒ 𝑛·0·1( x ↦ Φ.a3 )+        recalled 𝑛·0·1 ⇒ Φ.f+        passed 𝑛·2·4 ≔ Φ.f( x ↦ Φ.a3 )  # plausible, repeats 𝑛·0·3+      𝑛1·2 ≔ 𝑛·2·4  # 𝕄(ξ.t)+      recalled 𝑛·2·2 ⇒ 𝑛·0·1( x ↦ Φ.a3 )+      recalled 𝑛·0·1 ⇒ Φ.f+      𝑛·2·5 ≔ 𝑛·2·4:φ  # 𝑛 of L_m+      𝕄(𝑛·2·5):+        morphed 𝑛·2·6 ≔ 𝑛·2·4:φ+      𝑛·2·7 ≔ 𝑛·2·6  # 𝕄(𝑛·2·5)+      remembered 𝑛·2·7 ≡ 𝑛·0·10+      memoized 𝑛·0·10 ⇛ 𝑛·2·7+      evaluated 𝑛·2·8 ≔ 𝑛·2·7  # 𝑛·0·10+    remembered 𝑛·2·4 ≡ 𝑛·2·8.φ+    normalized 𝑛·0·11 ≔ 𝑛·2·4.q  # 𝑛·2·8.φ.q+    recalled 𝑛·2·4 ⇒ 𝑛·2·8.φ+    recalled 𝑛·2·7 ⇒ 𝑛·0·10+    recalled 𝑛·0·10 ⇒ Φ.a2.call+    looped 𝜎1 ≔ Φ.a2.call.φ.q  # plausible, repeats 𝑛·0·3+    morphed 𝑛·0·12 ≔ 𝜎1:λ
+ test-resources/evaluate-packs/cuts-copies-of-one-object-whatever-their-arguments-twice.yaml view
@@ -0,0 +1,50 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# A recursion through copies of 'f', each one made inside the one before it+# with a new argument, 'Φ.a1', 'Φ.a2', 'Φ.a3' and around again. No copy is+# embedded in the one before it, yet the facts lead every one of them back to+# 'Φ.f', so under '--acyclic=plausible' each repeats the copies above it and+# '--max-loops=2' lets two repeats through: the fourth copy is cut, however many+# objects the ring holds (#2462).+symbolic: |+  []+location: 'Q.app'+acyclic: plausible+loops: 2+partial: true+input: >+  ⟦ f(x) ↦ ⟦ φ ↦ ξ.x.call ⟧,+    a1 ↦ ⟦ call ↦ Φ.f( x ↦ Φ.a2 ) ⟧,+    a2 ↦ ⟦ call ↦ Φ.f( x ↦ Φ.a3 ) ⟧,+    a3 ↦ ⟦ call ↦ Φ.f( x ↦ Φ.a1 ) ⟧,+    app ↦ Φ.f( x ↦ Φ.a1 ).q ⟧+result: '𝜎1:λ'+protocol: |+  𝕄(Φ.app):+    remembered 𝑛·0·1 ≡ Φ.f  # ⟦ x ↦ ∅, φ ↦ x.call ⟧+    𝑛·0·2 ≔ Φ.f( x ↦ Φ.a1 )+    𝑛·0·3 ≔ ⟦ x ↦ Φ.a1, φ ↦ x.call ⟧+    remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ Φ.a1 )+    normalized 𝑛·0·4 ≔ Φ.a1.call.q  # 𝑛·0·3.φ.q+    normalized 𝑛·0·5 ≔ Φ.f( x ↦ Φ.a2 ):call  # Φ.a1+    normalized 𝑛·0·6 ≔ Φ.f( x ↦ Φ.a2 )  # 𝑛·0·5.call+    𝑛·0·7 ≔ Φ.f( x ↦ Φ.a2 )+    𝑛·0·8 ≔ ⟦ x ↦ Φ.a2, φ ↦ x.call ⟧+    remembered 𝑛·0·8 ≡ 𝑛·0·1( x ↦ Φ.a2 )+    normalized 𝑛·0·9 ≔ Φ.a2.call.q  # 𝑛·0·8.φ.q+    normalized 𝑛·0·10 ≔ Φ.f( x ↦ Φ.a3 ):call  # Φ.a2+    normalized 𝑛·0·11 ≔ Φ.f( x ↦ Φ.a3 )  # 𝑛·0·10.call+    𝑛·0·12 ≔ Φ.f( x ↦ Φ.a3 )+    𝑛·0·13 ≔ ⟦ x ↦ Φ.a3, φ ↦ x.call ⟧+    remembered 𝑛·0·13 ≡ 𝑛·0·1( x ↦ Φ.a3 )+    normalized 𝑛·0·14 ≔ Φ.a3.call.q  # 𝑛·0·13.φ.q+    normalized 𝑛·0·15 ≔ 𝑛·0·2:call  # Φ.a3+    normalized 𝑛·0·16 ≔ 𝑛·0·2  # 𝑛·0·15.call+    𝑛·0·17 ≔ Φ.f( x ↦ Φ.a1 )+    𝑛·0·18 ≔ ⟦ x ↦ Φ.a1, φ ↦ x.call ⟧+    recalled 𝑛·0·3 ⇒ 𝑛·0·1( x ↦ Φ.a1 )+    recalled 𝑛·0·1 ⇒ Φ.f+    looped 𝜎1 ≔ 𝑛·0·17.q  # plausible, repeats 𝑛·0·18+    morphed 𝑛·0·19 ≔ 𝜎1:λ
+ test-resources/evaluate-packs/cuts-copies-of-one-object-whatever-their-arguments.yaml view
@@ -0,0 +1,45 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# A recursion through copies of 'f', each one made inside the one before it+# with a new argument, 'Φ.a1', 'Φ.a2', 'Φ.a3' and around again. No copy is+# embedded in the one before it, yet the facts lead every one of them back to+# 'Φ.f', so under '--acyclic=plausible' each repeats the copies above it and+# '--max-loops=1' lets one repeat through: the third copy is cut, however many+# objects the ring holds (#2462).+symbolic: |+  []+location: 'Q.app'+acyclic: plausible+loops: 1+partial: true+input: >+  ⟦ f(x) ↦ ⟦ φ ↦ ξ.x.call ⟧,+    a1 ↦ ⟦ call ↦ Φ.f( x ↦ Φ.a2 ) ⟧,+    a2 ↦ ⟦ call ↦ Φ.f( x ↦ Φ.a3 ) ⟧,+    a3 ↦ ⟦ call ↦ Φ.f( x ↦ Φ.a1 ) ⟧,+    app ↦ Φ.f( x ↦ Φ.a1 ).q ⟧+result: '𝜎1:λ'+protocol: |+  𝕄(Φ.app):+    remembered 𝑛·0·1 ≡ Φ.f  # ⟦ x ↦ ∅, φ ↦ x.call ⟧+    𝑛·0·2 ≔ Φ.f( x ↦ Φ.a1 )+    𝑛·0·3 ≔ ⟦ x ↦ Φ.a1, φ ↦ x.call ⟧+    remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ Φ.a1 )+    normalized 𝑛·0·4 ≔ Φ.a1.call.q  # 𝑛·0·3.φ.q+    normalized 𝑛·0·5 ≔ Φ.f( x ↦ Φ.a2 ):call  # Φ.a1+    normalized 𝑛·0·6 ≔ Φ.f( x ↦ Φ.a2 )  # 𝑛·0·5.call+    𝑛·0·7 ≔ Φ.f( x ↦ Φ.a2 )+    𝑛·0·8 ≔ ⟦ x ↦ Φ.a2, φ ↦ x.call ⟧+    remembered 𝑛·0·8 ≡ 𝑛·0·1( x ↦ Φ.a2 )+    normalized 𝑛·0·9 ≔ Φ.a2.call.q  # 𝑛·0·8.φ.q+    normalized 𝑛·0·10 ≔ Φ.f( x ↦ Φ.a3 ):call  # Φ.a2+    normalized 𝑛·0·11 ≔ Φ.f( x ↦ Φ.a3 )  # 𝑛·0·10.call+    𝑛·0·12 ≔ Φ.f( x ↦ Φ.a3 )+    𝑛·0·13 ≔ ⟦ x ↦ Φ.a3, φ ↦ x.call ⟧+    remembered 𝑛·0·13 ≡ 𝑛·0·1( x ↦ Φ.a3 )+    recalled 𝑛·0·13 ⇒ 𝑛·0·1( x ↦ Φ.a3 )+    recalled 𝑛·0·1 ⇒ Φ.f+    looped 𝜎1 ≔ 𝑛·0·12.q  # plausible, repeats 𝑛·0·3+    morphed 𝑛·0·14 ≔ 𝜎1:λ
test-resources/evaluate-packs/dataizes-what-a-morph-operand-of-the-same-entry-brought-down.yaml view
@@ -25,19 +25,19 @@   𝕄(Φ.y):     𝔼(L_entry):       𝔻(ξ.n):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.n)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.n)       𝕄(ξ.v.φ):-        normalized 𝑛·1·1 := 2A-:Δ  # Φ.t-        morphed 𝑛·1·2 := 2A-:Δ-      𝑛1·1 := 2A-:Δ  # 𝕄(ξ.v.φ)+        normalized 𝑛·1·1 ≔ 2A-:Δ  # Φ.t+        morphed 𝑛·1·2 ≔ 2A-:Δ+      𝑛1·1 ≔ 2A-:Δ  # 𝕄(ξ.v.φ)       𝔻(𝑛1):-        𝛿·1·2 := 2A--      𝛿2·1 := 𝛿·1·2  # 𝔻(𝑛1 of L_entry)-      𝑛·1·3 := 𝜎2:λ:φ  # 𝑛 of L_entry+        𝛿·1·2 ≔ 2A-+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(𝑛1 of L_entry)+      𝑛·1·3 ≔ 𝜎2:λ:φ  # 𝑛 of L_entry       𝕄(𝑛·1·3):-        morphed 𝑛·1·4 := 𝜎2:λ:φ-      𝑛·1·5 := 𝑛·1·4  # 𝕄(𝑛·1·3)-      evaluated 𝑛·1·6 := 𝑛·1·5  # ⟦ n ↦ 𝜎1:λ, v ↦ Φ.t:φ, λ ⤍ L_entry ⟧-    normalized 𝑛·0·1 := 𝜎2:λ  # 𝑛·1·6.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·4 ≔ 𝜎2:λ:φ+      𝑛·1·5 ≔ 𝑛·1·4  # 𝕄(𝑛·1·3)+      evaluated 𝑛·1·6 ≔ 𝑛·1·5  # ⟦ n ↦ 𝜎1:λ, v ↦ Φ.t:φ, λ ⤍ L_entry ⟧+    normalized 𝑛·0·1 ≔ 𝜎2:λ  # 𝑛·1·6.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/defers-a-copy-a-join-passed-through-stay-and-symbolize.yaml view
@@ -44,35 +44,35 @@       𝔻(ξ.x):         𝔼(L_fork):           𝔻(ξ.c):-            𝛿·2·1 := 𝔻(𝜎2:λ)-          𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.c)+            𝛿·2·1 ≔ 𝔻(𝜎2:λ)+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.c)           𝕄(ξ.a):-            morphed 𝑛·2·1 := 01-:Δ-          𝑛1·2 := 01-:Δ  # 𝕄(ξ.a)+            morphed 𝑛·2·1 ≔ 01-:Δ+          𝑛1·2 ≔ 01-:Δ  # 𝕄(ξ.a)           𝕄(ξ.b):             remembered 𝑛·2·2 ≡ Φ.step  # ⟦ tup ↦ ∅, φ ↦ tup.next ⟧-            𝑛·2·3 := Φ.step( tup ↦ Φ.items.tail )-            𝑛·2·4 := ⟦ tup ↦ Φ.items.tail, φ ↦ tup.next ⟧+            𝑛·2·3 ≔ Φ.step( tup ↦ Φ.items.tail )+            𝑛·2·4 ≔ ⟦ tup ↦ Φ.items.tail, φ ↦ tup.next ⟧             remembered 𝑛·2·4 ≡ 𝑛·2·2( tup ↦ Φ.items.tail )-            morphed 𝑛·2·5 := 𝑛·2·4-          𝑛2·2 := 𝑛·2·5  # 𝕄(ξ.b)-          symbolized 𝜎3 := 01--          𝑛5·2 := 𝜎3:λ  # symbolize(⟦ Δ ⤍ 01- ⟧)+            morphed 𝑛·2·5 ≔ 𝑛·2·4+          𝑛2·2 ≔ 𝑛·2·5  # 𝕄(ξ.b)+          symbolized 𝜎3 ≔ 01-+          𝑛5·2 ≔ 𝜎3:λ  # symbolize(⟦ Δ ⤍ 01- ⟧)           recalled 𝑛·2·4 ⇒ 𝑛·2·2( tup ↦ Φ.items.tail )           recalled 𝑛·2·2 ⇒ Φ.step-          deferred 𝜎4 := Φ.step( tup ↦ 𝜎1:λ )  # 𝕄(𝑛·2·5.φ)-          joined 𝜎5 := 𝛿1·2 ? 𝜎3 : 𝜎4-          𝑛·2·6 := 𝜎5:λ-          evaluated 𝑛·2·7 := 𝑛·2·6  # ⟦ c ↦ 𝜎2:λ, a ↦ 01-:Δ, b ↦ 𝑛·2·3, λ ⤍ L_fork ⟧-        𝛿·1·1 := 𝔻(𝜎5:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.x)-      𝑛·1·1 := Φ.num( φ ↦ 𝜎6:λ )  # 𝑛 of L_use+          deferred 𝜎4 ≔ Φ.step( tup ↦ 𝜎1:λ )  # 𝕄(𝑛·2·5.φ)+          joined 𝜎5 ≔ 𝛿1·2 ? 𝜎3 : 𝜎4+          𝑛·2·6 ≔ 𝜎5:λ+          evaluated 𝑛·2·7 ≔ 𝑛·2·6  # ⟦ c ↦ 𝜎2:λ, a ↦ 01-:Δ, b ↦ 𝑛·2·3, λ ⤍ L_fork ⟧+        𝛿·1·1 ≔ 𝔻(𝜎5:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.x)+      𝑛·1·1 ≔ Φ.num( φ ↦ 𝜎6:λ )  # 𝑛 of L_use       𝕄(𝑛·1·1):-        normalized 𝑛·1·2 := ∅:φ  # Φ.num-        𝑛·1·3 := Φ.num( φ ↦ 𝜎6:λ )-        𝑛·1·4 := 𝜎6:λ:φ-        morphed 𝑛·1·5 := 𝑛·1·4-      𝑛·1·6 := 𝑛·1·5  # 𝕄(𝑛·1·1)-      evaluated 𝑛·1·7 := 𝑛·1·6  # ⟦ x ↦ ⟦ c ↦ 𝜎2:λ, a ↦ 01-:Δ, b ↦ 𝑛·2·3, λ ⤍ L_fork ⟧, λ ⤍ L_use ⟧-    normalized 𝑛·0·1 := 𝜎6:λ  # 𝑛·1·7.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        normalized 𝑛·1·2 ≔ ∅:φ  # Φ.num+        𝑛·1·3 ≔ Φ.num( φ ↦ 𝜎6:λ )+        𝑛·1·4 ≔ 𝜎6:λ:φ+        morphed 𝑛·1·5 ≔ 𝑛·1·4+      𝑛·1·6 ≔ 𝑛·1·5  # 𝕄(𝑛·1·1)+      evaluated 𝑛·1·7 ≔ 𝑛·1·6  # ⟦ x ↦ ⟦ c ↦ 𝜎2:λ, a ↦ 01-:Δ, b ↦ 𝑛·2·3, λ ⤍ L_fork ⟧, λ ⤍ L_use ⟧+    normalized 𝑛·0·1 ≔ 𝜎6:λ  # 𝑛·1·7.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/defers-a-copy-whose-phi-reads-nothing-of-its-own.yaml view
@@ -22,18 +22,18 @@     𝔼(L_hold):       𝕄(ξ.b):         remembered 𝑛·1·1 ≡ Φ.step  # ⟦ tup ↦ ∅, φ ↦ Φ.done ⟧-        𝑛·1·2 := Φ.step( tup ↦ Φ.items.tail )-        𝑛·1·3 := ⟦ tup ↦ Φ.items.tail, φ ↦ Φ.done ⟧+        𝑛·1·2 ≔ Φ.step( tup ↦ Φ.items.tail )+        𝑛·1·3 ≔ ⟦ tup ↦ Φ.items.tail, φ ↦ Φ.done ⟧         remembered 𝑛·1·3 ≡ 𝑛·1·1( tup ↦ Φ.items.tail )-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·4  # 𝕄(ξ.b)+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·4  # 𝕄(ξ.b)       recalled 𝑛·1·3 ⇒ 𝑛·1·1( tup ↦ Φ.items.tail )       recalled 𝑛·1·1 ⇒ Φ.step-      deferred 𝜎2 := Φ.step( tup ↦ 𝜎1:λ )  # 𝕄(𝑛1.φ)-      𝑛·1·5 := 𝜎2:λ:φ  # 𝑛 of L_hold+      deferred 𝜎2 ≔ Φ.step( tup ↦ 𝜎1:λ )  # 𝕄(𝑛1.φ)+      𝑛·1·5 ≔ 𝜎2:λ:φ  # 𝑛 of L_hold       𝕄(𝑛·1·5):-        morphed 𝑛·1·6 := 𝜎2:λ:φ-      𝑛·1·7 := 𝑛·1·6  # 𝕄(𝑛·1·5)-      evaluated 𝑛·1·8 := 𝑛·1·7  # ⟦ b ↦ 𝑛·1·2, λ ⤍ L_hold ⟧-    normalized 𝑛·0·1 := 𝜎2:λ  # 𝑛·1·8.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·6 ≔ 𝜎2:λ:φ+      𝑛·1·7 ≔ 𝑛·1·6  # 𝕄(𝑛·1·5)+      evaluated 𝑛·1·8 ≔ 𝑛·1·7  # ⟦ b ↦ 𝑛·1·2, λ ⤍ L_hold ⟧+    normalized 𝑛·0·1 ≔ 𝜎2:λ  # 𝑛·1·8.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/diverges-on-a-side-holding-a-datum-though-it-may-fabricate.yaml view
@@ -22,10 +22,10 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := 01-:Δ+        morphed 𝑛·1·1 ≔ 01-:Δ       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.zu:φ+        morphed 𝑛·1·2 ≔ Φ.zu:φ       diverged 01-:Δ vs 𝑛·1·2  # cannot join: at .Δ the left side has Δ ⤍ 01- and the right side has no Δ; cannot fabricate: the left side is a datum
− test-resources/evaluate-packs/diverges-on-a-side-holding-a-symbol-though-it-may-fabricate.yaml
@@ -1,33 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----# yamllint disable rule:line-length-# The block names 'L_join' under 'otherwise', but the left side is a bare-# symbol, which keeps what it stands for in its λ, where no dispatch reaches.-# A formation asking both sides for their attributes would drop that λ and-# ask the symbol for 'φ' and 'ke' it does not bind, so it would not mean the-# same as the two of them. The firing writes 'diverged' and gets stuck, as it-# does with a side holding a datum (#2041).-symbolic: |-  - λ: L_fork-    dataize:-      𝛿1: $.c-    join:-      on: 𝛿1-      left: $.a-      right: $.b-      otherwise: L_join-location: 'Q.y'-input: '⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ λ ⤍ 𝜎2 ⟧, b ↦ ⟦ φ ↦ Φ.zu, ke ↦ Φ.ty ⟧, λ ⤍ L_fork ⟧.ke ⟧'-fails: "No entry of --symbolic answers the λ function 'L_fork'"-protocol: |-  𝕄(Φ.y):-    𝔼(L_fork):-      𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)-      𝕄(ξ.a):-        morphed 𝑛·1·1 := 𝜎2:λ-      𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ φ ↦ Φ.zu, ke ↦ Φ.ty ⟧-      diverged 𝜎2:λ vs 𝑛·1·2  # cannot join: at .λ the left side has λ ⤍ 𝜎2 and the right side has no λ; cannot fabricate: the left side is an atom
test-resources/evaluate-packs/diverges-on-two-sides-of-metas-that-differ.yaml view
@@ -24,12 +24,12 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := 01-:Δ:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ 01-:Δ:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := 02-:Δ:φ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)+        morphed 𝑛·1·2 ≔ 02-:Δ:φ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)       diverged 𝑛1·1 vs 𝑛2·1  # cannot join: at .φ.Δ the left side has Δ ⤍ 01- and the right side has Δ ⤍ 02-; cannot fabricate: the join names no otherwise
test-resources/evaluate-packs/diverges-on-two-sides-that-do-not-join.yaml view
@@ -35,85 +35,85 @@     number(φ) ↦ ⟦       gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧,       plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.gt( 0 ).if( 1.plus( 2 ), 3.plus( 4 ) ).φ ⟧+    φ ↦ 5.gt( x ↦ 0 ).if( then ↦ 1.plus( x ↦ 2 ), else ↦ 3.plus( x ↦ 4 ) ).φ ⟧ fails: "No entry of --symbolic answers the λ function 'L_fork'" protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·3.gt-    𝑛·0·5 := 𝑛·0·2.gt( x ↦ 0.0 )-    𝑛·0·6 := ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·3.gt+    𝑛·0·5 ≔ 𝑛·0·2.gt( x ↦ 0.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧     𝔼(L_number_gt):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 0.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 0.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 00-00-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 00-00-00-00-00-00-00-00  # 0.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 00-00-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 00-00-00-00-00-00-00-00  # 0.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt       𝕄(𝑛·1·22):-        normalized 𝑛·1·23 := ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool-        𝑛·1·24 := Φ.bool( φ ↦ 𝜎1:λ )-        𝑛·1·25 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-        morphed 𝑛·1·26 := 𝑛·1·25-      𝑛·1·27 := 𝑛·1·26  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·28 := 𝑛·1·27  # 𝑛·0·6-    normalized 𝑛·0·7 := ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if-    shared 𝑛·1 := 1.0.plus( 2.0 )-    𝑛·0·8 := 𝑛·1·24.if( then ↦ 𝑛·1 )-    𝑛·0·9 := ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧-    shared 𝑛·2 := 3.0.plus( 4.0 )-    𝑛·0·10 := 𝑛·0·9( else ↦ 𝑛·2 )-    𝑛·0·11 := ⟦ then ↦ 𝑛·1, else ↦ 𝑛·2, λ ⤍ L_fork ⟧+        normalized 𝑛·1·23 ≔ ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool+        𝑛·1·24 ≔ Φ.bool( φ ↦ 𝜎1:λ )+        𝑛·1·25 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+        morphed 𝑛·1·26 ≔ 𝑛·1·25+      𝑛·1·27 ≔ 𝑛·1·26  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·28 ≔ 𝑛·1·27  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if+    shared 𝑛·1 ≔ 1.0.plus( x ↦ 2.0 )+    𝑛·0·8 ≔ 𝑛·1·24.if( then ↦ 𝑛·1 )+    𝑛·0·9 ≔ ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧+    shared 𝑛·2 ≔ 3.0.plus( x ↦ 4.0 )+    𝑛·0·10 ≔ 𝑛·0·9( else ↦ 𝑛·2 )+    𝑛·0·11 ≔ ⟦ then ↦ 𝑛·1, else ↦ 𝑛·2, λ ⤍ L_fork ⟧     𝔼(L_fork):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·2·1 := Φ.bool( φ ↦ 𝜎1:λ )-          𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-          morphed 𝑛·2·3 := 𝑛·1·27-        boxed 𝑛·2·4 := 𝑛·2·3.φ-        normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4-        𝛿·2·1 := 𝔻(𝜎1:λ)-      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+          𝑛·2·1 ≔ Φ.bool( φ ↦ 𝜎1:λ )+          𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+          morphed 𝑛·2·3 ≔ 𝑛·1·27+        boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+        normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4+        𝛿·2·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)       𝕄(ξ.then):-        𝑛·2·6 := 1.0-        𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·8 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus-        𝑛·2·9 := 𝑛·2·6.plus( x ↦ 2.0 )-        𝑛·2·10 := ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·11 := 𝑛·2·10+        𝑛·2·6 ≔ 1.0+        𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·8 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus+        𝑛·2·9 ≔ 𝑛·2·6.plus( x ↦ 2.0 )+        𝑛·2·10 ≔ ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·11 ≔ 𝑛·2·10       𝕄(ξ.else):-        𝑛·2·12 := 3.0-        𝑛·2·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·14 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·13.plus-        𝑛·2·15 := 𝑛·2·12.plus( x ↦ 4.0 )-        𝑛·2·16 := ⟦ x ↦ 4.0, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·17 := 𝑛·2·16+        𝑛·2·12 ≔ 3.0+        𝑛·2·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·14 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·13.plus+        𝑛·2·15 ≔ 𝑛·2·12.plus( x ↦ 4.0 )+        𝑛·2·16 ≔ ⟦ x ↦ 4.0, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·17 ≔ 𝑛·2·16       diverged 𝑛·2·10 vs 𝑛·2·16  # cannot join: at .ρ the left side has ρ ↦ 𝑛·2·6 and the right side has ρ ↦ 𝑛·2·12; cannot fabricate: the join names no otherwise
− test-resources/evaluate-packs/ends-a-side-at-a-dispatch-off-a-symbol.yaml
@@ -1,42 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----# yamllint disable rule:line-length-# The right side dispatches 'q' off a bare symbol, which nothing answers, so-# its morph is 'opaque'. Before #2427 that got the whole fork stuck and threw-# away the left side. Now the opaque ends that side alone, as ⊥ does: the side-# is ⊥ and the join answers the left side under the condition, writing a-# 'guarded' line.-symbolic: |-  - λ: L_fork-    dataize:-      𝛿1: $.on🌵-    morph:-      𝑛1: $.left🌵-      𝑛2: $.right🌵-    join:-      on: 𝛿1-      left: 𝑛1-      right: 𝑛2-      otherwise: L_fork-location: 'Q.e1'-input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ φ ↦ Φ.k ⟧, right🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧.φ ⟧'-result: '⟦⟧:q'-protocol: |-  𝕄(Φ.e1):-    𝔼(L_fork):-      𝔻(ξ.on🌵):-        𝛿·1·1 := 00--      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)-      𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := Φ.k:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.left🌵)-      𝕄(ξ.right🌵):-        opaque 𝜎1  # 𝕄(𝜎1:λ.q)-      𝑛2·1 := ⊥  # 𝕄(ξ.right🌵)-      guarded 𝛿1·1 ? 𝑛1·1 : 𝑛2·1  # where 𝑛2·1 is ⊥-      𝑛·1·2 := 𝑛·1·1-      evaluated 𝑛·1·3 := 𝑛·1·2  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ 𝑛·1·2, right🌵 ↦ 𝜎1:λ.q ⟧-    normalized 𝑛·0·1 := Φ.k  # 𝑛·1·3.φ-    normalized 𝑛·0·2 := ⟦⟧:q  # Φ.k-    morphed 𝑛·0·3 := 𝑛·0·2
− test-resources/evaluate-packs/ends-a-side-at-a-stall-of-an-opaque-replayed-by-the-memo.yaml
@@ -1,50 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----# yamllint disable rule:line-length-# Both sides fire the same copy of 'L_id', whose operand dispatches off a-# bare symbol. The left one is 'opaque' and the memo keeps the stall, so the-# right one is told 'stall 𝜎1' with no 'opaque' line. Both still end their-# side alone as ⊥ (#2427), since the stall names the symbol.-symbolic: |-  - λ: L_fork-    dataize:-      𝛿1: $.on🌵-    morph:-      𝑛1: $.left🌵-      𝑛2: $.right🌵-    join:-      on: 𝛿1-      left: 𝑛1-      right: 𝑛2-      otherwise: L_fork-  - λ: L_id-    morph:-      𝑛1: $.x-    𝑛: 𝑛1-location: 'Q.e1'-acyclic: plausible-input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, id ↦ ⟦ λ ⤍ L_id, x ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ Φ.id.φ, right🌵 ↦ Φ.id.φ ⟧.φ ⟧'-result: '⊥'-protocol: |-  𝕄(Φ.e1):-    𝔼(L_fork):-      𝔻(ξ.on🌵):-        𝛿·1·1 := 00--      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)-      𝕄(ξ.left🌵):-        remembered 𝑛·1·1 ≡ Φ.id  # ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧-        𝔼(L_id):-          𝕄(ξ.x):-            opaque 𝜎1  # 𝕄(𝜎1:λ.q)-          stuck 𝜎1-      𝑛1·1 := ⊥  # 𝕄(ξ.left🌵)-      𝕄(ξ.right🌵):-        𝔼(L_id):-          stall 𝜎1-      𝑛2·1 := ⊥  # 𝕄(ξ.right🌵)-      𝑛·1·2 := ⊥-      memoized 𝑛·1·3 ⇛ ⊥  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ Φ.id.φ, right🌵 ↦ Φ.id.φ ⟧-      evaluated 𝑛·1·4 := ⊥  # 𝑛·1·3-    normalized 𝑛·0·1 := ⊥  # ⊥.φ-    morphed 𝑛·0·2 := ⊥
+ test-resources/evaluate-packs/ends-a-side-at-an-evaluate-line-firing-a-symbol.yaml view
@@ -0,0 +1,46 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# An 'evaluate' line of a joining entry fires a formation whose λ is a symbol+# and that binds an attribute too, so it is no bare symbol the line could+# leave as it is. Nothing answers a symbol, so the firing is 'opaque' and+# stuck, and the line binds its meta to ⊥ (#2427), so the join keeps the+# right side under the condition instead of getting stuck.+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.on🌵+    morph:+      𝑛1: $.left🌵+      𝑛2: $.right🌵+    evaluate:+      𝑛3: 𝑛1+    join:+      on: 𝛿1+      left: 𝑛3+      right: 𝑛2+      otherwise: L_fork+location: 'Q.e1'+input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ λ ⤍ 𝜎1, a ↦ ⟦⟧ ⟧, right🌵 ↦ Φ.k ⟧.φ ⟧'+result: '⊥'+protocol: |+  𝕄(Φ.e1):+    𝔼(L_fork):+      𝔻(ξ.on🌵):+        𝛿·1·1 ≔ 00-+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)+      𝕄(ξ.left🌵):+        morphed 𝑛·1·1 ≔ ⟦ λ ⤍ 𝜎1, a ↦ ⟦⟧ ⟧+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.left🌵)+      𝕄(ξ.right🌵):+        normalized 𝑛·1·2 ≔ ⟦⟧:q  # Φ.k+        morphed 𝑛·1·3 ≔ 𝑛·1·2+      𝑛2·1 ≔ 𝑛·1·3  # 𝕄(ξ.right🌵)+      opaque 𝜎1  # 𝔼(⟦ λ ⤍ 𝜎1, a ↦ ⟦⟧ ⟧)+      𝑛3·1 ≔ ⊥  # 𝔼(𝑛1 of L_fork)+      guarded 𝛿1·1 ? 𝑛3·1 : 𝑛2·1  # where 𝑛3·1 is ⊥+      𝑛·1·4 ≔ 𝑛·1·3+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ ⟦ λ ⤍ 𝜎1, a ↦ ⟦⟧ ⟧, right🌵 ↦ Φ.k ⟧+    normalized 𝑛·0·1 ≔ ⊥  # 𝑛·1·5.φ+    morphed 𝑛·0·2 ≔ ⊥
− test-resources/evaluate-packs/ends-a-side-at-an-evaluate-line-stuck-on-a-symbol.yaml
@@ -1,50 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----# yamllint disable rule:line-length-# An 'evaluate' line of a joining entry fires a copy of 'L_id', whose operand-# dispatches off a bare symbol and gets 'opaque'. The line binds its meta to-# ⊥ (#2427), so the join keeps the right side instead of getting stuck.-symbolic: |-  - λ: L_fork-    dataize:-      𝛿1: $.on🌵-    morph:-      𝑛1: $.left🌵-      𝑛2: $.right🌵-    evaluate:-      𝑛3: 𝑛1-    join:-      on: 𝛿1-      left: 𝑛3-      right: 𝑛2-  - λ: L_id-    morph:-      𝑛1: $.x-    𝑛: 𝑛1-location: 'Q.e1'-input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ λ ⤍ L_id, x ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧, right🌵 ↦ ⟦ φ ↦ Φ.k ⟧ ⟧.φ ⟧'-result: '⟦⟧:q'-protocol: |-  𝕄(Φ.e1):-    𝔼(L_fork):-      𝔻(ξ.on🌵):-        𝛿·1·1 := 00--      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)-      𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧-      𝑛1·1 := ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧  # 𝕄(ξ.left🌵)-      𝕄(ξ.right🌵):-        morphed 𝑛·1·2 := Φ.k:φ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.right🌵)-      𝔼(L_id):  # 𝔼(𝑛1 of L_fork)-        𝕄(ξ.x):-          opaque 𝜎1  # 𝕄(𝜎1:λ.q)-        stuck 𝜎1-      𝑛3·1 := ⊥  # 𝔼(𝑛1 of L_fork)-      guarded 𝛿1·1 ? 𝑛3·1 : 𝑛2·1  # where 𝑛3·1 is ⊥-      𝑛·1·3 := 𝑛·1·2-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧, right🌵 ↦ 𝑛·1·3 ⟧-    normalized 𝑛·0·1 := Φ.k  # 𝑛·1·4.φ-    normalized 𝑛·0·2 := ⟦⟧:q  # Φ.k-    morphed 𝑛·0·3 := 𝑛·0·2
− test-resources/evaluate-packs/ends-a-side-read-off-a-path-at-a-dispatch-off-a-symbol.yaml
@@ -1,34 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----# yamllint disable rule:line-length-# The join reads its left side off a path, which dispatches 'q' off a bare-# symbol and is 'opaque'. The opaque ends that side alone as ⊥ (#2427), and-# the join keeps the right side under the condition.-symbolic: |-  - λ: L_fork-    dataize:-      𝛿1: $.on🌵-    join:-      on: 𝛿1-      left: $.left🌵-      right: $.right🌵-location: 'Q.e1'-input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧.q, right🌵 ↦ ⟦ φ ↦ Φ.k ⟧ ⟧.φ ⟧'-result: '⟦⟧:q'-protocol: |-  𝕄(Φ.e1):-    𝔼(L_fork):-      𝔻(ξ.on🌵):-        𝛿·1·1 := 00--      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)-      𝕄(ξ.left🌵):-        opaque 𝜎1  # 𝕄(𝜎1:λ.q)-      𝕄(ξ.right🌵):-        morphed 𝑛·1·1 := Φ.k:φ-      guarded 𝛿1·1 ? ⊥ : 𝑛·1·1  # where ⊥ is ⊥-      𝑛·1·2 := 𝑛·1·1-      evaluated 𝑛·1·3 := 𝑛·1·2  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ 𝜎1:λ.q, right🌵 ↦ 𝑛·1·2 ⟧-    normalized 𝑛·0·1 := Φ.k  # 𝑛·1·3.φ-    normalized 𝑛·0·2 := ⟦⟧:q  # Φ.k-    morphed 𝑛·0·3 := 𝑛·0·2
test-resources/evaluate-packs/fabricates-a-formation-holding-the-bytes-its-condition-came-down-to.yaml view
@@ -23,13 +23,13 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 3A--      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 3A-+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := Φ.wu:φ+        morphed 𝑛·1·1 ≔ Φ.wu:φ       𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ φ ↦ Φ.ol, pe ↦ Φ.ki ⟧-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 3A-:Δ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, pe ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 3A-:Δ, left🌵 ↦ ρ.left🌵.pe, right🌵 ↦ ρ.right🌵.pe ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 3A-:Δ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, on🌵 ↦ 3A-:Δ, left🌵 ↦ ρ.left🌵.pe, right🌵 ↦ ρ.right🌵.pe ⟧  # 𝑛·1·4.pe-    morphed 𝑛·0·2 := ⟦ λ ⤍ L_join, on🌵 ↦ 3A-:Δ, left🌵 ↦ ρ.left🌵.pe, right🌵 ↦ ρ.right🌵.pe ⟧+        morphed 𝑛·1·2 ≔ ⟦ φ ↦ Φ.ol, pe ↦ Φ.ki ⟧+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 3A-:Δ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, pe ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 3A-:Δ, left🌵 ↦ ρ.left🌵.pe, right🌵 ↦ ρ.right🌵.pe ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 3A-:Δ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 3A-:Δ, left🌵 ↦ ρ.left🌵.pe, right🌵 ↦ ρ.right🌵.pe ⟧  # 𝑛·1·4.pe+    morphed 𝑛·0·2 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 3A-:Δ, left🌵 ↦ ρ.left🌵.pe, right🌵 ↦ ρ.right🌵.pe ⟧
test-resources/evaluate-packs/fabricates-a-formation-holding-the-symbol-a-path-of-its-condition-reaches.yaml view
@@ -22,10 +22,10 @@   𝕄(Φ.y):     𝔼(L_join):       𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := Φ.jo:φ+        morphed 𝑛·1·1 ≔ Φ.jo:φ       𝕄(ξ.right🌵):-        morphed 𝑛·1·2 := ⟦ φ ↦ Φ.ma, tu ↦ Φ.ip ⟧-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎5:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, tu ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎5:λ, left🌵 ↦ ρ.left🌵.tu, right🌵 ↦ ρ.right🌵.tu ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ on🌵 ↦ 𝜎5:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, λ ⤍ L_join ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎5:λ, left🌵 ↦ ρ.left🌵.tu, right🌵 ↦ ρ.right🌵.tu ⟧  # 𝑛·1·4.tu-    morphed 𝑛·0·2 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎5:λ, left🌵 ↦ ρ.left🌵.tu, right🌵 ↦ ρ.right🌵.tu ⟧+        morphed 𝑛·1·2 ≔ ⟦ φ ↦ Φ.ma, tu ↦ Φ.ip ⟧+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎5:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, tu ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎5:λ, left🌵 ↦ ρ.left🌵.tu, right🌵 ↦ ρ.right🌵.tu ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ on🌵 ↦ 𝜎5:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, λ ⤍ L_join ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎5:λ, left🌵 ↦ ρ.left🌵.tu, right🌵 ↦ ρ.right🌵.tu ⟧  # 𝑛·1·4.tu+    morphed 𝑛·0·2 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎5:λ, left🌵 ↦ ρ.left🌵.tu, right🌵 ↦ ρ.right🌵.tu ⟧
test-resources/evaluate-packs/fabricates-a-formation-of-two-sides-of-different-shapes.yaml view
@@ -29,13 +29,13 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ Φ.hx, ke ↦ Φ.ty ⟧+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ Φ.hx, ke ↦ Φ.ty ⟧       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.zu:φ-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧  # 𝑛·1·4.ke-    morphed 𝑛·0·2 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧+        morphed 𝑛·1·2 ≔ Φ.zu:φ+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧  # 𝑛·1·4.ke+    morphed 𝑛·0·2 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧
test-resources/evaluate-packs/fails-on-a-side-whose-morph-got-stuck.yaml view
@@ -23,8 +23,8 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):         unanswered L_none  # 𝕄(L_none:λ.x)       stuck L_none
test-resources/evaluate-packs/fails-on-an-operand-that-reaches-the-terminator.yaml view
@@ -15,7 +15,7 @@       𝛿1: $.n     morph:       𝑛1: $.v.φ-    𝑛: Φ.l🌵.root( 𝑛1 )+    𝑛: Φ.l🌵.root( v ↦ 𝑛1 )   - λ: L_root     dataize:       𝛿1: $.v@@ -36,39 +36,41 @@ fails: 'terminator ⊥' protocol: |   𝕄(Φ.l🌵.e1):-    normalized 𝑛·0·1 := ⟦ mark(n, v) ↦ L_entry:λ, root(v) ↦ L_root:λ, e1 ↦ Φ.l🌵.mark( n ↦ 1.0, v ↦ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read ).φ ⟧  # Φ.l🌵-    normalized 𝑛·0·2 := ⟦ n ↦ ∅, v ↦ ∅, λ ⤍ L_entry ⟧  # 𝑛·0·1.mark-    𝑛·0·3 := ⟦ n ↦ ∅, v ↦ ∅, λ ⤍ L_entry ⟧( n ↦ 1.0 )-    𝑛·0·4 := ⟦ n ↦ 1.0, v ↦ ∅, λ ⤍ L_entry ⟧-    shared 𝑛·1 := Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read-    𝑛·0·5 := 𝑛·0·4( v ↦ 𝑛·1 )-    𝑛·0·6 := ⟦ n ↦ 1.0, v ↦ 𝑛·1, λ ⤍ L_entry ⟧+    normalized 𝑛·0·1 ≔ ⟦ mark(n, v) ↦ L_entry:λ, root(v) ↦ L_root:λ, e1 ↦ Φ.l🌵.mark( n ↦ 1.0, v ↦ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read ).φ ⟧  # Φ.l🌵+    remembered 𝑛·0·2 ≡ Φ.l🌵.mark  # ⟦ n ↦ ∅, v ↦ ∅, λ ⤍ L_entry ⟧+    𝑛·0·3 ≔ 𝑛·0·2( n ↦ 1.0 )+    𝑛·0·4 ≔ ⟦ n ↦ 1.0, v ↦ ∅, λ ⤍ L_entry ⟧+    remembered 𝑛·0·4 ≡ 𝑛·0·3+    shared 𝑛·1 ≔ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read+    𝑛·0·5 ≔ 𝑛·0·4( v ↦ 𝑛·1 )+    𝑛·0·6 ≔ ⟦ n ↦ 1.0, v ↦ 𝑛·1, λ ⤍ L_entry ⟧+    remembered 𝑛·0·6 ≡ 𝑛·0·5     𝔼(L_entry):       𝔻(ξ.n):         𝕄(ξ.n):-          normalized 𝑛·1·1 := ∅:φ  # Φ.number-          𝑛·1·2 := 1.0-          𝑛·1·3 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ):φ-          morphed 𝑛·1·4 := 𝑛·1·3-        boxed 𝑛·1·5 := 𝑛·1·4.φ-        normalized 𝑛·1·6 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·1·5+          normalized 𝑛·1·1 ≔ ∅:φ  # Φ.number+          𝑛·1·2 ≔ 1.0+          𝑛·1·3 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ):φ+          morphed 𝑛·1·4 ≔ 𝑛·1·3+        boxed 𝑛·1·5 ≔ 𝑛·1·4.φ+        normalized 𝑛·1·6 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·1·5         𝕄(𝑛·1·5):-          normalized 𝑛·1·7 := ⟦ φ ↦ ∅, size ↦ L_bytes_size:λ ⟧  # Φ.bytes-          𝑛·1·8 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )-          𝑛·1·9 := ⟦ φ ↦ 3F-F0-00-00-00-00-00-00:Δ, size ↦ L_bytes_size:λ ⟧-          morphed 𝑛·1·10 := 𝑛·1·9-        boxed 𝑛·1·11 := 𝑛·1·10.φ-        normalized 𝑛·1·12 := 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·1·11-        𝛿·1·1 := 3F-F0-00-00-00-00-00-00  # 1.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.n)+          normalized 𝑛·1·7 ≔ ⟦ φ ↦ ∅, size ↦ L_bytes_size:λ ⟧  # Φ.bytes+          𝑛·1·8 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )+          𝑛·1·9 ≔ ⟦ φ ↦ 3F-F0-00-00-00-00-00-00:Δ, size ↦ L_bytes_size:λ ⟧+          morphed 𝑛·1·10 ≔ 𝑛·1·9+        boxed 𝑛·1·11 ≔ 𝑛·1·10.φ+        normalized 𝑛·1·12 ≔ 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·1·11+        𝛿·1·1 ≔ 3F-F0-00-00-00-00-00-00  # 1.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.n)       𝕄(ξ.v.φ):-        normalized 𝑛·1·13 := ⟦ data ↦ ∅, buffer ↦ ∅, read ↦ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ ⟧  # Φ.block-        𝑛·1·14 := Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) )-        𝑛·1·15 := ⟦ data ↦ ∅, buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ), read ↦ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ ⟧-        normalized 𝑛·1·16 := Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ  # 𝑛·1·15.read-        normalized 𝑛·1·17 := Φ.dataized( target ↦ ⊥ ).as-bytes  # 𝑛·1·16.φ+        normalized 𝑛·1·13 ≔ ⟦ data ↦ ∅, buffer ↦ ∅, read ↦ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ ⟧  # Φ.block+        𝑛·1·14 ≔ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) )+        𝑛·1·15 ≔ ⟦ data ↦ ∅, buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ), read ↦ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ ⟧+        normalized 𝑛·1·16 ≔ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ  # 𝑛·1·15.read+        normalized 𝑛·1·17 ≔ Φ.dataized( target ↦ ⊥ ).as-bytes  # 𝑛·1·16.φ         remembered 𝑛·1·18 ≡ Φ.dataized  # ⟦ target ↦ ∅, λ ⤍ L_dataized ⟧-        𝑛·1·19 := Φ.dataized( target ↦ ⊥ )-        𝑛·1·20 := ⟦ target ↦ ⊥, λ ⤍ L_dataized ⟧+        𝑛·1·19 ≔ Φ.dataized( target ↦ ⊥ )+        𝑛·1·20 ≔ ⟦ target ↦ ⊥, λ ⤍ L_dataized ⟧         remembered 𝑛·1·20 ≡ 𝑛·1·18( target ↦ ⊥ )         𝔼(L_dataized):
+ test-resources/evaluate-packs/feeds-a-named-argument-to-a-bare-symbol.yaml view
@@ -0,0 +1,16 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# An argument fed to a bare symbol, an object nobody knows, gives another+# object nobody knows: 𝕄 mints a fresh symbol and writes 'fed', rather than+# letting 'miss' make the application ⊥ (#2476).+symbolic: '[]'+location: 'Q.app'+input: '⟦ x ↦ ⟦ λ ⤍ 𝜎1 ⟧, app ↦ Φ.x( k ↦ 01-:Δ ) ⟧'+result: '⟦ λ ⤍ 𝜎2 ⟧'+protocol: |+  𝕄(Φ.app):+    normalized 𝑛·0·1 ≔ 𝜎1:λ  # Φ.x+    fed 𝜎2:λ ≔ 𝜎1:λ( k ↦ 01-:Δ )+    morphed 𝑛·0·2 ≔ 𝜎2:λ
test-resources/evaluate-packs/fires-a-formation-once-however-often-it-is-met.yaml view
@@ -32,8 +32,8 @@   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,     p ↦ ⟦-      a ↦ 7.plus( 5.plus( 6 ) ),-      b ↦ 7.plus( 5.plus( 6 ) ),+      a ↦ 7.plus( x ↦ 5.plus( x ↦ 6 ) ),+      b ↦ 7.plus( x ↦ 5.plus( x ↦ 6 ) ),       λ ⤍ L_pair ⟧.φ ⟧ result: >   ⟦ a ↦ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧,@@ -42,111 +42,111 @@   𝕄(Φ.p):     𝔼(L_pair):       𝕄(ξ.a):-        normalized 𝑛·1·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-        𝑛·1·2 := 7.0-        𝑛·1·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·1·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·3.plus-        shared 𝑛·1 := 5.0.plus( 6.0 )-        𝑛·1·5 := 𝑛·1·2.plus( x ↦ 𝑛·1 )-        𝑛·1·6 := ⟦ x ↦ 𝑛·1, λ ⤍ L_number_plus ⟧-        morphed 𝑛·1·7 := 𝑛·1·6-      𝑛1·1 := 𝑛·1·6  # 𝕄(ξ.a)+        normalized 𝑛·1·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+        𝑛·1·2 ≔ 7.0+        𝑛·1·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·1·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·3.plus+        shared 𝑛·1 ≔ 5.0.plus( x ↦ 6.0 )+        𝑛·1·5 ≔ 𝑛·1·2.plus( x ↦ 𝑛·1 )+        𝑛·1·6 ≔ ⟦ x ↦ 𝑛·1, λ ⤍ L_number_plus ⟧+        morphed 𝑛·1·7 ≔ 𝑛·1·6+      𝑛1·1 ≔ 𝑛·1·6  # 𝕄(ξ.a)       𝕄(ξ.b):-        𝑛·1·8 := 7.0-        𝑛·1·9 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·1·10 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·9.plus-        𝑛·1·11 := 𝑛·1·8.plus( x ↦ 𝑛·1 )-        𝑛·1·12 := ⟦ x ↦ 𝑛·1, λ ⤍ L_number_plus ⟧-        morphed 𝑛·1·13 := 𝑛·1·12-      𝑛2·1 := 𝑛·1·12  # 𝕄(ξ.b)+        𝑛·1·8 ≔ 7.0+        𝑛·1·9 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·1·10 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·9.plus+        𝑛·1·11 ≔ 𝑛·1·8.plus( x ↦ 𝑛·1 )+        𝑛·1·12 ≔ ⟦ x ↦ 𝑛·1, λ ⤍ L_number_plus ⟧+        morphed 𝑛·1·13 ≔ 𝑛·1·12+      𝑛2·1 ≔ 𝑛·1·12  # 𝕄(ξ.b)       𝔼(L_number_plus):  # 𝔼(𝑛1 of L_pair)         𝔻(ξ.ρ):           𝕄(ξ.ρ):-            𝑛·2·1 := 7.0-            𝑛·2·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-            morphed 𝑛·2·3 := 𝑛·2·2-          boxed 𝑛·2·4 := 𝑛·2·3.φ-          normalized 𝑛·2·5 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·4+            𝑛·2·1 ≔ 7.0+            𝑛·2·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+            morphed 𝑛·2·3 ≔ 𝑛·2·2+          boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+          normalized 𝑛·2·5 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·4           𝕄(𝑛·2·4):-            normalized 𝑛·2·6 := ∅:φ  # Φ.bytes-            𝑛·2·7 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )-            𝑛·2·8 := 40-1C-00-00-00-00-00-00:Δ:φ-            morphed 𝑛·2·9 := 𝑛·2·8-          boxed 𝑛·2·10 := 𝑛·2·9.φ-          normalized 𝑛·2·11 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·10-          𝛿·2·1 := 40-1C-00-00-00-00-00-00  # 7.0-        𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+            normalized 𝑛·2·6 ≔ ∅:φ  # Φ.bytes+            𝑛·2·7 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )+            𝑛·2·8 ≔ 40-1C-00-00-00-00-00-00:Δ:φ+            morphed 𝑛·2·9 ≔ 𝑛·2·8+          boxed 𝑛·2·10 ≔ 𝑛·2·9.φ+          normalized 𝑛·2·11 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·10+          𝛿·2·1 ≔ 40-1C-00-00-00-00-00-00  # 7.0+        𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)         𝔻(ξ.x):           𝕄(ξ.x):-            𝑛·2·12 := 5.0-            𝑛·2·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-            normalized 𝑛·2·14 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·13.plus-            𝑛·2·15 := 𝑛·2·12.plus( x ↦ 6.0 )-            𝑛·2·16 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧-            morphed 𝑛·2·17 := 𝑛·2·16+            𝑛·2·12 ≔ 5.0+            𝑛·2·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+            normalized 𝑛·2·14 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·13.plus+            𝑛·2·15 ≔ 𝑛·2·12.plus( x ↦ 6.0 )+            𝑛·2·16 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧+            morphed 𝑛·2·17 ≔ 𝑛·2·16           𝔼(L_number_plus):             𝔻(ξ.ρ):               𝕄(ξ.ρ):-                𝑛·3·1 := 5.0-                𝑛·3·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-                morphed 𝑛·3·3 := 𝑛·3·2-              boxed 𝑛·3·4 := 𝑛·3·3.φ-              normalized 𝑛·3·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·3·4+                𝑛·3·1 ≔ 5.0+                𝑛·3·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+                morphed 𝑛·3·3 ≔ 𝑛·3·2+              boxed 𝑛·3·4 ≔ 𝑛·3·3.φ+              normalized 𝑛·3·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·3·4               𝕄(𝑛·3·4):-                𝑛·3·6 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-                𝑛·3·7 := 40-14-00-00-00-00-00-00:Δ:φ-                morphed 𝑛·3·8 := 𝑛·3·7-              boxed 𝑛·3·9 := 𝑛·3·8.φ-              normalized 𝑛·3·10 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·3·9-              𝛿·3·1 := 40-14-00-00-00-00-00-00  # 5.0-            𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.ρ)+                𝑛·3·6 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+                𝑛·3·7 ≔ 40-14-00-00-00-00-00-00:Δ:φ+                morphed 𝑛·3·8 ≔ 𝑛·3·7+              boxed 𝑛·3·9 ≔ 𝑛·3·8.φ+              normalized 𝑛·3·10 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·3·9+              𝛿·3·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+            𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.ρ)             𝔻(ξ.x):               𝕄(ξ.x):-                𝑛·3·11 := 6.0-                𝑛·3·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-                morphed 𝑛·3·13 := 𝑛·3·12-              boxed 𝑛·3·14 := 𝑛·3·13.φ-              normalized 𝑛·3·15 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·3·14+                𝑛·3·11 ≔ 6.0+                𝑛·3·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+                morphed 𝑛·3·13 ≔ 𝑛·3·12+              boxed 𝑛·3·14 ≔ 𝑛·3·13.φ+              normalized 𝑛·3·15 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·3·14               𝕄(𝑛·3·14):-                𝑛·3·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )-                𝑛·3·17 := 40-18-00-00-00-00-00-00:Δ:φ-                morphed 𝑛·3·18 := 𝑛·3·17-              boxed 𝑛·3·19 := 𝑛·3·18.φ-              normalized 𝑛·3·20 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·3·19-              𝛿·3·2 := 40-18-00-00-00-00-00-00  # 6.0-            𝛿2·3 := 𝛿·3·2  # 𝔻(ξ.x)-            𝑛·3·21 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus+                𝑛·3·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )+                𝑛·3·17 ≔ 40-18-00-00-00-00-00-00:Δ:φ+                morphed 𝑛·3·18 ≔ 𝑛·3·17+              boxed 𝑛·3·19 ≔ 𝑛·3·18.φ+              normalized 𝑛·3·20 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·3·19+              𝛿·3·2 ≔ 40-18-00-00-00-00-00-00  # 6.0+            𝛿2·3 ≔ 𝛿·3·2  # 𝔻(ξ.x)+            𝑛·3·21 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus             𝕄(𝑛·3·21):-              𝑛·3·22 := Φ.number( φ ↦ 𝜎1:λ )-              𝑛·3·23 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·3·24 := 𝑛·3·23-            𝑛·3·25 := 𝑛·3·24  # 𝕄(𝑛·3·21)+              𝑛·3·22 ≔ Φ.number( φ ↦ 𝜎1:λ )+              𝑛·3·23 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·3·24 ≔ 𝑛·3·23+            𝑛·3·25 ≔ 𝑛·3·24  # 𝕄(𝑛·3·21)             memoized 𝑛·2·16 ⇛ 𝑛·3·25-            evaluated 𝑛·3·26 := 𝑛·3·25  # 𝑛·2·16-          boxed 𝑛·2·18 := 𝑛·3·26.φ-          normalized 𝑛·2·19 := 𝜎1:λ  # 𝑛·2·18-          𝛿·2·2 := 𝔻(𝜎1:λ)-        𝛿2·2 := 𝛿·2·2  # 𝔻(ξ.x)-        𝑛·2·20 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus+            evaluated 𝑛·3·26 ≔ 𝑛·3·25  # 𝑛·2·16+          boxed 𝑛·2·18 ≔ 𝑛·3·26.φ+          normalized 𝑛·2·19 ≔ 𝜎1:λ  # 𝑛·2·18+          𝛿·2·2 ≔ 𝔻(𝜎1:λ)+        𝛿2·2 ≔ 𝛿·2·2  # 𝔻(ξ.x)+        𝑛·2·20 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus         𝕄(𝑛·2·20):-          𝑛·2·21 := Φ.number( φ ↦ 𝜎2:λ )-          𝑛·2·22 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·2·23 := 𝑛·2·22-        𝑛·2·24 := 𝑛·2·23  # 𝕄(𝑛·2·20)+          𝑛·2·21 ≔ Φ.number( φ ↦ 𝜎2:λ )+          𝑛·2·22 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·2·23 ≔ 𝑛·2·22+        𝑛·2·24 ≔ 𝑛·2·23  # 𝕄(𝑛·2·20)         memoized 𝑛·1·12 ⇛ 𝑛·2·24-        evaluated 𝑛·2·25 := 𝑛·2·24  # 𝑛·1·12-      𝑛3·1 := 𝑛·2·24  # 𝔼(𝑛1 of L_pair)+        evaluated 𝑛·2·25 ≔ 𝑛·2·24  # 𝑛·1·12+      𝑛3·1 ≔ 𝑛·2·24  # 𝔼(𝑛1 of L_pair)       𝔼(L_number_plus):  # 𝔼(𝑛2 of L_pair)         recalled 𝑛·1·12 ⇒ 𝑛·2·24-        𝑛·4·1 := 𝑛·2·21  # 𝑛 of L_number_plus-        𝑛·4·2 := 𝑛3·1  # 𝕄(𝑛·4·1)-        evaluated 𝑛·4·3 := 𝑛·4·2  # 𝑛·1·12-      𝑛4·1 := 𝑛·4·2  # 𝔼(𝑛2 of L_pair)-      𝑛·1·14 := ⟦ a ↦ 𝑛·4·3, b ↦ 𝑛·4·3 ⟧:φ  # 𝑛 of L_pair+        𝑛·4·1 ≔ 𝑛·2·21  # 𝑛 of L_number_plus+        𝑛·4·2 ≔ 𝑛3·1  # 𝕄(𝑛·4·1)+        evaluated 𝑛·4·3 ≔ 𝑛·4·2  # 𝑛·1·12+      𝑛4·1 ≔ 𝑛·4·2  # 𝔼(𝑛2 of L_pair)+      𝑛·1·14 ≔ ⟦ a ↦ 𝑛·4·3, b ↦ 𝑛·4·3 ⟧:φ  # 𝑛 of L_pair       𝕄(𝑛·1·14):-        morphed 𝑛·1·15 := ⟦ a ↦ 𝑛·4·3, b ↦ 𝑛·4·3 ⟧:φ-      𝑛·1·16 := 𝑛·1·15  # 𝕄(𝑛·1·14)-      memoized 𝑛·1·17 ⇛ 𝑛·1·16  # ⟦ a ↦ 𝑛·2·1.plus( 𝑛·3·1.plus( 𝑛·3·11 ) ), b ↦ 𝑛·2·1.plus( 𝑛·3·1.plus( 𝑛·3·11 ) ), λ ⤍ L_pair ⟧-      evaluated 𝑛·1·18 := 𝑛·1·16  # 𝑛·1·17-    normalized 𝑛·0·1 := ⟦ a ↦ 𝑛·4·3, b ↦ 𝑛·4·3 ⟧  # 𝑛·1·18.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·15 ≔ ⟦ a ↦ 𝑛·4·3, b ↦ 𝑛·4·3 ⟧:φ+      𝑛·1·16 ≔ 𝑛·1·15  # 𝕄(𝑛·1·14)+      memoized 𝑛·1·17 ⇛ 𝑛·1·16  # ⟦ a ↦ 𝑛·2·1.plus( x ↦ 𝑛·2·15 ), b ↦ 𝑛·2·1.plus( x ↦ 𝑛·2·15 ), λ ⤍ L_pair ⟧+      evaluated 𝑛·1·18 ≔ 𝑛·1·16  # 𝑛·1·17+    normalized 𝑛·0·1 ≔ ⟦ a ↦ 𝑛·4·3, b ↦ 𝑛·4·3 ⟧  # 𝑛·1·18.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/fires-a-formation-written-in-place-after-a-stay-line.yaml view
@@ -24,27 +24,28 @@   ⟦ k ↦ 𝜎1:λ,     x ↦ ⟦ λ ⤍ L_probe, side🌵 ↦ ⟦ f ↦ ⟦ v ↦ ∅, λ ⤍ L_box ⟧ ⟧.f( v ↦ Φ.k( ρ ↦ Φ ) ) ⟧,     y ↦ Φ.x.φ ⟧-result: '𝜎2:λ.φ'+result: '𝜎3:λ' protocol: |   𝕄(Φ.y):-    𝑛·0·1 := ⟦ v ↦ ∅, λ ⤍ L_box ⟧( v ↦ Φ.k )-    𝑛·0·2 := ⟦ v ↦ Φ.k, λ ⤍ L_box ⟧+    𝑛·0·1 ≔ ⟦ v ↦ ∅, λ ⤍ L_box ⟧( v ↦ Φ.k )+    𝑛·0·2 ≔ ⟦ v ↦ Φ.k, λ ⤍ L_box ⟧     remembered 𝑛·0·3 ≡ Φ.x  # ⟦ λ ⤍ L_probe, side🌵 ↦ 𝑛·0·2 ⟧     𝔼(L_probe):       𝕄(ξ.side🌵):-        morphed 𝑛·1·1 := 𝑛·0·2-      𝑛1·1 := 𝑛·0·2  # 𝕄(ξ.side🌵)-      𝑛2·1 := ⟦ v ↦ Φ.k, λ ⤍ L_box ⟧  # stay(𝑛1 of L_probe)+        morphed 𝑛·1·1 ≔ 𝑛·0·2+      𝑛1·1 ≔ 𝑛·0·2  # 𝕄(ξ.side🌵)+      𝑛2·1 ≔ ⟦ v ↦ Φ.k, λ ⤍ L_box ⟧  # stay(𝑛1 of L_probe)       𝔼(L_box):  # 𝔼(𝑛2 of L_probe)-        𝑛·2·1 := 𝜎2:λ  # 𝑛 of L_box+        𝑛·2·1 ≔ 𝜎2:λ  # 𝑛 of L_box         𝕄(𝑛·2·1):-          morphed 𝑛·2·2 := 𝜎2:λ-        𝑛·2·3 := 𝑛·2·2  # 𝕄(𝑛·2·1)-        evaluated 𝑛·2·4 := 𝑛·2·3  # ⟦ v ↦ Φ.k, λ ⤍ L_box ⟧-      𝑛3·1 := 𝑛·2·3  # 𝔼(𝑛2 of L_probe)-      𝑛·1·2 := 𝑛3·1  # 𝑛 of L_probe+          morphed 𝑛·2·2 ≔ 𝜎2:λ+        𝑛·2·3 ≔ 𝑛·2·2  # 𝕄(𝑛·2·1)+        evaluated 𝑛·2·4 ≔ 𝑛·2·3  # ⟦ v ↦ Φ.k, λ ⤍ L_box ⟧+      𝑛3·1 ≔ 𝑛·2·3  # 𝔼(𝑛2 of L_probe)+      𝑛·1·2 ≔ 𝑛3·1  # 𝑛 of L_probe       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := 𝑛3·1-      𝑛·1·4 := 𝑛3·1  # 𝕄(𝑛·1·2)-      evaluated 𝑛·1·5 := 𝑛·1·4  # 𝑛·0·3-    opaque 𝜎2  # 𝕄(𝜎2:λ.φ)+        morphed 𝑛·1·3 ≔ 𝑛3·1+      𝑛·1·4 ≔ 𝑛3·1  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # 𝑛·0·3+    opaque 𝜎3:λ ≔ 𝜎2:λ.φ+    morphed 𝑛·0·4 ≔ 𝜎3:λ
test-resources/evaluate-packs/fires-a-formation-written-in-place-with-its-voids-filled.yaml view
@@ -29,30 +29,31 @@ input: >   ⟦ x ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ⟦ v ↦ ∅, λ ⤍ L_box ⟧( v ↦ 𝜎2:λ ), right🌵 ↦ 𝜎3:λ ⟧,     y ↦ Φ.x.φ ⟧-result: '𝜎5:λ.φ'+result: '𝜎6:λ' protocol: |   𝕄(Φ.y):-    𝑛·0·1 := ⟦ v ↦ ∅, λ ⤍ L_box ⟧( v ↦ 𝜎2:λ )-    𝑛·0·2 := ⟦ v ↦ 𝜎2:λ, λ ⤍ L_box ⟧+    𝑛·0·1 ≔ ⟦ v ↦ ∅, λ ⤍ L_box ⟧( v ↦ 𝜎2:λ )+    𝑛·0·2 ≔ ⟦ v ↦ 𝜎2:λ, λ ⤍ L_box ⟧     remembered 𝑛·0·3 ≡ Φ.x  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·0·2, right🌵 ↦ 𝜎3:λ ⟧     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := 𝑛·0·2-      𝑛1·1 := 𝑛·0·2  # 𝕄(ξ.left🌵)+        morphed 𝑛·1·1 ≔ 𝑛·0·2+      𝑛1·1 ≔ 𝑛·0·2  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):-        morphed 𝑛·1·2 := 𝜎3:λ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.right🌵)+        morphed 𝑛·1·2 ≔ 𝜎3:λ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.right🌵)       𝔼(L_box):  # 𝔼(𝑛1 of L_fork)-        𝑛·2·1 := 𝜎4:λ  # 𝑛 of L_box+        𝑛·2·1 ≔ 𝜎4:λ  # 𝑛 of L_box         𝕄(𝑛·2·1):-          morphed 𝑛·2·2 := 𝜎4:λ-        𝑛·2·3 := 𝑛·2·2  # 𝕄(𝑛·2·1)-        evaluated 𝑛·2·4 := 𝑛·2·3  # 𝑛·0·2-      𝑛3·1 := 𝑛·2·3  # 𝔼(𝑛1 of L_fork)-      joined 𝜎5 := 𝛿1·1 ? 𝜎4 : 𝜎3-      𝑛·1·3 := 𝜎5:λ-      evaluated 𝑛·1·4 := 𝑛·1·3  # 𝑛·0·3-    opaque 𝜎5  # 𝕄(𝜎5:λ.φ)+          morphed 𝑛·2·2 ≔ 𝜎4:λ+        𝑛·2·3 ≔ 𝑛·2·2  # 𝕄(𝑛·2·1)+        evaluated 𝑛·2·4 ≔ 𝑛·2·3  # 𝑛·0·2+      𝑛3·1 ≔ 𝑛·2·3  # 𝔼(𝑛1 of L_fork)+      joined 𝜎5 ≔ 𝛿1·1 ? 𝜎4 : 𝜎3+      𝑛·1·3 ≔ 𝜎5:λ+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # 𝑛·0·3+    opaque 𝜎6:λ ≔ 𝜎5:λ.φ+    morphed 𝑛·0·4 ≔ 𝜎6:λ
test-resources/evaluate-packs/fires-the-answer-of-an-evaluate-line-on-the-next-line.yaml view
@@ -24,26 +24,26 @@   𝕄(Φ.y):     𝔼(L_twice):       𝕄(ξ.a):-        morphed 𝑛·1·1 := L_first:λ-      𝑛1·1 := L_first:λ  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ L_first:λ+      𝑛1·1 ≔ L_first:λ  # 𝕄(ξ.a)       𝔼(L_first):  # 𝔼(𝑛1 of L_twice)-        𝑛·2·1 := L_second:λ  # 𝑛 of L_first+        𝑛·2·1 ≔ L_second:λ  # 𝑛 of L_first         𝕄(𝑛·2·1):-          morphed 𝑛·2·2 := L_second:λ-        𝑛·2·3 := L_second:λ  # 𝕄(𝑛·2·1)-        evaluated 𝑛·2·4 := L_second:λ  # L_first:λ-      𝑛2·1 := L_second:λ  # 𝔼(𝑛1 of L_twice)+          morphed 𝑛·2·2 ≔ L_second:λ+        𝑛·2·3 ≔ L_second:λ  # 𝕄(𝑛·2·1)+        evaluated 𝑛·2·4 ≔ L_second:λ  # L_first:λ+      𝑛2·1 ≔ L_second:λ  # 𝔼(𝑛1 of L_twice)       𝔼(L_second):  # 𝔼(𝑛2 of L_twice)-        𝑛·3·1 := 𝜎1:λ:φ  # 𝑛 of L_second+        𝑛·3·1 ≔ 𝜎1:λ:φ  # 𝑛 of L_second         𝕄(𝑛·3·1):-          morphed 𝑛·3·2 := 𝜎1:λ:φ-        𝑛·3·3 := 𝑛·3·2  # 𝕄(𝑛·3·1)-        evaluated 𝑛·3·4 := 𝑛·3·3  # L_second:λ-      𝑛3·1 := 𝑛·3·3  # 𝔼(𝑛2 of L_twice)-      𝑛·1·2 := 𝑛3·1  # 𝑛 of L_twice+          morphed 𝑛·3·2 ≔ 𝜎1:λ:φ+        𝑛·3·3 ≔ 𝑛·3·2  # 𝕄(𝑛·3·1)+        evaluated 𝑛·3·4 ≔ 𝑛·3·3  # L_second:λ+      𝑛3·1 ≔ 𝑛·3·3  # 𝔼(𝑛2 of L_twice)+      𝑛·1·2 ≔ 𝑛3·1  # 𝑛 of L_twice       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := 𝑛3·1-      𝑛·1·4 := 𝑛3·1  # 𝕄(𝑛·1·2)-      evaluated 𝑛·1·5 := 𝑛·1·4  # ⟦ a ↦ L_first:λ, λ ⤍ L_twice ⟧-    normalized 𝑛·0·1 := 𝜎1:λ  # 𝑛·1·5.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·3 ≔ 𝑛3·1+      𝑛·1·4 ≔ 𝑛3·1  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ a ↦ L_first:λ, λ ⤍ L_twice ⟧+    normalized 𝑛·0·1 ≔ 𝜎1:λ  # 𝑛·1·5.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/fires-the-arguments-of-a-copy-a-defer-line-defers.yaml view
@@ -29,7 +29,7 @@       left: 𝑛3       right: 𝑛4 location: 'Q.y'-input: '⟦ box(x, w) ↦ ⟦ φ ↦ x.next ⟧, num(φ) ↦ ⟦⟧, inc(x) ↦ ⟦ λ ⤍ L_inc ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ x ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ λ ⤍ 𝜎3 ⟧, b ↦ Φ.box( x ↦ Φ.items.tail, w ↦ Φ.inc( ⟦ Δ ⤍ 2A- ⟧ ) ), λ ⤍ L_fork ⟧, λ ⤍ L_inc ⟧.φ ⟧'+input: '⟦ box(x, w) ↦ ⟦ φ ↦ x.next ⟧, num(φ) ↦ ⟦⟧, inc(x) ↦ ⟦ λ ⤍ L_inc ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ x ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ λ ⤍ 𝜎3 ⟧, b ↦ Φ.box( x ↦ Φ.items.tail, w ↦ Φ.inc( x ↦ ⟦ Δ ⤍ 2A- ⟧ ) ), λ ⤍ L_fork ⟧, λ ⤍ L_inc ⟧.φ ⟧' result: '𝜎7:λ' protocol: |   𝕄(Φ.y):@@ -37,54 +37,54 @@       𝔻(ξ.x):         𝔼(L_fork):           𝔻(ξ.c):-            𝛿·2·1 := 𝔻(𝜎2:λ)-          𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.c)+            𝛿·2·1 ≔ 𝔻(𝜎2:λ)+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.c)           𝕄(ξ.a):-            morphed 𝑛·2·1 := 𝜎3:λ-          𝑛1·2 := 𝑛·2·1  # 𝕄(ξ.a)+            morphed 𝑛·2·1 ≔ 𝜎3:λ+          𝑛1·2 ≔ 𝑛·2·1  # 𝕄(ξ.a)           𝕄(ξ.b):             remembered 𝑛·2·2 ≡ Φ.box  # ⟦ x ↦ ∅, w ↦ ∅, φ ↦ x.next ⟧-            𝑛·2·3 := Φ.box( x ↦ Φ.items.tail )-            𝑛·2·4 := ⟦ x ↦ Φ.items.tail, w ↦ ∅, φ ↦ x.next ⟧+            𝑛·2·3 ≔ Φ.box( x ↦ Φ.items.tail )+            𝑛·2·4 ≔ ⟦ x ↦ Φ.items.tail, w ↦ ∅, φ ↦ x.next ⟧             remembered 𝑛·2·4 ≡ 𝑛·2·2( x ↦ Φ.items.tail )-            𝑛·2·5 := 𝑛·2·3( w ↦ Φ.inc( 2A-:Δ ) )-            𝑛·2·6 := ⟦ x ↦ Φ.items.tail, w ↦ Φ.inc( 2A-:Δ ), φ ↦ x.next ⟧-            remembered 𝑛·2·6 ≡ 𝑛·2·4( w ↦ Φ.inc( 2A-:Δ ) )-            morphed 𝑛·2·7 := 𝑛·2·6-          𝑛2·2 := 𝑛·2·7  # 𝕄(ξ.b)-          recalled 𝑛·2·6 ⇒ 𝑛·2·4( w ↦ Φ.inc( 2A-:Δ ) )+            𝑛·2·5 ≔ 𝑛·2·3( w ↦ Φ.inc( x ↦ 2A-:Δ ) )+            𝑛·2·6 ≔ ⟦ x ↦ Φ.items.tail, w ↦ Φ.inc( x ↦ 2A-:Δ ), φ ↦ x.next ⟧+            remembered 𝑛·2·6 ≡ 𝑛·2·4( w ↦ Φ.inc( x ↦ 2A-:Δ ) )+            morphed 𝑛·2·7 ≔ 𝑛·2·6+          𝑛2·2 ≔ 𝑛·2·7  # 𝕄(ξ.b)+          recalled 𝑛·2·6 ⇒ 𝑛·2·4( w ↦ Φ.inc( x ↦ 2A-:Δ ) )           recalled 𝑛·2·4 ⇒ 𝑛·2·2( x ↦ Φ.items.tail )           recalled 𝑛·2·2 ⇒ Φ.box           𝕄(𝑛2.w):-            normalized 𝑛·2·8 := ⟦ x ↦ ∅, λ ⤍ L_inc ⟧  # Φ.inc-            𝑛·2·9 := Φ.inc( x ↦ 2A-:Δ )-            𝑛·2·10 := ⟦ x ↦ 2A-:Δ, λ ⤍ L_inc ⟧-            morphed 𝑛·2·11 := 𝑛·2·10+            normalized 𝑛·2·8 ≔ ⟦ x ↦ ∅, λ ⤍ L_inc ⟧  # Φ.inc+            𝑛·2·9 ≔ Φ.inc( x ↦ 2A-:Δ )+            𝑛·2·10 ≔ ⟦ x ↦ 2A-:Δ, λ ⤍ L_inc ⟧+            morphed 𝑛·2·11 ≔ 𝑛·2·10           𝔼(L_inc):  # 𝔼(𝑛2.w)             𝔻(ξ.x):-              𝛿·3·1 := 2A--            𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.x)-            𝑛·3·1 := Φ.num( φ ↦ 𝜎4:λ )  # 𝑛 of L_inc+              𝛿·3·1 ≔ 2A-+            𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.x)+            𝑛·3·1 ≔ Φ.num( φ ↦ 𝜎4:λ )  # 𝑛 of L_inc             𝕄(𝑛·3·1):-              normalized 𝑛·3·2 := ∅:φ  # Φ.num-              𝑛·3·3 := Φ.num( φ ↦ 𝜎4:λ )-              𝑛·3·4 := 𝜎4:λ:φ-              morphed 𝑛·3·5 := 𝑛·3·4-            𝑛·3·6 := 𝑛·3·5  # 𝕄(𝑛·3·1)+              normalized 𝑛·3·2 ≔ ∅:φ  # Φ.num+              𝑛·3·3 ≔ Φ.num( φ ↦ 𝜎4:λ )+              𝑛·3·4 ≔ 𝜎4:λ:φ+              morphed 𝑛·3·5 ≔ 𝑛·3·4+            𝑛·3·6 ≔ 𝑛·3·5  # 𝕄(𝑛·3·1)             remembered 𝑛·3·6 ≡ 𝑛·2·10-            evaluated 𝑛·3·7 := 𝑛·3·6  # 𝑛·2·10-          deferred 𝜎5 := Φ.box( x ↦ 𝜎1:λ, w ↦ 𝑛·3·7 )  # 𝕄(𝑛2.φ)-          joined 𝜎6 := 𝛿1·2 ? 𝜎3 : 𝜎5-          𝑛·2·12 := 𝜎6:λ-          evaluated 𝑛·2·13 := 𝑛·2·12  # ⟦ c ↦ 𝜎2:λ, a ↦ 𝜎3:λ, b ↦ 𝑛·2·5, λ ⤍ L_fork ⟧-        𝛿·1·1 := 𝔻(𝜎6:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.x)-      𝑛·1·1 := Φ.num( φ ↦ 𝜎7:λ )  # 𝑛 of L_inc+            evaluated 𝑛·3·7 ≔ 𝑛·3·6  # 𝑛·2·10+          deferred 𝜎5 ≔ Φ.box( x ↦ 𝜎1:λ, w ↦ 𝑛·3·7 )  # 𝕄(𝑛2.φ)+          joined 𝜎6 ≔ 𝛿1·2 ? 𝜎3 : 𝜎5+          𝑛·2·12 ≔ 𝜎6:λ+          evaluated 𝑛·2·13 ≔ 𝑛·2·12  # ⟦ c ↦ 𝜎2:λ, a ↦ 𝜎3:λ, b ↦ 𝑛·2·5, λ ⤍ L_fork ⟧+        𝛿·1·1 ≔ 𝔻(𝜎6:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.x)+      𝑛·1·1 ≔ Φ.num( φ ↦ 𝜎7:λ )  # 𝑛 of L_inc       𝕄(𝑛·1·1):-        𝑛·1·2 := Φ.num( φ ↦ 𝜎7:λ )-        𝑛·1·3 := 𝜎7:λ:φ-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛·1·5 := 𝑛·1·4  # 𝕄(𝑛·1·1)-      evaluated 𝑛·1·6 := 𝑛·1·5  # ⟦ x ↦ ⟦ c ↦ 𝜎2:λ, a ↦ 𝜎3:λ, b ↦ 𝑛·2·5, λ ⤍ L_fork ⟧, λ ⤍ L_inc ⟧-    normalized 𝑛·0·1 := 𝜎7:λ  # 𝑛·1·6.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        𝑛·1·2 ≔ Φ.num( φ ↦ 𝜎7:λ )+        𝑛·1·3 ≔ 𝜎7:λ:φ+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛·1·5 ≔ 𝑛·1·4  # 𝕄(𝑛·1·1)+      evaluated 𝑛·1·6 ≔ 𝑛·1·5  # ⟦ x ↦ ⟦ c ↦ 𝜎2:λ, a ↦ 𝜎3:λ, b ↦ 𝑛·2·5, λ ⤍ L_fork ⟧, λ ⤍ L_inc ⟧+    normalized 𝑛·0·1 ≔ 𝜎7:λ  # 𝑛·1·6.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/fires-what-a-rewrite-line-unwrapped.yaml view
@@ -30,20 +30,20 @@   𝕄(Φ.y):     𝔼(L_pick):       𝕄(ξ.x):-        morphed 𝑛·1·1 := L_inner:λ:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.x)-      𝑛2·1 := L_inner:λ  # rewrite(𝑛1 of L_pick)+        morphed 𝑛·1·1 ≔ L_inner:λ:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.x)+      𝑛2·1 ≔ L_inner:λ  # rewrite(𝑛1 of L_pick)       𝔼(L_inner):  # 𝔼(𝑛2 of L_pick)-        𝑛·2·1 := 𝜎1:λ:φ  # 𝑛 of L_inner+        𝑛·2·1 ≔ 𝜎1:λ:φ  # 𝑛 of L_inner         𝕄(𝑛·2·1):-          morphed 𝑛·2·2 := 𝜎1:λ:φ-        𝑛·2·3 := 𝑛·2·2  # 𝕄(𝑛·2·1)-        evaluated 𝑛·2·4 := 𝑛·2·3  # L_inner:λ-      𝑛3·1 := 𝑛·2·3  # 𝔼(𝑛2 of L_pick)-      𝑛·1·2 := 𝑛3·1  # 𝑛 of L_pick+          morphed 𝑛·2·2 ≔ 𝜎1:λ:φ+        𝑛·2·3 ≔ 𝑛·2·2  # 𝕄(𝑛·2·1)+        evaluated 𝑛·2·4 ≔ 𝑛·2·3  # L_inner:λ+      𝑛3·1 ≔ 𝑛·2·3  # 𝔼(𝑛2 of L_pick)+      𝑛·1·2 ≔ 𝑛3·1  # 𝑛 of L_pick       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := 𝑛3·1-      𝑛·1·4 := 𝑛3·1  # 𝕄(𝑛·1·2)-      evaluated 𝑛·1·5 := 𝑛·1·4  # ⟦ x ↦ 𝑛·1·1, λ ⤍ L_pick ⟧-    normalized 𝑛·0·1 := 𝜎1:λ  # 𝑛·1·5.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·3 ≔ 𝑛3·1+      𝑛·1·4 ≔ 𝑛3·1  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ x ↦ 𝑛·1·1, λ ⤍ L_pick ⟧+    normalized 𝑛·0·1 ≔ 𝜎1:λ  # 𝑛·1·5.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
− test-resources/evaluate-packs/gets-stuck-on-a-dispatch-off-a-symbol-outside-a-join.yaml
@@ -1,32 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----# yamllint disable rule:line-length-# An entry that does not join morphs an operand dispatching off a bare-# symbol. There is no side to end, so the 'opaque' still gets the firing stuck-# (#2427).-symbolic: |-  - λ: L_fork-    dataize:-      𝛿1: $.on🌵-    morph:-      𝑛1: $.left🌵-      𝑛2: $.right🌵-    join:-      on: 𝛿1-      left: 𝑛1-      right: 𝑛2-      otherwise: L_fork-  - λ: L_id-    morph:-      𝑛1: $.x-    𝑛: 𝑛1-location: 'Q.e1'-input: '⟦ e1 ↦ ⟦ λ ⤍ L_id, x ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧.φ ⟧'-fails: "No entry of --symbolic answers the λ function '𝜎1'"-protocol: |-  𝕄(Φ.e1):-    𝔼(L_id):-      𝕄(ξ.x):-        opaque 𝜎1  # 𝕄(𝜎1:λ.q)-      stuck 𝜎1
test-resources/evaluate-packs/guards-a-side-holding-no-symbol-against-a-bottom.yaml view
@@ -25,17 +25,17 @@   𝕄(Φ.e1):     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 00--      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 00-+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := Φ.k:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.left🌵)+        morphed 𝑛·1·1 ≔ Φ.k:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):-        morphed 𝑛·1·2 := ⊥-      𝑛2·1 := ⊥  # 𝕄(ξ.right🌵)+        morphed 𝑛·1·2 ≔ ⊥+      𝑛2·1 ≔ ⊥  # 𝕄(ξ.right🌵)       guarded 𝛿1·1 ? 𝑛1·1 : 𝑛2·1  # where 𝑛2·1 is ⊥-      𝑛·1·3 := 𝑛·1·1-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ 𝑛·1·3, right🌵 ↦ ⊥ ⟧-    normalized 𝑛·0·1 := Φ.k  # 𝑛·1·4.φ-    normalized 𝑛·0·2 := ⟦⟧:q  # Φ.k-    morphed 𝑛·0·3 := 𝑛·0·2+      𝑛·1·3 ≔ 𝑛·1·1+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ 𝑛·1·3, right🌵 ↦ ⊥ ⟧+    normalized 𝑛·0·1 ≔ Φ.k  # 𝑛·1·4.φ+    normalized 𝑛·0·2 ≔ ⟦⟧:q  # Φ.k+    morphed 𝑛·0·3 ≔ 𝑛·0·2
test-resources/evaluate-packs/hands-a-named-argument-to-both-sides-of-an-attribute-of-a-fabricated-formation.yaml view
@@ -30,27 +30,27 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ Φ.hx, ke(x) ↦ x:k ⟧+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ Φ.hx, ke(x) ↦ x:k ⟧       𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ ke(x) ↦ x:k ⟧-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke(x) ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧  # 𝑛·1·4.ke-    𝑛·0·2 := ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧( x ↦ 𝜎2:λ )-    𝑛·0·3 := ⟦ λ ⤍ L_join, x ↦ 𝜎2:λ, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧+        morphed 𝑛·1·2 ≔ ⟦ ke(x) ↦ x:k ⟧+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke(x) ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧  # 𝑛·1·4.ke+    𝑛·0·2 ≔ ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧( x ↦ 𝜎2:λ )+    𝑛·0·3 ≔ ⟦ λ ⤍ L_join, x ↦ 𝜎2:λ, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧     𝔼(L_join):-      𝑛·2·1 := ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ )  # 𝕄(ξ.left🌵)-      𝑛·2·2 := ⟦ x ↦ 𝜎2:λ, k ↦ x ⟧+      𝑛·2·1 ≔ ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ )  # 𝕄(ξ.left🌵)+      𝑛·2·2 ≔ ⟦ x ↦ 𝜎2:λ, k ↦ x ⟧       𝕄(ξ.left🌵):-        morphed 𝑛·2·3 := 𝑛·2·2-      𝑛·2·4 := ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ )  # 𝕄(ξ.right🌵)-      𝑛·2·5 := ⟦ x ↦ 𝜎2:λ, k ↦ x ⟧+        morphed 𝑛·2·3 ≔ 𝑛·2·2+      𝑛·2·4 ≔ ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ )  # 𝕄(ξ.right🌵)+      𝑛·2·5 ≔ ⟦ x ↦ 𝜎2:λ, k ↦ x ⟧       𝕄(ξ.right🌵):-        morphed 𝑛·2·6 := 𝑛·2·5-      𝑛·2·7 := 𝑛·2·6-      evaluated 𝑛·2·8 := 𝑛·2·7  # 𝑛·0·3-    normalized 𝑛·0·4 := 𝜎2:λ  # 𝑛·2·8.k-    morphed 𝑛·0·5 := 𝑛·0·4+        morphed 𝑛·2·6 ≔ 𝑛·2·5+      𝑛·2·7 ≔ 𝑛·2·6+      evaluated 𝑛·2·8 ≔ 𝑛·2·7  # 𝑛·0·3+    normalized 𝑛·0·4 ≔ 𝜎2:λ  # 𝑛·2·8.k+    morphed 𝑛·0·5 ≔ 𝑛·0·4
test-resources/evaluate-packs/hands-a-positional-argument-to-both-sides-of-an-attribute-of-a-fabricated-formation.yaml view
@@ -24,33 +24,33 @@       right: $.right🌵       otherwise: L_join location: 'Q.y'-input: '⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ Φ.hx, ke ↦ ⟦ x ↦ ∅, k ↦ ξ.x ⟧ ⟧, b ↦ ⟦ ke ↦ ⟦ x ↦ ∅, k ↦ ξ.x ⟧ ⟧, λ ⤍ L_fork ⟧.ke( ⟦ λ ⤍ 𝜎2 ⟧ ).k ⟧'+input: '⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ Φ.hx, ke ↦ ⟦ x ↦ ∅, k ↦ ξ.x ⟧ ⟧, b ↦ ⟦ ke ↦ ⟦ x ↦ ∅, k ↦ ξ.x ⟧ ⟧, λ ⤍ L_fork ⟧.ke( x ↦ ⟦ λ ⤍ 𝜎2 ⟧ ).k ⟧' result: '𝜎2:λ' protocol: |   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ Φ.hx, ke(x) ↦ x:k ⟧+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ Φ.hx, ke(x) ↦ x:k ⟧       𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ ke(x) ↦ x:k ⟧-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke(x) ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧  # 𝑛·1·4.ke-    𝑛·0·2 := ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧( x ↦ 𝜎2:λ )-    𝑛·0·3 := ⟦ λ ⤍ L_join, x ↦ 𝜎2:λ, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧+        morphed 𝑛·1·2 ≔ ⟦ ke(x) ↦ x:k ⟧+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke(x) ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧  # 𝑛·1·4.ke+    𝑛·0·2 ≔ ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧( x ↦ 𝜎2:λ )+    𝑛·0·3 ≔ ⟦ λ ⤍ L_join, x ↦ 𝜎2:λ, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x ) ⟧     𝔼(L_join):-      𝑛·2·1 := ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ )  # 𝕄(ξ.left🌵)-      𝑛·2·2 := ⟦ x ↦ 𝜎2:λ, k ↦ x ⟧+      𝑛·2·1 ≔ ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ )  # 𝕄(ξ.left🌵)+      𝑛·2·2 ≔ ⟦ x ↦ 𝜎2:λ, k ↦ x ⟧       𝕄(ξ.left🌵):-        morphed 𝑛·2·3 := 𝑛·2·2-      𝑛·2·4 := ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ )  # 𝕄(ξ.right🌵)-      𝑛·2·5 := ⟦ x ↦ 𝜎2:λ, k ↦ x ⟧+        morphed 𝑛·2·3 ≔ 𝑛·2·2+      𝑛·2·4 ≔ ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ )  # 𝕄(ξ.right🌵)+      𝑛·2·5 ≔ ⟦ x ↦ 𝜎2:λ, k ↦ x ⟧       𝕄(ξ.right🌵):-        morphed 𝑛·2·6 := 𝑛·2·5-      𝑛·2·7 := 𝑛·2·6-      evaluated 𝑛·2·8 := 𝑛·2·7  # 𝑛·0·3-    normalized 𝑛·0·4 := 𝜎2:λ  # 𝑛·2·8.k-    morphed 𝑛·0·5 := 𝑛·0·4+        morphed 𝑛·2·6 ≔ 𝑛·2·5+      𝑛·2·7 ≔ 𝑛·2·6+      evaluated 𝑛·2·8 ≔ 𝑛·2·7  # 𝑛·0·3+    normalized 𝑛·0·4 ≔ 𝜎2:λ  # 𝑛·2·8.k+    morphed 𝑛·0·5 ≔ 𝑛·0·4
test-resources/evaluate-packs/hands-a-side-of-a-fabricated-formation-only-the-voids-its-attribute-leaves.yaml view
@@ -33,37 +33,37 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ Φ.hx, ke(x) ↦ x:k ⟧+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ Φ.hx, ke(x) ↦ x:k ⟧       𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ ke(x, w) ↦ x:k ⟧-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke(x, w) ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x, w ↦ w ) ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, x ↦ ∅, w ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x, w ↦ w ) ⟧  # 𝑛·1·4.ke-    𝑛·0·2 := ⟦ λ ⤍ L_join, x ↦ ∅, w ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x, w ↦ w ) ⟧( x ↦ 𝜎2:λ:φ )-    𝑛·0·3 := ⟦ λ ⤍ L_join, x ↦ 𝜎2:λ:φ, w ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x, w ↦ w ) ⟧+        morphed 𝑛·1·2 ≔ ⟦ ke(x, w) ↦ x:k ⟧+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke(x, w) ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x, w ↦ w ) ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, x ↦ ∅, w ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x, w ↦ w ) ⟧  # 𝑛·1·4.ke+    𝑛·0·2 ≔ ⟦ λ ⤍ L_join, x ↦ ∅, w ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x, w ↦ w ) ⟧( x ↦ 𝜎2:λ:φ )+    𝑛·0·3 ≔ ⟦ λ ⤍ L_join, x ↦ 𝜎2:λ:φ, w ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke( x ↦ x ), right🌵 ↦ ρ.right🌵.ke( x ↦ x, w ↦ w ) ⟧     𝔼(L_join):-      𝑛·2·1 := ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ:φ )  # 𝕄(ξ.left🌵)-      𝑛·2·2 := ⟦ x ↦ 𝜎2:λ:φ, k ↦ x ⟧+      𝑛·2·1 ≔ ⟦ x ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ:φ )  # 𝕄(ξ.left🌵)+      𝑛·2·2 ≔ ⟦ x ↦ 𝜎2:λ:φ, k ↦ x ⟧       𝕄(ξ.left🌵):-        morphed 𝑛·2·3 := 𝑛·2·2-      𝑛·2·4 := ⟦ x ↦ ∅, w ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ:φ )  # 𝕄(ξ.right🌵)-      𝑛·2·5 := ⟦ x ↦ 𝜎2:λ:φ, w ↦ ∅, k ↦ x ⟧-      𝑛·2·6 := 𝑛·2·5( w ↦ ⊥ )  # 𝕄(ξ.right🌵)-      𝑛·2·7 := ⟦ x ↦ 𝜎2:λ:φ, w ↦ ⊥, k ↦ x ⟧+        morphed 𝑛·2·3 ≔ 𝑛·2·2+      𝑛·2·4 ≔ ⟦ x ↦ ∅, w ↦ ∅, k ↦ x ⟧( x ↦ 𝜎2:λ:φ )  # 𝕄(ξ.right🌵)+      𝑛·2·5 ≔ ⟦ x ↦ 𝜎2:λ:φ, w ↦ ∅, k ↦ x ⟧+      𝑛·2·6 ≔ 𝑛·2·5( w ↦ ⊥ )  # 𝕄(ξ.right🌵)+      𝑛·2·7 ≔ ⟦ x ↦ 𝜎2:λ:φ, w ↦ ⊥, k ↦ x ⟧       𝕄(ξ.right🌵):-        morphed 𝑛·2·8 := 𝑛·2·7-      fabricated 𝑛·2·9 := 𝑛·2·3 and 𝑛·2·8  # ⟦ left🌵 ↦ 𝑛·2·3, right🌵 ↦ 𝑛·2·8, x ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.x, right🌵 ↦ ρ.right🌵.x ⟧, k ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.k, right🌵 ↦ ρ.right🌵.k ⟧, w ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.w, right🌵 ↦ ρ.right🌵.w ⟧ ⟧-      evaluated 𝑛·2·10 := 𝑛·2·9  # 𝑛·0·3-    normalized 𝑛·0·4 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.k, right🌵 ↦ ρ.right🌵.k ⟧  # 𝑛·2·10.k+        morphed 𝑛·2·8 ≔ 𝑛·2·7+      fabricated 𝑛·2·9 ≔ 𝑛·2·3 and 𝑛·2·8  # ⟦ left🌵 ↦ 𝑛·2·3, right🌵 ↦ 𝑛·2·8, x ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.x, right🌵 ↦ ρ.right🌵.x ⟧, k ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.k, right🌵 ↦ ρ.right🌵.k ⟧, w ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.w, right🌵 ↦ ρ.right🌵.w ⟧ ⟧+      evaluated 𝑛·2·10 ≔ 𝑛·2·9  # 𝑛·0·3+    normalized 𝑛·0·4 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.k, right🌵 ↦ ρ.right🌵.k ⟧  # 𝑛·2·10.k     𝔼(L_join):       𝕄(ξ.left🌵):-        morphed 𝑛·3·1 := 𝜎2:λ:φ+        morphed 𝑛·3·1 ≔ 𝜎2:λ:φ       𝕄(ξ.right🌵):-        morphed 𝑛·3·2 := 𝑛·3·1-      𝑛·3·3 := 𝑛·3·1-      evaluated 𝑛·3·4 := 𝑛·3·3  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.k, right🌵 ↦ ρ.right🌵.k ⟧-    normalized 𝑛·0·5 := 𝜎2:λ  # 𝑛·3·4.φ-    morphed 𝑛·0·6 := 𝑛·0·5+        morphed 𝑛·3·2 ≔ 𝑛·3·1+      𝑛·3·3 ≔ 𝑛·3·1+      evaluated 𝑛·3·4 ≔ 𝑛·3·3  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.k, right🌵 ↦ ρ.right🌵.k ⟧+    normalized 𝑛·0·5 ≔ 𝜎2:λ  # 𝑛·3·4.φ+    morphed 𝑛·0·6 ≔ 𝑛·0·5
test-resources/evaluate-packs/heads-the-block-of-a-dataize-operand-with-the-operand.yaml view
@@ -17,53 +17,53 @@ input: >   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.plus( 6 ).φ ⟧+    φ ↦ 5.plus( x ↦ 6 ).φ ⟧ protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ 6.0 )-    𝑛·0·6 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 6.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 6.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 6.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·22):-        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )-        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·1·25 := 𝑛·1·24-      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·6-    normalized 𝑛·0·7 := 𝜎1:λ  # 𝑛·1·27.φ-    morphed 𝑛·0·8 := 𝑛·0·7+        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )+        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·1·25 ≔ 𝑛·1·24+      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ 𝜎1:λ  # 𝑛·1·27.φ+    morphed 𝑛·0·8 ≔ 𝑛·0·7
test-resources/evaluate-packs/heads-the-block-of-a-morph-operand-with-the-operand.yaml view
@@ -18,15 +18,15 @@   𝕄(Φ.y):     𝔼(L_kept):       𝕄(ξ.x):-        normalized 𝑛·1·1 := ⟦ φ ↦ ∅, neg ↦ ⟦⟧ ⟧  # Φ.number-        𝑛·1·2 := 5.0-        𝑛·1·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), neg ↦ ⟦⟧ ⟧-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·4  # 𝕄(ξ.x)-      𝑛·1·5 := 𝜎1:λ:φ  # 𝑛 of L_kept+        normalized 𝑛·1·1 ≔ ⟦ φ ↦ ∅, neg ↦ ⟦⟧ ⟧  # Φ.number+        𝑛·1·2 ≔ 5.0+        𝑛·1·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), neg ↦ ⟦⟧ ⟧+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·4  # 𝕄(ξ.x)+      𝑛·1·5 ≔ 𝜎1:λ:φ  # 𝑛 of L_kept       𝕄(𝑛·1·5):-        morphed 𝑛·1·6 := 𝜎1:λ:φ-      𝑛·1·7 := 𝑛·1·6  # 𝕄(𝑛·1·5)-      evaluated 𝑛·1·8 := 𝑛·1·7  # ⟦ x ↦ 𝑛·1·2, λ ⤍ L_kept ⟧-    normalized 𝑛·0·1 := 𝜎1:λ  # 𝑛·1·8.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·6 ≔ 𝜎1:λ:φ+      𝑛·1·7 ≔ 𝑛·1·6  # 𝕄(𝑛·1·5)+      evaluated 𝑛·1·8 ≔ 𝑛·1·7  # ⟦ x ↦ 𝑛·1·2, λ ⤍ L_kept ⟧+    normalized 𝑛·0·1 ≔ 𝜎1:λ  # 𝑛·1·8.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-bare-symbol-a-cast-brought-down-two-decorators.yaml view
@@ -31,17 +31,17 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := 𝜎2:λ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ 𝜎2:λ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ φ ↦ ⟦ φ ↦ 𝜎3:λ, if ↦ Φ.zu ⟧, x ↦ Φ.ty ⟧-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      cast 𝑛3·1 := ⟦ φ ↦ ⟦ φ ↦ 𝜎2:λ, if ↦ Φ.zu ⟧, x ↦ Φ.ty ⟧  # 𝑛1·1 up to 𝑛2·1-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3-      𝑛·1·3 := ⟦ φ ↦ ⟦ φ ↦ 𝜎4:λ, if ↦ Φ.zu ⟧, x ↦ Φ.ty ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝜎2:λ, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ φ ↦ 𝜎4:λ, if ↦ Φ.zu ⟧  # 𝑛·1·4.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·2 ≔ ⟦ φ ↦ ⟦ φ ↦ 𝜎3:λ, if ↦ Φ.zu ⟧, x ↦ Φ.ty ⟧+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      cast 𝑛3·1 ≔ ⟦ φ ↦ ⟦ φ ↦ 𝜎2:λ, if ↦ Φ.zu ⟧, x ↦ Φ.ty ⟧  # 𝑛1·1 up to 𝑛2·1+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3+      𝑛·1·3 ≔ ⟦ φ ↦ ⟦ φ ↦ 𝜎4:λ, if ↦ Φ.zu ⟧, x ↦ Φ.ty ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝜎2:λ, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ 𝜎4:λ, if ↦ Φ.zu ⟧  # 𝑛·1·4.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-bare-symbol-a-cast-brought-into-a-decorator-of-a-fork.yaml view
@@ -37,45 +37,45 @@   𝕄(Φ.e1):     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := ⟦ k ↦ ⟦⟧, φ ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎4:λ, left🌵 ↦ 𝜎5:λ:φ, right🌵 ↦ 𝜎6:λ:φ ⟧ ⟧-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.left🌵)+        morphed 𝑛·1·1 ≔ ⟦ k ↦ ⟦⟧, φ ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎4:λ, left🌵 ↦ 𝜎5:λ:φ, right🌵 ↦ 𝜎6:λ:φ ⟧ ⟧+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):-        morphed 𝑛·1·2 := 𝜎3:λ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.right🌵)-      cast 𝑛6·1 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎3:λ ⟧  # 𝑛2·1 up to 𝑛·1·1-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛6·1  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛6·1, k ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.k, right🌵 ↦ ρ.right🌵.k ⟧, φ ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝜎3:λ ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧  # 𝑛·1·4.φ+        morphed 𝑛·1·2 ≔ 𝜎3:λ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.right🌵)+      cast 𝑛6·1 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎3:λ ⟧  # 𝑛2·1 up to 𝑛·1·1+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛6·1  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛6·1, k ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.k, right🌵 ↦ ρ.right🌵.k ⟧, φ ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝜎3:λ ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧  # 𝑛·1·4.φ     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·2·1 := 𝔻(𝜎1:λ)-      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.on🌵)+        𝛿·2·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        morphed 𝑛·2·1 := ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎4:λ, left🌵 ↦ 𝜎5:λ:φ, right🌵 ↦ 𝜎6:λ:φ ⟧-      𝑛1·2 := ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎4:λ, left🌵 ↦ 𝜎5:λ:φ, right🌵 ↦ 𝜎6:λ:φ ⟧  # 𝕄(ξ.left🌵)+        morphed 𝑛·2·1 ≔ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎4:λ, left🌵 ↦ 𝜎5:λ:φ, right🌵 ↦ 𝜎6:λ:φ ⟧+      𝑛1·2 ≔ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎4:λ, left🌵 ↦ 𝜎5:λ:φ, right🌵 ↦ 𝜎6:λ:φ ⟧  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):-        morphed 𝑛·2·2 := 𝑛2·1-      𝑛2·2 := 𝑛2·1  # 𝕄(ξ.right🌵)+        morphed 𝑛·2·2 ≔ 𝑛2·1+      𝑛2·2 ≔ 𝑛2·1  # 𝕄(ξ.right🌵)       𝔼(L_fork):  # 𝔼(𝑛1 of L_fork)         𝔻(ξ.on🌵):-          𝛿·3·1 := 𝔻(𝜎4:λ)-        𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.on🌵)+          𝛿·3·1 ≔ 𝔻(𝜎4:λ)+        𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.on🌵)         𝕄(ξ.left🌵):-          morphed 𝑛·3·1 := 𝜎5:λ:φ-        𝑛1·3 := 𝑛·3·1  # 𝕄(ξ.left🌵)+          morphed 𝑛·3·1 ≔ 𝜎5:λ:φ+        𝑛1·3 ≔ 𝑛·3·1  # 𝕄(ξ.left🌵)         𝕄(ξ.right🌵):-          morphed 𝑛·3·2 := 𝜎6:λ:φ-        𝑛2·3 := 𝑛·3·2  # 𝕄(ξ.right🌵)-        joined 𝜎7 := 𝛿1·3 ? 𝜎5 : 𝜎6-        𝑛·3·3 := 𝜎7:λ:φ-        evaluated 𝑛·3·4 := 𝑛·3·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎4:λ, left🌵 ↦ 𝑛·3·1, right🌵 ↦ 𝑛·3·2 ⟧-      𝑛3·2 := 𝑛·3·3  # 𝔼(𝑛1 of L_fork)-      cast 𝑛6·2 := 𝜎3:λ:φ  # 𝑛2·2 up to 𝑛3·2-      joined 𝜎8 := 𝛿1·2 ? 𝜎7 : 𝜎3-      𝑛·2·3 := 𝜎8:λ:φ-      evaluated 𝑛·2·4 := 𝑛·2·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧-    normalized 𝑛·0·2 := 𝜎8:λ  # 𝑛·2·4.φ-    morphed 𝑛·0·3 := 𝑛·0·2+          morphed 𝑛·3·2 ≔ 𝜎6:λ:φ+        𝑛2·3 ≔ 𝑛·3·2  # 𝕄(ξ.right🌵)+        joined 𝜎7 ≔ 𝛿1·3 ? 𝜎5 : 𝜎6+        𝑛·3·3 ≔ 𝜎7:λ:φ+        evaluated 𝑛·3·4 ≔ 𝑛·3·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎4:λ, left🌵 ↦ 𝑛·3·1, right🌵 ↦ 𝑛·3·2 ⟧+      𝑛3·2 ≔ 𝑛·3·3  # 𝔼(𝑛1 of L_fork)+      cast 𝑛6·2 ≔ 𝜎3:λ:φ  # 𝑛2·2 up to 𝑛3·2+      joined 𝜎8 ≔ 𝛿1·2 ? 𝜎7 : 𝜎3+      𝑛·2·3 ≔ 𝜎8:λ:φ+      evaluated 𝑛·2·4 ≔ 𝑛·2·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧+    normalized 𝑛·0·2 ≔ 𝜎8:λ  # 𝑛·2·4.φ+    morphed 𝑛·0·3 ≔ 𝑛·0·2
test-resources/evaluate-packs/joins-a-bare-symbol-a-cast-brought-into-a-side-holding-a-symbol-off-its-phi-chain.yaml view
@@ -29,17 +29,17 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := 𝜎2:λ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ 𝜎2:λ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ φ ↦ 𝜎3:λ, ke ↦ 𝜎4:λ ⟧-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      cast 𝑛3·1 := ⟦ φ ↦ 𝜎2:λ, ke ↦ 𝜎4:λ ⟧  # 𝑛1·1 up to 𝑛2·1-      joined 𝜎5 := 𝛿1·1 ? 𝜎2 : 𝜎3-      𝑛·1·3 := ⟦ φ ↦ 𝜎5:λ, ke ↦ 𝜎4:λ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝜎2:λ, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := 𝜎5:λ  # 𝑛·1·4.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·2 ≔ ⟦ φ ↦ 𝜎3:λ, ke ↦ 𝜎4:λ ⟧+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      cast 𝑛3·1 ≔ ⟦ φ ↦ 𝜎2:λ, ke ↦ 𝜎4:λ ⟧  # 𝑛1·1 up to 𝑛2·1+      joined 𝜎5 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3+      𝑛·1·3 ≔ ⟦ φ ↦ 𝜎5:λ, ke ↦ 𝜎4:λ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝜎2:λ, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ 𝜎5:λ  # 𝑛·1·4.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-bare-symbol-a-cast-brought-into-the-shape-of-a-decorator.yaml view
@@ -10,7 +10,7 @@ # of the left side with 𝜎3 in place of 𝜎2 at the end of its φ chain, so the # two sides differ in their symbols alone and the join makes one term of them. # The cast mints no symbol. The protocol writes the line of '𝑛20', which took-# the cast, as 'cast 𝑛20·1 := …' with the meta it read and the meta whose+# the cast, as 'cast 𝑛20·1 ≔ …' with the meta it read and the meta whose # shape it took. The line of '𝑛19' binds its term as it is and writes # nothing (#2192). symbolic: |@@ -35,17 +35,17 @@   𝕄(Φ.e1):     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎2:λ ⟧-      𝑛13·1 := 𝑛·1·1  # 𝕄(ξ.left🌵)+        morphed 𝑛·1·1 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎2:λ ⟧+      𝑛13·1 ≔ 𝑛·1·1  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):-        morphed 𝑛·1·2 := 𝜎3:λ-      𝑛14·1 := 𝑛·1·2  # 𝕄(ξ.right🌵)-      cast 𝑛20·1 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎3:λ ⟧  # 𝑛14·1 up to 𝑛13·1-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3-      𝑛·1·3 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎4:λ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝜎3:λ ⟧-    normalized 𝑛·0·1 := 𝜎4:λ  # 𝑛·1·4.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·2 ≔ 𝜎3:λ+      𝑛14·1 ≔ 𝑛·1·2  # 𝕄(ξ.right🌵)+      cast 𝑛20·1 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎3:λ ⟧  # 𝑛14·1 up to 𝑛13·1+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3+      𝑛·1·3 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎4:λ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝜎3:λ ⟧+    normalized 𝑛·0·1 ≔ 𝜎4:λ  # 𝑛·1·4.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-bool-literal-a-rewrite-line-brought-into-the-shape-of-the-other-side.yaml view
@@ -44,17 +44,17 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ 𝜎2:λ, kq ↦ Φ.true ⟧-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ 𝜎2:λ, kq ↦ Φ.true ⟧+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ φ ↦ 𝜎3:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      𝑛3·1 := ⟦ φ ↦ 𝜎2:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧  # rewrite(𝑛1 of L_fork)-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3-      𝑛·1·3 := ⟦ φ ↦ 𝜎4:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := 𝜎4:λ  # 𝑛·1·4.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·2 ≔ ⟦ φ ↦ 𝜎3:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      𝑛3·1 ≔ ⟦ φ ↦ 𝜎2:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧  # rewrite(𝑛1 of L_fork)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3+      𝑛·1·3 ≔ ⟦ φ ↦ 𝜎4:λ, kq ↦ Φ.bool( if ↦ 01-:Δ ) ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ 𝜎4:λ  # 𝑛·1·4.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-bottom-into-the-shape-of-the-other-side.yaml view
@@ -28,16 +28,16 @@   𝕄(Φ.e1):     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := ⊥-      𝑛1·1 := ⊥  # 𝕄(ξ.left🌵)+        morphed 𝑛·1·1 ≔ ⊥+      𝑛1·1 ≔ ⊥  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):-        morphed 𝑛·1·2 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎2:λ ⟧-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.right🌵)-      joined 𝜎4 := 𝛿1·1 ? 𝜎3 : 𝜎2  # where 𝜎3 is ⊥-      𝑛·1·3 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎4:λ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ⊥, right🌵 ↦ 𝑛·1·2 ⟧-    normalized 𝑛·0·1 := 𝜎4:λ  # 𝑛·1·4.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·2 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎2:λ ⟧+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.right🌵)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎3 : 𝜎2  # where 𝜎3 is ⊥+      𝑛·1·3 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎4:λ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ⊥, right🌵 ↦ 𝑛·1·2 ⟧+    normalized 𝑛·0·1 ≔ 𝜎4:λ  # 𝑛·1·4.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-number-with-a-formation-an-undress-took-the-number-out-of.yaml view
@@ -32,31 +32,31 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        normalized 𝑛·1·1 := ⟦ φ ↦ ∅, neg ↦ ρ:φ ⟧  # Φ.number-        𝑛·1·2 := 42.0-        𝑛·1·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-45-00-00-00-00-00-00:Δ ), neg ↦ ρ:φ ⟧-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·4  # 𝕄(ξ.left🌵)+        normalized 𝑛·1·1 ≔ ⟦ φ ↦ ∅, neg ↦ ρ:φ ⟧  # Φ.number+        𝑛·1·2 ≔ 42.0+        𝑛·1·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-45-00-00-00-00-00-00:Δ ), neg ↦ ρ:φ ⟧+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·4  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):-        morphed 𝑛·1·5 := 7.0:φ-      undressed 𝑛·1·6 := 𝑛·1·5.φ+        morphed 𝑛·1·5 ≔ 7.0:φ+      undressed 𝑛·1·6 ≔ 𝑛·1·5.φ       𝕄(𝑛·1·6):-        𝑛·1·7 := 7.0-        𝑛·1·8 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), neg ↦ ρ:φ ⟧-        morphed 𝑛·1·9 := 𝑛·1·8-      𝑛2·1 := 𝑛·1·9  # undress(ξ.right🌵)-      symbolized 𝜎2 := 40-45-00-00-00-00-00-00  # 42.0-      𝑛3·1 := ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ), neg ↦ ρ:φ ⟧  # symbolize(𝑛1 of L_fork)-      symbolized 𝜎3 := 40-1C-00-00-00-00-00-00  # 7.0-      𝑛4·1 := ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎3:λ ), neg ↦ ρ:φ ⟧  # symbolize(𝑛2 of L_fork)-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3-      𝑛·1·10 := ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ), neg ↦ ρ:φ ⟧-      evaluated 𝑛·1·11 := 𝑛·1·10  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·2, right🌵 ↦ 𝑛·1·5 ⟧-    normalized 𝑛·0·1 := Φ.bytes( φ ↦ 𝜎4:λ )  # 𝑛·1·11.φ-    normalized 𝑛·0·2 := ∅:φ  # Φ.bytes-    𝑛·0·3 := Φ.bytes( φ ↦ 𝜎4:λ )-    𝑛·0·4 := 𝜎4:λ:φ-    morphed 𝑛·0·5 := 𝑛·0·4+        𝑛·1·7 ≔ 7.0+        𝑛·1·8 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), neg ↦ ρ:φ ⟧+        morphed 𝑛·1·9 ≔ 𝑛·1·8+      𝑛2·1 ≔ 𝑛·1·9  # undress(ξ.right🌵)+      symbolized 𝜎2 ≔ 40-45-00-00-00-00-00-00  # 42.0+      𝑛3·1 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ), neg ↦ ρ:φ ⟧  # symbolize(𝑛1 of L_fork)+      symbolized 𝜎3 ≔ 40-1C-00-00-00-00-00-00  # 7.0+      𝑛4·1 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎3:λ ), neg ↦ ρ:φ ⟧  # symbolize(𝑛2 of L_fork)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3+      𝑛·1·10 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ), neg ↦ ρ:φ ⟧+      evaluated 𝑛·1·11 ≔ 𝑛·1·10  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·2, right🌵 ↦ 𝑛·1·5 ⟧+    normalized 𝑛·0·1 ≔ Φ.bytes( φ ↦ 𝜎4:λ )  # 𝑛·1·11.φ+    normalized 𝑛·0·2 ≔ ∅:φ  # Φ.bytes+    𝑛·0·3 ≔ Φ.bytes( φ ↦ 𝜎4:λ )+    𝑛·0·4 ≔ 𝜎4:λ:φ+    morphed 𝑛·0·5 ≔ 𝑛·0·4
test-resources/evaluate-packs/joins-a-side-a-morph-line-brought-down-from-what-a-rewrite-line-unwrapped.yaml view
@@ -38,21 +38,21 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := 𝜎2:λ:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ 𝜎2:λ:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.t:φ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      𝑛3·1 := Φ.t  # rewrite(𝑛2 of L_fork)+        morphed 𝑛·1·2 ≔ Φ.t:φ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      𝑛3·1 ≔ Φ.t  # rewrite(𝑛2 of L_fork)       𝕄(𝑛3):         remembered 𝑛·1·3 ≡ Φ.t  # 𝜎3:λ:φ-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛4·1 := 𝑛·1·4  # 𝕄(𝑛3 of L_fork)-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3-      𝑛·1·5 := 𝜎4:λ:φ-      evaluated 𝑛·1·6 := 𝑛·1·5  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := 𝜎4:λ  # 𝑛·1·6.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛4·1 ≔ 𝑛·1·4  # 𝕄(𝑛3 of L_fork)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3+      𝑛·1·5 ≔ 𝜎4:λ:φ+      evaluated 𝑛·1·6 ≔ 𝑛·1·5  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ 𝜎4:λ  # 𝑛·1·6.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-side-an-evaluate-line-fired-with-a-bool-it-left-as-it-is.yaml view
@@ -31,28 +31,28 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := L_eq:λ-      𝑛1·1 := L_eq:λ  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ L_eq:λ+      𝑛1·1 ≔ L_eq:λ  # 𝕄(ξ.a)       𝕄(ξ.b):-        normalized 𝑛·1·2 := ∅:φ  # Φ.bool-        𝑛·1·3 := Φ.bool( φ ↦ 𝜎2:λ )-        𝑛·1·4 := 𝜎2:λ:φ-        morphed 𝑛·1·5 := 𝑛·1·4-      𝑛2·1 := 𝑛·1·5  # 𝕄(ξ.b)+        normalized 𝑛·1·2 ≔ ∅:φ  # Φ.bool+        𝑛·1·3 ≔ Φ.bool( φ ↦ 𝜎2:λ )+        𝑛·1·4 ≔ 𝜎2:λ:φ+        morphed 𝑛·1·5 ≔ 𝑛·1·4+      𝑛2·1 ≔ 𝑛·1·5  # 𝕄(ξ.b)       𝔼(L_eq):  # 𝔼(𝑛1 of L_fork)-        𝑛·2·1 := Φ.bool( φ ↦ 𝜎3:λ )  # 𝑛 of L_eq+        𝑛·2·1 ≔ Φ.bool( φ ↦ 𝜎3:λ )  # 𝑛 of L_eq         𝕄(𝑛·2·1):-          𝑛·2·2 := Φ.bool( φ ↦ 𝜎3:λ )-          𝑛·2·3 := 𝜎3:λ:φ-          morphed 𝑛·2·4 := 𝑛·2·3-        𝑛·2·5 := 𝑛·2·4  # 𝕄(𝑛·2·1)-        evaluated 𝑛·2·6 := 𝑛·2·5  # L_eq:λ-      𝑛3·1 := 𝑛·2·5  # 𝔼(𝑛1 of L_fork)-      joined 𝜎4 := 𝛿1·1 ? 𝜎3 : 𝜎2-      𝑛·1·6 := 𝜎4:λ:φ-      evaluated 𝑛·1·7 := 𝑛·1·6  # ⟦ c ↦ 𝜎1:λ, a ↦ L_eq:λ, b ↦ 𝑛·1·3, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := 𝜎4:λ  # 𝑛·1·7.φ-    morphed 𝑛·0·2 := 𝑛·0·1+          𝑛·2·2 ≔ Φ.bool( φ ↦ 𝜎3:λ )+          𝑛·2·3 ≔ 𝜎3:λ:φ+          morphed 𝑛·2·4 ≔ 𝑛·2·3+        𝑛·2·5 ≔ 𝑛·2·4  # 𝕄(𝑛·2·1)+        evaluated 𝑛·2·6 ≔ 𝑛·2·5  # L_eq:λ+      𝑛3·1 ≔ 𝑛·2·5  # 𝔼(𝑛1 of L_fork)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎3 : 𝜎2+      𝑛·1·6 ≔ 𝜎4:λ:φ+      evaluated 𝑛·1·7 ≔ 𝑛·1·6  # ⟦ c ↦ 𝜎1:λ, a ↦ L_eq:λ, b ↦ 𝑛·1·3, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ 𝜎4:λ  # 𝑛·1·7.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-side-holding-a-datum-a-symbolize-turned-into-a-symbol.yaml view
@@ -32,21 +32,21 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎3:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎3:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := 1.0:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ 1.0:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ) ):φ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      symbolized 𝜎4 := 3F-F0-00-00-00-00-00-00  # 1.0-      𝑛3·1 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ) ):φ  # symbolize(𝑛1 of L_fork)-      joined 𝜎5 := 𝛿1·1 ? 𝜎4 : 𝜎2-      𝑛·1·3 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎5:λ ) ):φ-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎3:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎5:λ ) )  # 𝑛·1·4.φ-    normalized 𝑛·0·2 := ∅:φ  # Φ.number-    𝑛·0·3 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎5:λ ) )-    𝑛·0·4 := Φ.bytes( φ ↦ 𝜎5:λ ):φ-    morphed 𝑛·0·5 := 𝑛·0·4+        morphed 𝑛·1·2 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ) ):φ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      symbolized 𝜎4 ≔ 3F-F0-00-00-00-00-00-00  # 1.0+      𝑛3·1 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ) ):φ  # symbolize(𝑛1 of L_fork)+      joined 𝜎5 ≔ 𝛿1·1 ? 𝜎4 : 𝜎2+      𝑛·1·3 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎5:λ ) ):φ+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎3:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎5:λ ) )  # 𝑛·1·4.φ+    normalized 𝑛·0·2 ≔ ∅:φ  # Φ.number+    𝑛·0·3 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎5:λ ) )+    𝑛·0·4 ≔ Φ.bytes( φ ↦ 𝜎5:λ ):φ+    morphed 𝑛·0·5 ≔ 𝑛·0·4
test-resources/evaluate-packs/joins-a-side-reading-the-rho-it-binds-in-a-fabricated-formation.yaml view
@@ -31,27 +31,27 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):         remembered 𝑛·1·1 ≡ Φ.t  # ⟦ tu ↦ ∅, φ ↦ ρ.s ⟧-        morphed 𝑛·1·2 := 𝑛·1·1+        morphed 𝑛·1·2 ≔ 𝑛·1·1       𝕄(ξ.b):-        morphed 𝑛·1·3 := 𝜎3:λ:k:φ-      fabricated 𝑛·1·4 := 𝑛·1·2 and 𝑛·1·3  # ⟦ tu ↦ ∅, left🌵 ↦ 𝑛·1·2( tu ↦ tu ), right🌵 ↦ 𝑛·1·3, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧ ⟧-      evaluated 𝑛·1·5 := 𝑛·1·4  # ⟦ c ↦ 𝜎1:λ, a ↦ Φ.t, b ↦ 𝑛·1·3, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧  # 𝑛·1·5.φ+        morphed 𝑛·1·3 ≔ 𝜎3:λ:k:φ+      fabricated 𝑛·1·4 ≔ 𝑛·1·2 and 𝑛·1·3  # ⟦ tu ↦ ∅, left🌵 ↦ 𝑛·1·2( tu ↦ tu ), right🌵 ↦ 𝑛·1·3, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧ ⟧+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ c ↦ 𝜎1:λ, a ↦ Φ.t, b ↦ 𝑛·1·3, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧  # 𝑛·1·5.φ     𝔼(L_join):-      𝑛·2·1 := Φ.t( tu ↦ ⊥ )  # 𝕄(ξ.left🌵)-      𝑛·2·2 := ⟦ tu ↦ ⊥, φ ↦ ρ.s ⟧+      𝑛·2·1 ≔ Φ.t( tu ↦ ⊥ )  # 𝕄(ξ.left🌵)+      𝑛·2·2 ≔ ⟦ tu ↦ ⊥, φ ↦ ρ.s ⟧       remembered 𝑛·2·2 ≡ 𝑛·1·2( tu ↦ ⊥ )       𝕄(ξ.left🌵):-        normalized 𝑛·2·3 := 𝜎2:λ:k  # Φ.s-        morphed 𝑛·2·4 := 𝑛·2·3+        normalized 𝑛·2·3 ≔ 𝜎2:λ:k  # Φ.s+        morphed 𝑛·2·4 ≔ 𝑛·2·3       𝕄(ξ.right🌵):-        morphed 𝑛·2·5 := 𝜎3:λ:k-      joined 𝜎4 := ξ.on🌵 ? 𝜎2 : 𝜎3-      𝑛·2·6 := 𝜎4:λ:k-      evaluated 𝑛·2·7 := 𝑛·2·6  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧-    normalized 𝑛·0·2 := 𝜎4:λ  # 𝑛·2·7.k-    morphed 𝑛·0·3 := 𝑛·0·2+        morphed 𝑛·2·5 ≔ 𝜎3:λ:k+      joined 𝜎4 ≔ ξ.on🌵 ? 𝜎2 : 𝜎3+      𝑛·2·6 ≔ 𝜎4:λ:k+      evaluated 𝑛·2·7 ≔ 𝑛·2·6  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧+    normalized 𝑛·0·2 ≔ 𝜎4:λ  # 𝑛·2·7.k+    morphed 𝑛·0·3 ≔ 𝑛·0·2
test-resources/evaluate-packs/joins-a-side-that-dispatches-on-a-terminator.yaml view
@@ -21,26 +21,26 @@       right: 𝑛2       otherwise: L_fork location: 'Q.x'-input: '⟦ throw(message) ↦ ⟦ λ ⤍ L_throw ⟧, x ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧, left🌵 ↦ ⟦ k ↦ ⟦⟧, φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, right🌵 ↦ Φ.throw( "bad" ).q ⟧.φ ⟧'+input: '⟦ throw(message) ↦ ⟦ λ ⤍ L_throw ⟧, x ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧, left🌵 ↦ ⟦ k ↦ ⟦⟧, φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, right🌵 ↦ Φ.throw( message ↦ "bad" ).q ⟧.φ ⟧' result: '𝜎4:λ' protocol: |   𝕄(Φ.x):     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎2:λ ⟧-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.left🌵)+        morphed 𝑛·1·1 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎2:λ ⟧+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):         remembered 𝑛·1·2 ≡ Φ.throw  # ⟦ message ↦ ∅, λ ⤍ L_throw ⟧-        𝑛·1·3 := Φ.throw( message ↦ "bad" )-        𝑛·1·4 := ⟦ message ↦ "bad", λ ⤍ L_throw ⟧+        𝑛·1·3 ≔ Φ.throw( message ↦ "bad" )+        𝑛·1·4 ≔ ⟦ message ↦ "bad", λ ⤍ L_throw ⟧         remembered 𝑛·1·4 ≡ 𝑛·1·2( message ↦ "bad" )-        morphed 𝑛·1·5 := 𝑛·1·4-      𝑛2·1 := 𝑛·1·4  # 𝕄(ξ.right🌵)-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥ raised by 𝑛·1·4-      𝑛·1·6 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎4:λ ⟧-      evaluated 𝑛·1·7 := 𝑛·1·6  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ Φ.throw( "bad" ).q ⟧-    normalized 𝑛·0·1 := 𝜎4:λ  # 𝑛·1·7.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·5 ≔ 𝑛·1·4+      𝑛2·1 ≔ 𝑛·1·4  # 𝕄(ξ.right🌵)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥ raised by 𝑛·1·4+      𝑛·1·6 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎4:λ ⟧+      evaluated 𝑛·1·7 ≔ 𝑛·1·6  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·3.q ⟧+    normalized 𝑛·0·1 ≔ 𝜎4:λ  # 𝑛·1·7.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-side-that-raises-through-a-terminator.yaml view
@@ -35,26 +35,26 @@       right: 𝑛10       otherwise: L_fork location: 'Q.x'-input: '⟦ throw(message) ↦ ⟦ λ ⤍ L_throw ⟧, x ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧, left🌵 ↦ ⟦ k ↦ ⟦⟧, φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, right🌵 ↦ Φ.throw( "bad" ) ⟧.φ ⟧'+input: '⟦ throw(message) ↦ ⟦ λ ⤍ L_throw ⟧, x ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧, left🌵 ↦ ⟦ k ↦ ⟦⟧, φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, right🌵 ↦ Φ.throw( message ↦ "bad" ) ⟧.φ ⟧' result: '𝜎4:λ' protocol: |   𝕄(Φ.x):     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):-        morphed 𝑛·1·1 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎2:λ ⟧-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.left🌵)+        morphed 𝑛·1·1 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎2:λ ⟧+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):         remembered 𝑛·1·2 ≡ Φ.throw  # ⟦ message ↦ ∅, λ ⤍ L_throw ⟧-        𝑛·1·3 := Φ.throw( message ↦ "bad" )-        𝑛·1·4 := ⟦ message ↦ "bad", λ ⤍ L_throw ⟧+        𝑛·1·3 ≔ Φ.throw( message ↦ "bad" )+        𝑛·1·4 ≔ ⟦ message ↦ "bad", λ ⤍ L_throw ⟧         remembered 𝑛·1·4 ≡ 𝑛·1·2( message ↦ "bad" )-        morphed 𝑛·1·5 := 𝑛·1·4-      𝑛2·1 := 𝑛·1·4  # 𝕄(ξ.right🌵)-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥ raised by 𝑛·1·4-      𝑛·1·6 := ⟦ k ↦ ⟦⟧, φ ↦ 𝜎4:λ ⟧-      evaluated 𝑛·1·7 := 𝑛·1·6  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ Φ.throw( "bad" ) ⟧-    normalized 𝑛·0·1 := 𝜎4:λ  # 𝑛·1·7.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·5 ≔ 𝑛·1·4+      𝑛2·1 ≔ 𝑛·1·4  # 𝕄(ξ.right🌵)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥ raised by 𝑛·1·4+      𝑛·1·6 ≔ ⟦ k ↦ ⟦⟧, φ ↦ 𝜎4:λ ⟧+      evaluated 𝑛·1·7 ≔ 𝑛·1·6  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·3 ⟧+    normalized 𝑛·0·1 ≔ 𝜎4:λ  # 𝑛·1·7.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-side-whose-operand-raises.yaml view
@@ -25,30 +25,30 @@       left: 𝑛1       right: 𝑛2 location: 'Q.y'-input: '⟦ wrap(x) ↦ ⟦ λ ⤍ L_wrap ⟧, y ↦ ⟦ λ ⤍ L_pick, c ↦ ⟦ λ ⤍ 𝜎1 ⟧, l ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, r ↦ Φ.wrap( ⟦ λ ⤍ L_throw ⟧ ).φ ⟧.φ ⟧'+input: '⟦ wrap(x) ↦ ⟦ λ ⤍ L_wrap ⟧, y ↦ ⟦ λ ⤍ L_pick, c ↦ ⟦ λ ⤍ 𝜎1 ⟧, l ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, r ↦ Φ.wrap( x ↦ ⟦ λ ⤍ L_throw ⟧ ).φ ⟧.φ ⟧' result: '𝜎4:λ' protocol: |   𝕄(Φ.y):     𝔼(L_pick):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.l):-        morphed 𝑛·1·1 := 𝜎2:λ:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.l)+        morphed 𝑛·1·1 ≔ 𝜎2:λ:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.l)       𝕄(ξ.r):         remembered 𝑛·1·2 ≡ Φ.wrap  # ⟦ x ↦ ∅, λ ⤍ L_wrap ⟧-        𝑛·1·3 := Φ.wrap( x ↦ L_throw:λ )-        𝑛·1·4 := ⟦ x ↦ L_throw:λ, λ ⤍ L_wrap ⟧+        𝑛·1·3 ≔ Φ.wrap( x ↦ L_throw:λ )+        𝑛·1·4 ≔ ⟦ x ↦ L_throw:λ, λ ⤍ L_wrap ⟧         remembered 𝑛·1·4 ≡ 𝑛·1·2( x ↦ L_throw:λ )         𝔼(L_wrap):-          𝑛·2·1 := ⊥-          evaluated 𝑛·2·2 := ⊥  # 𝑛·1·4-        normalized 𝑛·1·5 := ⊥  # ⊥.φ-        morphed 𝑛·1·6 := ⊥-      𝑛2·1 := ⊥  # 𝕄(ξ.r)-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥-      𝑛·1·7 := 𝜎4:λ:φ-      evaluated 𝑛·1·8 := 𝑛·1·7  # ⟦ λ ⤍ L_pick, c ↦ 𝜎1:λ, l ↦ 𝑛·1·1, r ↦ Φ.wrap( L_throw:λ ).φ ⟧-    normalized 𝑛·0·1 := 𝜎4:λ  # 𝑛·1·8.φ-    morphed 𝑛·0·2 := 𝑛·0·1+          𝑛·2·1 ≔ ⊥+          evaluated 𝑛·2·2 ≔ ⊥  # 𝑛·1·4+        normalized 𝑛·1·5 ≔ ⊥  # ⊥.φ+        morphed 𝑛·1·6 ≔ ⊥+      𝑛2·1 ≔ ⊥  # 𝕄(ξ.r)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥+      𝑛·1·7 ≔ 𝜎4:λ:φ+      evaluated 𝑛·1·8 ≔ 𝑛·1·7  # ⟦ λ ⤍ L_pick, c ↦ 𝜎1:λ, l ↦ 𝑛·1·1, r ↦ 𝑛·1·3.φ ⟧+    normalized 𝑛·0·1 ≔ 𝜎4:λ  # 𝑛·1·8.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/joins-a-side-whose-void-the-fabricated-formation-holds.yaml view
@@ -32,24 +32,24 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ 𝜎2:λ:k, tu ↦ ∅ ⟧+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ 𝜎2:λ:k, tu ↦ ∅ ⟧       𝕄(ξ.b):-        morphed 𝑛·1·2 := 𝜎3:λ:k:φ-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ tu ↦ ∅, left🌵 ↦ 𝑛·1·1( tu ↦ tu ), right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧  # 𝑛·1·4.φ+        morphed 𝑛·1·2 ≔ 𝜎3:λ:k:φ+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ tu ↦ ∅, left🌵 ↦ 𝑛·1·1( tu ↦ tu ), right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧  # 𝑛·1·4.φ     𝔼(L_join):-      𝑛·2·1 := 𝑛·1·1( tu ↦ ⊥ )  # 𝕄(ξ.left🌵)-      𝑛·2·2 := ⟦ φ ↦ 𝜎2:λ:k, tu ↦ ⊥ ⟧+      𝑛·2·1 ≔ 𝑛·1·1( tu ↦ ⊥ )  # 𝕄(ξ.left🌵)+      𝑛·2·2 ≔ ⟦ φ ↦ 𝜎2:λ:k, tu ↦ ⊥ ⟧       𝕄(ξ.left🌵):-        morphed 𝑛·2·3 := 𝜎2:λ:k+        morphed 𝑛·2·3 ≔ 𝜎2:λ:k       𝕄(ξ.right🌵):-        morphed 𝑛·2·4 := 𝜎3:λ:k-      joined 𝜎4 := ξ.on🌵 ? 𝜎2 : 𝜎3-      𝑛·2·5 := 𝜎4:λ:k-      evaluated 𝑛·2·6 := 𝑛·2·5  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧-    normalized 𝑛·0·2 := 𝜎4:λ  # 𝑛·2·6.k-    morphed 𝑛·0·3 := 𝑛·0·2+        morphed 𝑛·2·4 ≔ 𝜎3:λ:k+      joined 𝜎4 ≔ ξ.on🌵 ? 𝜎2 : 𝜎3+      𝑛·2·5 ≔ 𝜎4:λ:k+      evaluated 𝑛·2·6 ≔ 𝑛·2·5  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧+    normalized 𝑛·0·2 ≔ 𝜎4:λ  # 𝑛·2·6.k+    morphed 𝑛·0·3 ≔ 𝑛·0·2
test-resources/evaluate-packs/joins-again-the-attribute-of-a-fabricated-formation.yaml view
@@ -25,35 +25,35 @@       right: $.right🌵       otherwise: L_join location: 'Q.y'-input: '⟦ hx(ke) ↦ ⟦ φ ↦ ke ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ Φ.hx( ⟦ λ ⤍ 𝜎2 ⟧ ), ob ↦ Φ.hx ⟧, b ↦ ⟦ φ ↦ Φ.hx( ⟦ λ ⤍ 𝜎3 ⟧ ) ⟧, λ ⤍ L_fork ⟧.φ.φ ⟧'+input: '⟦ hx(ke) ↦ ⟦ φ ↦ ke ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ Φ.hx( ke ↦ ⟦ λ ⤍ 𝜎2 ⟧ ), ob ↦ Φ.hx ⟧, b ↦ ⟦ φ ↦ Φ.hx( ke ↦ ⟦ λ ⤍ 𝜎3 ⟧ ) ⟧, λ ⤍ L_fork ⟧.φ.φ ⟧' result: '𝜎4:λ' protocol: |   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ Φ.hx( 𝜎2:λ ), ob ↦ Φ.hx ⟧+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ Φ.hx( ke ↦ 𝜎2:λ ), ob ↦ Φ.hx ⟧       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.hx( 𝜎3:λ ):φ-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ob ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ob, right🌵 ↦ ρ.right🌵.ob ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧  # 𝑛·1·4.φ+        morphed 𝑛·1·2 ≔ Φ.hx( ke ↦ 𝜎3:λ ):φ+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ob ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ob, right🌵 ↦ ρ.right🌵.ob ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧  # 𝑛·1·4.φ     𝔼(L_join):       𝕄(ξ.left🌵):         remembered 𝑛·2·1 ≡ Φ.hx  # ⟦ ke ↦ ∅, φ ↦ ke ⟧-        𝑛·2·2 := Φ.hx( ke ↦ 𝜎2:λ )-        𝑛·2·3 := ⟦ ke ↦ 𝜎2:λ, φ ↦ ke ⟧+        𝑛·2·2 ≔ Φ.hx( ke ↦ 𝜎2:λ )+        𝑛·2·3 ≔ ⟦ ke ↦ 𝜎2:λ, φ ↦ ke ⟧         remembered 𝑛·2·3 ≡ 𝑛·2·1( ke ↦ 𝜎2:λ )-        morphed 𝑛·2·4 := 𝑛·2·3+        morphed 𝑛·2·4 ≔ 𝑛·2·3       𝕄(ξ.right🌵):-        𝑛·2·5 := Φ.hx( ke ↦ 𝜎3:λ )-        𝑛·2·6 := ⟦ ke ↦ 𝜎3:λ, φ ↦ ke ⟧+        𝑛·2·5 ≔ Φ.hx( ke ↦ 𝜎3:λ )+        𝑛·2·6 ≔ ⟦ ke ↦ 𝜎3:λ, φ ↦ ke ⟧         remembered 𝑛·2·6 ≡ 𝑛·2·1( ke ↦ 𝜎3:λ )-        morphed 𝑛·2·7 := 𝑛·2·6-      joined 𝜎4 := ξ.on🌵 ? 𝜎2 : 𝜎3-      𝑛·2·8 := ⟦ ke ↦ 𝜎4:λ, φ ↦ ke ⟧-      evaluated 𝑛·2·9 := 𝑛·2·8  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧-    normalized 𝑛·0·2 := 𝜎4:λ  # 𝑛·2·9.φ-    morphed 𝑛·0·3 := 𝑛·0·2+        morphed 𝑛·2·7 ≔ 𝑛·2·6+      joined 𝜎4 ≔ ξ.on🌵 ? 𝜎2 : 𝜎3+      𝑛·2·8 ≔ ⟦ ke ↦ 𝜎4:λ, φ ↦ ke ⟧+      evaluated 𝑛·2·9 ≔ 𝑛·2·8  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧+    normalized 𝑛·0·2 ≔ 𝜎4:λ  # 𝑛·2·9.φ+    morphed 𝑛·0·3 ≔ 𝑛·0·2
test-resources/evaluate-packs/joins-an-attribute-named-left-of-a-copy-in-a-fabricated-formation.yaml view
@@ -32,22 +32,22 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ Φ.hx, ke ↦ 𝜎2:λ:left ⟧+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ Φ.hx, ke ↦ 𝜎2:λ:left ⟧       𝕄(ξ.b):-        morphed 𝑛·1·2 := 𝜎3:λ:left:ke-      fabricated 𝑛·1·3 := 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧  # 𝑛·1·4.ke+        morphed 𝑛·1·2 ≔ 𝜎3:λ:left:ke+      fabricated 𝑛·1·3 ≔ 𝑛·1·1 and 𝑛·1·2  # ⟦ left🌵 ↦ 𝑛·1·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, ke ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧  # 𝑛·1·4.ke     𝔼(L_join):       𝕄(ξ.left🌵):-        morphed 𝑛·2·1 := 𝜎2:λ:left+        morphed 𝑛·2·1 ≔ 𝜎2:λ:left       𝕄(ξ.right🌵):-        morphed 𝑛·2·2 := 𝜎3:λ:left-      joined 𝜎4 := ξ.on🌵 ? 𝜎2 : 𝜎3-      𝑛·2·3 := 𝜎4:λ:left-      evaluated 𝑛·2·4 := 𝑛·2·3  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧-    normalized 𝑛·0·2 := 𝜎4:λ  # 𝑛·2·4.left-    morphed 𝑛·0·3 := 𝑛·0·2+        morphed 𝑛·2·2 ≔ 𝜎3:λ:left+      joined 𝜎4 ≔ ξ.on🌵 ? 𝜎2 : 𝜎3+      𝑛·2·3 ≔ 𝜎4:λ:left+      evaluated 𝑛·2·4 ≔ 𝑛·2·3  # ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.ke, right🌵 ↦ ρ.right🌵.ke ⟧+    normalized 𝑛·0·2 ≔ 𝜎4:λ  # 𝑛·2·4.left+    morphed 𝑛·0·3 ≔ 𝑛·0·2
test-resources/evaluate-packs/joins-two-numbers-into-one-symbol-keeping-the-constant-a-method-holds.yaml view
@@ -31,26 +31,26 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎3:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎3:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        normalized 𝑛·1·1 := ⟦ φ ↦ ∅, neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧  # Φ.number-        𝑛·1·2 := 42.0-        𝑛·1·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-45-00-00-00-00-00-00:Δ ), neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·4  # 𝕄(ξ.a)+        normalized 𝑛·1·1 ≔ ⟦ φ ↦ ∅, neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧  # Φ.number+        𝑛·1·2 ≔ 42.0+        𝑛·1·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-45-00-00-00-00-00-00:Δ ), neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·4  # 𝕄(ξ.a)       𝕄(ξ.b):-        𝑛·1·5 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ) )-        𝑛·1·6 := ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ), neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧-        morphed 𝑛·1·7 := 𝑛·1·6-      𝑛2·1 := 𝑛·1·7  # 𝕄(ξ.b)-      symbolized 𝜎4 := 40-45-00-00-00-00-00-00  # 42.0-      𝑛3·1 := ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ), neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧  # symbolize(𝑛1 of L_fork)-      joined 𝜎5 := 𝛿1·1 ? 𝜎4 : 𝜎2-      𝑛·1·8 := ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎5:λ ), neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧-      evaluated 𝑛·1·9 := 𝑛·1·8  # ⟦ c ↦ 𝜎3:λ, a ↦ 𝑛·1·2, b ↦ 𝑛·1·5, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := Φ.bytes( φ ↦ 𝜎5:λ )  # 𝑛·1·9.φ-    normalized 𝑛·0·2 := ∅:φ  # Φ.bytes-    𝑛·0·3 := Φ.bytes( φ ↦ 𝜎5:λ )-    𝑛·0·4 := 𝜎5:λ:φ-    morphed 𝑛·0·5 := 𝑛·0·4+        𝑛·1·5 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ) )+        𝑛·1·6 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ), neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧+        morphed 𝑛·1·7 ≔ 𝑛·1·6+      𝑛2·1 ≔ 𝑛·1·7  # 𝕄(ξ.b)+      symbolized 𝜎4 ≔ 40-45-00-00-00-00-00-00  # 42.0+      𝑛3·1 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ), neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧  # symbolize(𝑛1 of L_fork)+      joined 𝜎5 ≔ 𝛿1·1 ? 𝜎4 : 𝜎2+      𝑛·1·8 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 𝜎5:λ ), neg ↦ ρ.times( x ↦ -1.0 ):φ ⟧+      evaluated 𝑛·1·9 ≔ 𝑛·1·8  # ⟦ c ↦ 𝜎3:λ, a ↦ 𝑛·1·2, b ↦ 𝑛·1·5, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ Φ.bytes( φ ↦ 𝜎5:λ )  # 𝑛·1·9.φ+    normalized 𝑛·0·2 ≔ ∅:φ  # Φ.bytes+    𝑛·0·3 ≔ Φ.bytes( φ ↦ 𝜎5:λ )+    𝑛·0·4 ≔ 𝜎5:λ:φ+    morphed 𝑛·0·5 ≔ 𝑛·0·4
test-resources/evaluate-packs/joins-two-sides-a-stay-brought-to-one-shape.yaml view
@@ -36,21 +36,21 @@     remembered 𝑛·0·1 ≡ Φ.f  # ⟦ c ↦ 𝜎3:λ, a ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎1:λ, ρ ↦ ⟦ ρ ↦ Φ.bytes( φ ↦ 𝜎1:λ ), x ↦ ∅ ⟧ ) ):φ, b ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ) ):φ, λ ⤍ L_fork ⟧     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎3:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎3:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎1:λ, ρ ↦ ⟦ ρ ↦ Φ.bytes( φ ↦ 𝜎1:λ ), x ↦ ∅ ⟧ ) ):φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎1:λ, ρ ↦ ⟦ ρ ↦ Φ.bytes( φ ↦ 𝜎1:λ ), x ↦ ∅ ⟧ ) ):φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ) ):φ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      𝑛3·1 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ):φ  # stay(𝑛1 of L_fork)-      joined 𝜎4 := 𝛿1·1 ? 𝜎1 : 𝜎2-      𝑛·1·3 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ) ):φ+        morphed 𝑛·1·2 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎2:λ ) ):φ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      𝑛3·1 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ):φ  # stay(𝑛1 of L_fork)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎1 : 𝜎2+      𝑛·1·3 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ) ):φ       remembered 𝑛·1·3 ≡ 𝑛·0·1-      evaluated 𝑛·1·4 := 𝑛·1·3  # 𝑛·0·1-    normalized 𝑛·0·2 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ), ρ ↦ Φ.number( φ ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ) ) ) )  # 𝑛·1·4.φ-    normalized 𝑛·0·3 := ∅:φ  # Φ.number-    𝑛·0·4 := Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ) )-    𝑛·0·5 := Φ.bytes( φ ↦ 𝜎4:λ ):φ-    morphed 𝑛·0·6 := 𝑛·0·5+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # 𝑛·0·1+    normalized 𝑛·0·2 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ), ρ ↦ Φ.number( φ ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ) ) ) )  # 𝑛·1·4.φ+    normalized 𝑛·0·3 ≔ ∅:φ  # Φ.number+    𝑛·0·4 ≔ Φ.number( φ ↦ Φ.bytes( φ ↦ 𝜎4:λ ) )+    𝑛·0·5 ≔ Φ.bytes( φ ↦ 𝜎4:λ ):φ+    morphed 𝑛·0·6 ≔ 𝑛·0·5
test-resources/evaluate-packs/joins-two-sides-differing-in-a-datum-a-symbolize-found-off-the-phi-chain.yaml view
@@ -32,22 +32,22 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := Φ.bool( if ↦ FF-:Δ:φ ):φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ Φ.bool( if ↦ FF-:Δ:φ ):φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.bool( if ↦ 𝜎2:λ:φ ):φ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      symbolized 𝜎3 := FF--      𝑛3·1 := Φ.bool( if ↦ 𝜎3:λ:φ ):φ  # symbolize(𝑛1 of L_fork)-      joined 𝜎4 := 𝛿1·1 ? 𝜎3 : 𝜎2-      𝑛·1·3 := Φ.bool( if ↦ 𝜎4:λ:φ ):φ-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := Φ.bool( if ↦ 𝜎4:λ:φ, ρ ↦ 𝑛·1·4 )  # 𝑛·1·4.φ+        morphed 𝑛·1·2 ≔ Φ.bool( if ↦ 𝜎2:λ:φ ):φ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      symbolized 𝜎3 ≔ FF-+      𝑛3·1 ≔ Φ.bool( if ↦ 𝜎3:λ:φ ):φ  # symbolize(𝑛1 of L_fork)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎3 : 𝜎2+      𝑛·1·3 ≔ Φ.bool( if ↦ 𝜎4:λ:φ ):φ+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ Φ.bool( if ↦ 𝜎4:λ:φ, ρ ↦ 𝑛·1·4 )  # 𝑛·1·4.φ     remembered 𝑛·0·2 ≡ Φ.bool  # ⟦ if ↦ ∅, φ ↦ if ⟧-    𝑛·0·3 := Φ.bool( if ↦ 𝜎4:λ:φ )-    𝑛·0·4 := ⟦ if ↦ 𝜎4:λ:φ, φ ↦ if ⟧+    𝑛·0·3 ≔ Φ.bool( if ↦ 𝜎4:λ:φ )+    𝑛·0·4 ≔ ⟦ if ↦ 𝜎4:λ:φ, φ ↦ if ⟧     remembered 𝑛·0·4 ≡ 𝑛·0·2( if ↦ 𝜎4:λ:φ )-    morphed 𝑛·0·5 := 𝑛·0·4+    morphed 𝑛·0·5 ≔ 𝑛·0·4
test-resources/evaluate-packs/joins-two-sides-that-differ-only-in-symbols.yaml view
@@ -33,203 +33,203 @@     number(φ) ↦ ⟦       gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧,       plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.gt( 0 ).if( 1.plus( 2 ).plus( 0 ), 3.plus( 4 ).plus( 0 ) ).φ ⟧+    φ ↦ 5.gt( x ↦ 0 ).if( then ↦ 1.plus( x ↦ 2 ).plus( x ↦ 0 ), else ↦ 3.plus( x ↦ 4 ).plus( x ↦ 0 ) ).φ ⟧ result: '𝜎5:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·3.gt-    𝑛·0·5 := 𝑛·0·2.gt( x ↦ 0.0 )-    𝑛·0·6 := ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·3.gt+    𝑛·0·5 ≔ 𝑛·0·2.gt( x ↦ 0.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧     𝔼(L_number_gt):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 0.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 0.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 00-00-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 00-00-00-00-00-00-00-00  # 0.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 00-00-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 00-00-00-00-00-00-00-00  # 0.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt       𝕄(𝑛·1·22):-        normalized 𝑛·1·23 := ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool-        𝑛·1·24 := Φ.bool( φ ↦ 𝜎1:λ )-        𝑛·1·25 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-        morphed 𝑛·1·26 := 𝑛·1·25-      𝑛·1·27 := 𝑛·1·26  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·28 := 𝑛·1·27  # 𝑛·0·6-    normalized 𝑛·0·7 := ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if-    shared 𝑛·1 := 1.0.plus( 2.0 ).plus( 𝑛·1·12 )-    𝑛·0·8 := 𝑛·1·24.if( then ↦ 𝑛·1 )-    𝑛·0·9 := ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧-    shared 𝑛·2 := 3.0.plus( 4.0 ).plus( 𝑛·1·12 )-    𝑛·0·10 := 𝑛·0·9( else ↦ 𝑛·2 )-    𝑛·0·11 := ⟦ then ↦ 𝑛·1, else ↦ 𝑛·2, λ ⤍ L_fork ⟧+        normalized 𝑛·1·23 ≔ ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool+        𝑛·1·24 ≔ Φ.bool( φ ↦ 𝜎1:λ )+        𝑛·1·25 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+        morphed 𝑛·1·26 ≔ 𝑛·1·25+      𝑛·1·27 ≔ 𝑛·1·26  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·28 ≔ 𝑛·1·27  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if+    shared 𝑛·1 ≔ 1.0.plus( x ↦ 2.0 ).plus( x ↦ 𝑛·1·12 )+    𝑛·0·8 ≔ 𝑛·1·24.if( then ↦ 𝑛·1 )+    𝑛·0·9 ≔ ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧+    shared 𝑛·2 ≔ 3.0.plus( x ↦ 4.0 ).plus( x ↦ 𝑛·1·12 )+    𝑛·0·10 ≔ 𝑛·0·9( else ↦ 𝑛·2 )+    𝑛·0·11 ≔ ⟦ then ↦ 𝑛·1, else ↦ 𝑛·2, λ ⤍ L_fork ⟧     𝔼(L_fork):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·2·1 := Φ.bool( φ ↦ 𝜎1:λ )-          𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-          morphed 𝑛·2·3 := 𝑛·1·27-        boxed 𝑛·2·4 := 𝑛·2·3.φ-        normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4-        𝛿·2·1 := 𝔻(𝜎1:λ)-      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+          𝑛·2·1 ≔ Φ.bool( φ ↦ 𝜎1:λ )+          𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+          morphed 𝑛·2·3 ≔ 𝑛·1·27+        boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+        normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4+        𝛿·2·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)       𝕄(ξ.then):-        𝑛·2·6 := 1.0-        𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·8 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus-        𝑛·2·9 := 𝑛·2·6.plus( x ↦ 2.0 )-        𝑛·2·10 := ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧+        𝑛·2·6 ≔ 1.0+        𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·8 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus+        𝑛·2·9 ≔ 𝑛·2·6.plus( x ↦ 2.0 )+        𝑛·2·10 ≔ ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧         𝔼(L_number_plus):           𝔻(ξ.ρ):             𝕄(ξ.ρ):-              𝑛·3·1 := 1.0-              𝑛·3·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·3·3 := 𝑛·3·2-            boxed 𝑛·3·4 := 𝑛·3·3.φ-            normalized 𝑛·3·5 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·3·4+              𝑛·3·1 ≔ 1.0+              𝑛·3·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·3·3 ≔ 𝑛·3·2+            boxed 𝑛·3·4 ≔ 𝑛·3·3.φ+            normalized 𝑛·3·5 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·3·4             𝕄(𝑛·3·4):-              𝑛·3·6 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )-              𝑛·3·7 := 3F-F0-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·3·8 := 𝑛·3·7-            boxed 𝑛·3·9 := 𝑛·3·8.φ-            normalized 𝑛·3·10 := 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·3·9-            𝛿·3·1 := 3F-F0-00-00-00-00-00-00  # 1.0-          𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.ρ)+              𝑛·3·6 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )+              𝑛·3·7 ≔ 3F-F0-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·3·8 ≔ 𝑛·3·7+            boxed 𝑛·3·9 ≔ 𝑛·3·8.φ+            normalized 𝑛·3·10 ≔ 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·3·9+            𝛿·3·1 ≔ 3F-F0-00-00-00-00-00-00  # 1.0+          𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.ρ)           𝔻(ξ.x):             𝕄(ξ.x):-              𝑛·3·11 := 2.0-              𝑛·3·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·3·13 := 𝑛·3·12-            boxed 𝑛·3·14 := 𝑛·3·13.φ-            normalized 𝑛·3·15 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·3·14+              𝑛·3·11 ≔ 2.0+              𝑛·3·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·3·13 ≔ 𝑛·3·12+            boxed 𝑛·3·14 ≔ 𝑛·3·13.φ+            normalized 𝑛·3·15 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·3·14             𝕄(𝑛·3·14):-              𝑛·3·16 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )-              𝑛·3·17 := 40-00-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·3·18 := 𝑛·3·17-            boxed 𝑛·3·19 := 𝑛·3·18.φ-            normalized 𝑛·3·20 := 40-00-00-00-00-00-00-00:Δ  # 𝑛·3·19-            𝛿·3·2 := 40-00-00-00-00-00-00-00  # 2.0-          𝛿2·3 := 𝛿·3·2  # 𝔻(ξ.x)-          𝑛·3·21 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus+              𝑛·3·16 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )+              𝑛·3·17 ≔ 40-00-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·3·18 ≔ 𝑛·3·17+            boxed 𝑛·3·19 ≔ 𝑛·3·18.φ+            normalized 𝑛·3·20 ≔ 40-00-00-00-00-00-00-00:Δ  # 𝑛·3·19+            𝛿·3·2 ≔ 40-00-00-00-00-00-00-00  # 2.0+          𝛿2·3 ≔ 𝛿·3·2  # 𝔻(ξ.x)+          𝑛·3·21 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus           𝕄(𝑛·3·21):-            𝑛·3·22 := Φ.number( φ ↦ 𝜎2:λ )-            𝑛·3·23 := ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-            morphed 𝑛·3·24 := 𝑛·3·23-          𝑛·3·25 := 𝑛·3·24  # 𝕄(𝑛·3·21)-          evaluated 𝑛·3·26 := 𝑛·3·25  # 𝑛·2·10-        normalized 𝑛·2·11 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·3·26.plus-        𝑛·2·12 := 𝑛·3·22.plus( x ↦ 𝑛·1·12 )-        𝑛·2·13 := ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·14 := 𝑛·2·13+            𝑛·3·22 ≔ Φ.number( φ ↦ 𝜎2:λ )+            𝑛·3·23 ≔ ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+            morphed 𝑛·3·24 ≔ 𝑛·3·23+          𝑛·3·25 ≔ 𝑛·3·24  # 𝕄(𝑛·3·21)+          evaluated 𝑛·3·26 ≔ 𝑛·3·25  # 𝑛·2·10+        normalized 𝑛·2·11 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·3·26.plus+        𝑛·2·12 ≔ 𝑛·3·22.plus( x ↦ 𝑛·1·12 )+        𝑛·2·13 ≔ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·14 ≔ 𝑛·2·13       𝕄(ξ.else):-        𝑛·2·15 := 3.0-        𝑛·2·16 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·17 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·16.plus-        𝑛·2·18 := 𝑛·2·15.plus( x ↦ 4.0 )-        𝑛·2·19 := ⟦ x ↦ 4.0, λ ⤍ L_number_plus ⟧+        𝑛·2·15 ≔ 3.0+        𝑛·2·16 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·17 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·16.plus+        𝑛·2·18 ≔ 𝑛·2·15.plus( x ↦ 4.0 )+        𝑛·2·19 ≔ ⟦ x ↦ 4.0, λ ⤍ L_number_plus ⟧         𝔼(L_number_plus):           𝔻(ξ.ρ):             𝕄(ξ.ρ):-              𝑛·4·1 := 3.0-              𝑛·4·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·4·3 := 𝑛·4·2-            boxed 𝑛·4·4 := 𝑛·4·3.φ-            normalized 𝑛·4·5 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )  # 𝑛·4·4+              𝑛·4·1 ≔ 3.0+              𝑛·4·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·4·3 ≔ 𝑛·4·2+            boxed 𝑛·4·4 ≔ 𝑛·4·3.φ+            normalized 𝑛·4·5 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )  # 𝑛·4·4             𝕄(𝑛·4·4):-              𝑛·4·6 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )-              𝑛·4·7 := 40-08-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·4·8 := 𝑛·4·7-            boxed 𝑛·4·9 := 𝑛·4·8.φ-            normalized 𝑛·4·10 := 40-08-00-00-00-00-00-00:Δ  # 𝑛·4·9-            𝛿·4·1 := 40-08-00-00-00-00-00-00  # 3.0-          𝛿1·4 := 𝛿·4·1  # 𝔻(ξ.ρ)+              𝑛·4·6 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )+              𝑛·4·7 ≔ 40-08-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·4·8 ≔ 𝑛·4·7+            boxed 𝑛·4·9 ≔ 𝑛·4·8.φ+            normalized 𝑛·4·10 ≔ 40-08-00-00-00-00-00-00:Δ  # 𝑛·4·9+            𝛿·4·1 ≔ 40-08-00-00-00-00-00-00  # 3.0+          𝛿1·4 ≔ 𝛿·4·1  # 𝔻(ξ.ρ)           𝔻(ξ.x):             𝕄(ξ.x):-              𝑛·4·11 := 4.0-              𝑛·4·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·4·13 := 𝑛·4·12-            boxed 𝑛·4·14 := 𝑛·4·13.φ-            normalized 𝑛·4·15 := Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )  # 𝑛·4·14+              𝑛·4·11 ≔ 4.0+              𝑛·4·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·4·13 ≔ 𝑛·4·12+            boxed 𝑛·4·14 ≔ 𝑛·4·13.φ+            normalized 𝑛·4·15 ≔ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )  # 𝑛·4·14             𝕄(𝑛·4·14):-              𝑛·4·16 := Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )-              𝑛·4·17 := 40-10-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·4·18 := 𝑛·4·17-            boxed 𝑛·4·19 := 𝑛·4·18.φ-            normalized 𝑛·4·20 := 40-10-00-00-00-00-00-00:Δ  # 𝑛·4·19-            𝛿·4·2 := 40-10-00-00-00-00-00-00  # 4.0-          𝛿2·4 := 𝛿·4·2  # 𝔻(ξ.x)-          𝑛·4·21 := Φ.number( φ ↦ 𝜎3:λ )  # 𝑛 of L_number_plus+              𝑛·4·16 ≔ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )+              𝑛·4·17 ≔ 40-10-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·4·18 ≔ 𝑛·4·17+            boxed 𝑛·4·19 ≔ 𝑛·4·18.φ+            normalized 𝑛·4·20 ≔ 40-10-00-00-00-00-00-00:Δ  # 𝑛·4·19+            𝛿·4·2 ≔ 40-10-00-00-00-00-00-00  # 4.0+          𝛿2·4 ≔ 𝛿·4·2  # 𝔻(ξ.x)+          𝑛·4·21 ≔ Φ.number( φ ↦ 𝜎3:λ )  # 𝑛 of L_number_plus           𝕄(𝑛·4·21):-            𝑛·4·22 := Φ.number( φ ↦ 𝜎3:λ )-            𝑛·4·23 := ⟦ φ ↦ 𝜎3:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-            morphed 𝑛·4·24 := 𝑛·4·23-          𝑛·4·25 := 𝑛·4·24  # 𝕄(𝑛·4·21)-          evaluated 𝑛·4·26 := 𝑛·4·25  # 𝑛·2·19-        normalized 𝑛·2·20 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·4·26.plus-        𝑛·2·21 := 𝑛·4·22.plus( x ↦ 𝑛·1·12 )-        𝑛·2·22 := ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·23 := 𝑛·2·22-      joined 𝜎4 := 𝛿1·2 ? 𝜎2 : 𝜎3-      𝑛·2·24 := ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧-      evaluated 𝑛·2·25 := ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧  # 𝑛·0·11+            𝑛·4·22 ≔ Φ.number( φ ↦ 𝜎3:λ )+            𝑛·4·23 ≔ ⟦ φ ↦ 𝜎3:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+            morphed 𝑛·4·24 ≔ 𝑛·4·23+          𝑛·4·25 ≔ 𝑛·4·24  # 𝕄(𝑛·4·21)+          evaluated 𝑛·4·26 ≔ 𝑛·4·25  # 𝑛·2·19+        normalized 𝑛·2·20 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·4·26.plus+        𝑛·2·21 ≔ 𝑛·4·22.plus( x ↦ 𝑛·1·12 )+        𝑛·2·22 ≔ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·23 ≔ 𝑛·2·22+      joined 𝜎4 ≔ 𝛿1·2 ? 𝜎2 : 𝜎3+      𝑛·2·24 ≔ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧+      evaluated 𝑛·2·25 ≔ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧  # 𝑛·0·11     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·5·1 := Φ.number( φ ↦ 𝜎4:λ )-          𝑛·5·2 := ⟦ φ ↦ 𝜎4:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·5·3 := 𝑛·5·2-        boxed 𝑛·5·4 := 𝑛·5·3.φ-        normalized 𝑛·5·5 := 𝜎4:λ  # 𝑛·5·4-        𝛿·5·1 := 𝔻(𝜎4:λ)-      𝛿1·5 := 𝛿·5·1  # 𝔻(ξ.ρ)+          𝑛·5·1 ≔ Φ.number( φ ↦ 𝜎4:λ )+          𝑛·5·2 ≔ ⟦ φ ↦ 𝜎4:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·5·3 ≔ 𝑛·5·2+        boxed 𝑛·5·4 ≔ 𝑛·5·3.φ+        normalized 𝑛·5·5 ≔ 𝜎4:λ  # 𝑛·5·4+        𝛿·5·1 ≔ 𝔻(𝜎4:λ)+      𝛿1·5 ≔ 𝛿·5·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·5·6 := Φ.number( φ ↦ 𝑛·1·17 )-          𝑛·5·7 := ⟦ φ ↦ 𝑛·1·17, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·5·8 := 𝑛·5·7-        boxed 𝑛·5·9 := 𝑛·5·8.φ-        normalized 𝑛·5·10 := 𝑛·1·17  # 𝑛·5·9+          𝑛·5·6 ≔ Φ.number( φ ↦ 𝑛·1·17 )+          𝑛·5·7 ≔ ⟦ φ ↦ 𝑛·1·17, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·5·8 ≔ 𝑛·5·7+        boxed 𝑛·5·9 ≔ 𝑛·5·8.φ+        normalized 𝑛·5·10 ≔ 𝑛·1·17  # 𝑛·5·9         𝕄(𝑛·5·9):-          𝑛·5·11 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )-          𝑛·5·12 := 00-00-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·5·13 := 𝑛·5·12-        boxed 𝑛·5·14 := 𝑛·5·13.φ-        normalized 𝑛·5·15 := 00-00-00-00-00-00-00-00:Δ  # 𝑛·5·14-        𝛿·5·2 := 00-00-00-00-00-00-00-00  # 0.0-      𝛿2·5 := 𝛿·5·2  # 𝔻(ξ.x)-      𝑛·5·16 := Φ.number( φ ↦ 𝜎5:λ )  # 𝑛 of L_number_plus+          𝑛·5·11 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )+          𝑛·5·12 ≔ 00-00-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·5·13 ≔ 𝑛·5·12+        boxed 𝑛·5·14 ≔ 𝑛·5·13.φ+        normalized 𝑛·5·15 ≔ 00-00-00-00-00-00-00-00:Δ  # 𝑛·5·14+        𝛿·5·2 ≔ 00-00-00-00-00-00-00-00  # 0.0+      𝛿2·5 ≔ 𝛿·5·2  # 𝔻(ξ.x)+      𝑛·5·16 ≔ Φ.number( φ ↦ 𝜎5:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·5·16):-        𝑛·5·17 := Φ.number( φ ↦ 𝜎5:λ )-        𝑛·5·18 := ⟦ φ ↦ 𝜎5:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·5·19 := 𝑛·5·18-      𝑛·5·20 := 𝑛·5·19  # 𝕄(𝑛·5·16)-      evaluated 𝑛·5·21 := 𝑛·5·20  # ⟦ x ↦ 𝑛·5·6, λ ⤍ L_number_plus ⟧-    normalized 𝑛·0·12 := 𝜎5:λ  # 𝑛·5·21.φ-    morphed 𝑛·0·13 := 𝑛·0·12+        𝑛·5·17 ≔ Φ.number( φ ↦ 𝜎5:λ )+        𝑛·5·18 ≔ ⟦ φ ↦ 𝜎5:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·5·19 ≔ 𝑛·5·18+      𝑛·5·20 ≔ 𝑛·5·19  # 𝕄(𝑛·5·16)+      evaluated 𝑛·5·21 ≔ 𝑛·5·20  # ⟦ x ↦ 𝑛·5·6, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·12 ≔ 𝜎5:λ  # 𝑛·5·21.φ+    morphed 𝑛·0·13 ≔ 𝑛·0·12
+ test-resources/evaluate-packs/joins-two-sides-that-dispatch-off-a-symbol.yaml view
@@ -0,0 +1,41 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# Both sides dispatch off a bare symbol, so both are 'opaque' and each gives a+# new symbol of its own (#2479). The two sides differ only in their symbols, so+# they join into a fresh one.+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.on🌵+    morph:+      𝑛1: $.left🌵+      𝑛2: $.right🌵+    join:+      on: 𝛿1+      left: 𝑛1+      right: 𝑛2+      otherwise: L_fork+location: 'Q.e1'+input: '⟦ e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧.p, right🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧.φ ⟧'+result: '𝜎5:λ'+protocol: |+  𝕄(Φ.e1):+    𝔼(L_fork):+      𝔻(ξ.on🌵):+        𝛿·1·1 ≔ 00-+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)+      𝕄(ξ.left🌵):+        opaque 𝜎2:λ ≔ 𝜎1:λ.p+        morphed 𝑛·1·1 ≔ 𝜎2:λ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.left🌵)+      𝕄(ξ.right🌵):+        opaque 𝜎3:λ ≔ 𝜎1:λ.q+        morphed 𝑛·1·2 ≔ 𝜎3:λ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.right🌵)+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3+      𝑛·1·3 ≔ 𝜎4:λ+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ 𝜎1:λ.p, right🌵 ↦ 𝜎1:λ.q ⟧+    opaque 𝜎5:λ ≔ 𝜎4:λ.φ+    morphed 𝑛·0·1 ≔ 𝜎5:λ
+ test-resources/evaluate-packs/keeps-nested-copies-of-one-atom-whose-arguments-shrink.yaml view
@@ -0,0 +1,69 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# Copies of the atom 'd' fired inside each other, since 'L_d' dataizes its+# 't', which holds the next call. The facts lead every copy back to 'Φ.d', yet+# the argument of each copy is held inside the copy above it: the calls shrink+# and end, so under '--acyclic=plausible' none of them repeats another, even+# with '--max-loops=0' (#2466).+symbolic: |+  - λ: L_d+    dataize:+      𝛿1: $.t+    𝑛: ⟦ λ ⤍ 𝜎 ⟧+location: 'Q.e'+acyclic: plausible+loops: 0+partial: true+input: >+  ⟦ d(t) ↦ ⟦ λ ⤍ L_d ⟧,+    e ↦ Φ.d( t ↦ Φ.d( t ↦ Φ.d( t ↦ 01-:Δ ) ) ).q ⟧+protocol: |+  𝕄(Φ.e):+    remembered 𝑛·0·1 ≡ Φ.d  # ⟦ t ↦ ∅, λ ⤍ L_d ⟧+    𝑛·0·2 ≔ Φ.d( t ↦ Φ.d( t ↦ Φ.d( t ↦ 01-:Δ ) ) )+    𝑛·0·3 ≔ ⟦ t ↦ Φ.d( t ↦ Φ.d( t ↦ 01-:Δ ) ), λ ⤍ L_d ⟧+    remembered 𝑛·0·3 ≡ 𝑛·0·1( t ↦ Φ.d( t ↦ Φ.d( t ↦ 01-:Δ ) ) )+    𝔼(L_d):+      𝔻(ξ.t):+        𝕄(ξ.t):+          𝑛·1·1 ≔ Φ.d( t ↦ Φ.d( t ↦ 01-:Δ ) )+          𝑛·1·2 ≔ ⟦ t ↦ Φ.d( t ↦ 01-:Δ ), λ ⤍ L_d ⟧+          remembered 𝑛·1·2 ≡ 𝑛·0·1( t ↦ Φ.d( t ↦ 01-:Δ ) )+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        𝔼(L_d):+          𝔻(ξ.t):+            𝕄(ξ.t):+              𝑛·2·1 ≔ Φ.d( t ↦ 01-:Δ )+              𝑛·2·2 ≔ ⟦ t ↦ 01-:Δ, λ ⤍ L_d ⟧+              remembered 𝑛·2·2 ≡ 𝑛·0·1( t ↦ 01-:Δ )+              morphed 𝑛·2·3 ≔ 𝑛·2·2+            𝔼(L_d):+              𝔻(ξ.t):+                𝛿·3·1 ≔ 01-+              𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.t)+              𝑛·3·1 ≔ 𝜎1:λ  # 𝑛 of L_d+              𝕄(𝑛·3·1):+                morphed 𝑛·3·2 ≔ 𝜎1:λ+              𝑛·3·3 ≔ 𝑛·3·2  # 𝕄(𝑛·3·1)+              memoized 𝑛·2·2 ⇛ 𝜎1:λ+              evaluated 𝑛·3·4 ≔ 𝑛·3·3  # 𝑛·2·2+            𝛿·2·1 ≔ 𝔻(𝜎1:λ)+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.t)+          𝑛·2·4 ≔ 𝜎2:λ  # 𝑛 of L_d+          𝕄(𝑛·2·4):+            morphed 𝑛·2·5 ≔ 𝜎2:λ+          𝑛·2·6 ≔ 𝑛·2·5  # 𝕄(𝑛·2·4)+          memoized 𝑛·1·2 ⇛ 𝜎2:λ+          evaluated 𝑛·2·7 ≔ 𝑛·2·6  # 𝑛·1·2+        𝛿·1·1 ≔ 𝔻(𝜎2:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.t)+      𝑛·1·4 ≔ 𝜎3:λ  # 𝑛 of L_d+      𝕄(𝑛·1·4):+        morphed 𝑛·1·5 ≔ 𝜎3:λ+      𝑛·1·6 ≔ 𝑛·1·5  # 𝕄(𝑛·1·4)+      memoized 𝑛·0·3 ⇛ 𝜎3:λ+      evaluated 𝑛·1·7 ≔ 𝑛·1·6  # 𝑛·0·3+    opaque 𝜎4:λ ≔ 𝜎3:λ.q+    morphed 𝑛·0·4 ≔ 𝜎4:λ
test-resources/evaluate-packs/keeps-the-answer-a-firing-already-gave.yaml view
@@ -14,9 +14,9 @@ protocol: |   𝕄(Φ.x):     𝔼(L_answers):-      𝑛·1·1 := L_none:λ  # 𝑛 of L_answers+      𝑛·1·1 ≔ L_none:λ  # 𝑛 of L_answers       𝕄(𝑛·1·1):-        morphed 𝑛·1·2 := L_none:λ-      𝑛·1·3 := L_none:λ  # 𝕄(𝑛·1·1)-      evaluated 𝑛·1·4 := L_none:λ  # L_answers:λ+        morphed 𝑛·1·2 ≔ L_none:λ+      𝑛·1·3 ≔ L_none:λ  # 𝕄(𝑛·1·1)+      evaluated 𝑛·1·4 ≔ L_none:λ  # L_answers:λ     unanswered L_none  # 𝕄(L_none:λ.foo)
test-resources/evaluate-packs/keeps-the-rho-bindings-a-pack-asks-for.yaml view
@@ -19,11 +19,11 @@   𝕄(Φ.y):     𝔼(L_keep):       𝕄(ξ.x):-        morphed 𝑛·1·1 := ⟦ λ ⤍ 𝜎1, ρ ↦ ⟦ x(ρ) ↦ 𝜎1:λ ⟧ ⟧-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.x)-      𝑛·1·2 := ⟦ λ ⤍ 𝜎1, ρ ↦ ⟦ x(ρ) ↦ 𝜎1:λ ⟧ ⟧:z  # 𝑛 of L_keep+        morphed 𝑛·1·1 ≔ ⟦ λ ⤍ 𝜎1, ρ ↦ ⟦ x(ρ) ↦ 𝜎1:λ ⟧ ⟧+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.x)+      𝑛·1·2 ≔ ⟦ λ ⤍ 𝜎1, ρ ↦ ⟦ x(ρ) ↦ 𝜎1:λ ⟧ ⟧:z  # 𝑛 of L_keep       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := ⟦ λ ⤍ 𝜎1, ρ ↦ ⟦ x(ρ) ↦ 𝜎1:λ ⟧ ⟧:z-      𝑛·1·4 := 𝑛·1·3  # 𝕄(𝑛·1·2)-      evaluated 𝑛·1·5 := 𝑛·1·4  # ⟦ x(ρ) ↦ 𝜎1:λ, λ ⤍ L_keep ⟧-    morphed 𝑛·0·1 := 𝑛1·1+        morphed 𝑛·1·3 ≔ ⟦ λ ⤍ 𝜎1, ρ ↦ ⟦ x(ρ) ↦ 𝜎1:λ ⟧ ⟧:z+      𝑛·1·4 ≔ 𝑛·1·3  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ x(ρ) ↦ 𝜎1:λ, λ ⤍ L_keep ⟧+    morphed 𝑛·0·1 ≔ 𝑛1·1
test-resources/evaluate-packs/leaves-a-bare-symbol-an-evaluate-line-meets-as-it-is.yaml view
@@ -20,11 +20,11 @@   𝕄(Φ.y):     𝔼(L_keep):       𝕄(ξ.x):-        morphed 𝑛·1·1 := 𝜎4:λ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.x)-      𝑛·1·2 := 𝜎4:λ:φ  # 𝑛 of L_keep+        morphed 𝑛·1·1 ≔ 𝜎4:λ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.x)+      𝑛·1·2 ≔ 𝜎4:λ:φ  # 𝑛 of L_keep       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := 𝜎4:λ:φ-      𝑛·1·4 := 𝑛·1·3  # 𝕄(𝑛·1·2)-      evaluated 𝑛·1·5 := 𝑛·1·4  # ⟦ x ↦ 𝜎4:λ, λ ⤍ L_keep ⟧-    morphed 𝑛·0·1 := 𝑛1·1+        morphed 𝑛·1·3 ≔ 𝜎4:λ:φ+      𝑛·1·4 ≔ 𝑛·1·3  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ x ↦ 𝜎4:λ, λ ⤍ L_keep ⟧+    morphed 𝑛·0·1 ≔ 𝑛1·1
test-resources/evaluate-packs/leaves-a-formation-with-an-attribute-of-its-own-as-it-is.yaml view
@@ -29,36 +29,36 @@ location: 'Q.y' input: >   ⟦ box(v) ↦ ⟦ tag ↦ ξ.v, λ ⤍ L_box ⟧,-    x ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.box( 𝜎2:λ ), right🌵 ↦ Φ.box( 𝜎3:λ ) ⟧,+    x ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.box( v ↦ 𝜎2:λ ), right🌵 ↦ Φ.box( v ↦ 𝜎3:λ ) ⟧,     y ↦ Φ.x.tag ⟧ result: '𝜎4:λ' protocol: |   𝕄(Φ.y):-    remembered 𝑛·0·1 ≡ Φ.x  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.box( 𝜎2:λ ), right🌵 ↦ Φ.box( 𝜎3:λ ) ⟧+    remembered 𝑛·0·1 ≡ Φ.x  # ⟦ λ ⤍ L_fork, on🌵 ↦ 𝜎1:λ, left🌵 ↦ Φ.box( v ↦ 𝜎2:λ ), right🌵 ↦ Φ.box( v ↦ 𝜎3:λ ) ⟧     𝔼(L_fork):       𝔻(ξ.on🌵):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.on🌵)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)       𝕄(ξ.left🌵):         remembered 𝑛·1·1 ≡ Φ.box  # ⟦ v ↦ ∅, tag ↦ v, λ ⤍ L_box ⟧-        𝑛·1·2 := Φ.box( v ↦ 𝜎2:λ )-        𝑛·1·3 := ⟦ v ↦ 𝜎2:λ, tag ↦ v, λ ⤍ L_box ⟧+        𝑛·1·2 ≔ Φ.box( v ↦ 𝜎2:λ )+        𝑛·1·3 ≔ ⟦ v ↦ 𝜎2:λ, tag ↦ v, λ ⤍ L_box ⟧         remembered 𝑛·1·3 ≡ 𝑛·1·1( v ↦ 𝜎2:λ )-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·3  # 𝕄(ξ.left🌵)+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·3  # 𝕄(ξ.left🌵)       𝕄(ξ.right🌵):-        𝑛·1·5 := Φ.box( v ↦ 𝜎3:λ )-        𝑛·1·6 := ⟦ v ↦ 𝜎3:λ, tag ↦ v, λ ⤍ L_box ⟧+        𝑛·1·5 ≔ Φ.box( v ↦ 𝜎3:λ )+        𝑛·1·6 ≔ ⟦ v ↦ 𝜎3:λ, tag ↦ v, λ ⤍ L_box ⟧         remembered 𝑛·1·6 ≡ 𝑛·1·1( v ↦ 𝜎3:λ )-        morphed 𝑛·1·7 := 𝑛·1·6-      𝑛2·1 := 𝑛·1·6  # 𝕄(ξ.right🌵)+        morphed 𝑛·1·7 ≔ 𝑛·1·6+      𝑛2·1 ≔ 𝑛·1·6  # 𝕄(ξ.right🌵)       recalled 𝑛·1·3 ⇒ 𝑛·1·1( v ↦ 𝜎2:λ )       recalled 𝑛·1·1 ⇒ Φ.box       recalled 𝑛·1·6 ⇒ 𝑛·1·1( v ↦ 𝜎3:λ )       recalled 𝑛·1·1 ⇒ Φ.box-      joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3-      𝑛·1·8 := ⟦ v ↦ 𝜎4:λ, tag ↦ v, λ ⤍ L_box ⟧+      joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3+      𝑛·1·8 ≔ ⟦ v ↦ 𝜎4:λ, tag ↦ v, λ ⤍ L_box ⟧       remembered 𝑛·1·9 ≡ 𝑛·0·1  # ⟦ v ↦ 𝜎4:λ, tag ↦ v, λ ⤍ L_box ⟧-      evaluated 𝑛·1·10 := 𝑛·1·9  # 𝑛·0·1-    normalized 𝑛·0·2 := 𝜎4:λ  # 𝑛·1·9.tag-    morphed 𝑛·0·3 := 𝑛·0·2+      evaluated 𝑛·1·10 ≔ 𝑛·1·9  # 𝑛·0·1+    normalized 𝑛·0·2 ≔ 𝜎4:λ  # 𝑛·1·9.tag+    morphed 𝑛·0·3 ≔ 𝑛·0·2
test-resources/evaluate-packs/mints-a-fresh-symbol-for-every-firing.yaml view
@@ -16,89 +16,89 @@ input: >   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.plus( 6 ).plus( 7 ).φ ⟧+    φ ↦ 5.plus( x ↦ 6 ).plus( x ↦ 7 ).φ ⟧ result: '𝜎2:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ 6.0 )-    𝑛·0·6 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 6.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 6.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 6.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·22):-        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )-        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·1·25 := 𝑛·1·24-      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·6-    normalized 𝑛·0·7 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·27.plus-    𝑛·0·8 := 𝑛·1·23.plus( x ↦ 7.0 )-    𝑛·0·9 := ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧+        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )+        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·1·25 ≔ 𝑛·1·24+      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·27.plus+    𝑛·0·8 ≔ 𝑛·1·23.plus( x ↦ 7.0 )+    𝑛·0·9 ≔ ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·2·1 := Φ.number( φ ↦ 𝜎1:λ )-          𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·2·3 := 𝑛·1·26-        boxed 𝑛·2·4 := 𝑛·2·3.φ-        normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4-        𝛿·2·1 := 𝔻(𝜎1:λ)-      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+          𝑛·2·1 ≔ Φ.number( φ ↦ 𝜎1:λ )+          𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·2·3 ≔ 𝑛·1·26+        boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+        normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4+        𝛿·2·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·2·6 := 7.0-          𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·2·8 := 𝑛·2·7-        boxed 𝑛·2·9 := 𝑛·2·8.φ-        normalized 𝑛·2·10 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·9+          𝑛·2·6 ≔ 7.0+          𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·2·8 ≔ 𝑛·2·7+        boxed 𝑛·2·9 ≔ 𝑛·2·8.φ+        normalized 𝑛·2·10 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·9         𝕄(𝑛·2·9):-          𝑛·2·11 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )-          𝑛·2·12 := 40-1C-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·2·13 := 𝑛·2·12-        boxed 𝑛·2·14 := 𝑛·2·13.φ-        normalized 𝑛·2·15 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·14-        𝛿·2·2 := 40-1C-00-00-00-00-00-00  # 7.0-      𝛿2·2 := 𝛿·2·2  # 𝔻(ξ.x)-      𝑛·2·16 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus+          𝑛·2·11 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )+          𝑛·2·12 ≔ 40-1C-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·2·13 ≔ 𝑛·2·12+        boxed 𝑛·2·14 ≔ 𝑛·2·13.φ+        normalized 𝑛·2·15 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·14+        𝛿·2·2 ≔ 40-1C-00-00-00-00-00-00  # 7.0+      𝛿2·2 ≔ 𝛿·2·2  # 𝔻(ξ.x)+      𝑛·2·16 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·2·16):-        𝑛·2·17 := Φ.number( φ ↦ 𝜎2:λ )-        𝑛·2·18 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·2·19 := 𝑛·2·18-      𝑛·2·20 := 𝑛·2·19  # 𝕄(𝑛·2·16)-      evaluated 𝑛·2·21 := 𝑛·2·20  # 𝑛·0·9-    normalized 𝑛·0·10 := 𝜎2:λ  # 𝑛·2·21.φ-    morphed 𝑛·0·11 := 𝑛·0·10+        𝑛·2·17 ≔ Φ.number( φ ↦ 𝜎2:λ )+        𝑛·2·18 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·2·19 ≔ 𝑛·2·18+      𝑛·2·20 ≔ 𝑛·2·19  # 𝕄(𝑛·2·16)+      evaluated 𝑛·2·21 ≔ 𝑛·2·20  # 𝑛·0·9+    normalized 𝑛·0·10 ≔ 𝜎2:λ  # 𝑛·2·21.φ+    morphed 𝑛·0·11 ≔ 𝑛·0·10
test-resources/evaluate-packs/morphs-a-program-that-already-carries-a-symbol.yaml view
@@ -16,48 +16,48 @@ input: >   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ Φ.number( φ ↦ ⟦ λ ⤍ 𝜎1 ⟧ ).plus( 7 ).φ ⟧+    φ ↦ Φ.number( φ ↦ ⟦ λ ⤍ 𝜎1 ⟧ ).plus( x ↦ 7 ).φ ⟧ result: '𝜎2:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := Φ.number( φ ↦ 𝜎1:λ )-    𝑛·0·3 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ 7.0 )-    𝑛·0·6 := ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ Φ.number( φ ↦ 𝜎1:λ )+    𝑛·0·3 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 7.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := Φ.number( φ ↦ 𝜎1:λ )-          𝑛·1·2 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := 𝜎1:λ  # 𝑛·1·4-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          𝑛·1·1 ≔ Φ.number( φ ↦ 𝜎1:λ )+          𝑛·1·2 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ 𝜎1:λ  # 𝑛·1·4+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·6 := 7.0-          𝑛·1·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·8 := 𝑛·1·7-        boxed 𝑛·1·9 := 𝑛·1·8.φ-        normalized 𝑛·1·10 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·1·9+          𝑛·1·6 ≔ 7.0+          𝑛·1·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·8 ≔ 𝑛·1·7+        boxed 𝑛·1·9 ≔ 𝑛·1·8.φ+        normalized 𝑛·1·10 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·1·9         𝕄(𝑛·1·9):-          normalized 𝑛·1·11 := ∅:φ  # Φ.bytes-          𝑛·1·12 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )-          𝑛·1·13 := 40-1C-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·1·15-        𝛿·1·2 := 40-1C-00-00-00-00-00-00  # 7.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·17 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus+          normalized 𝑛·1·11 ≔ ∅:φ  # Φ.bytes+          𝑛·1·12 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )+          𝑛·1·13 ≔ 40-1C-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·1·15+        𝛿·1·2 ≔ 40-1C-00-00-00-00-00-00  # 7.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·17 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·17):-        𝑛·1·18 := Φ.number( φ ↦ 𝜎2:λ )-        𝑛·1·19 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·1·20 := 𝑛·1·19-      𝑛·1·21 := 𝑛·1·20  # 𝕄(𝑛·1·17)-      evaluated 𝑛·1·22 := 𝑛·1·21  # 𝑛·0·6-    normalized 𝑛·0·7 := 𝜎2:λ  # 𝑛·1·22.φ-    morphed 𝑛·0·8 := 𝑛·0·7+        𝑛·1·18 ≔ Φ.number( φ ↦ 𝜎2:λ )+        𝑛·1·19 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·1·20 ≔ 𝑛·1·19+      𝑛·1·21 ≔ 𝑛·1·20  # 𝕄(𝑛·1·17)+      evaluated 𝑛·1·22 ≔ 𝑛·1·21  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ 𝜎2:λ  # 𝑛·1·22.φ+    morphed 𝑛·0·8 ≔ 𝑛·0·7
test-resources/evaluate-packs/morphs-two-branches-spelling-one-term-through-one-firing.yaml view
@@ -36,179 +36,179 @@     number(φ) ↦ ⟦       gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧,       plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.gt( 0 ).if( 1.plus( 2 ).plus( 3 ), 1.plus( 2 ).plus( 3 ) ).plus( 9 ) ⟧+    φ ↦ 5.gt( x ↦ 0 ).if( then ↦ 1.plus( x ↦ 2 ).plus( x ↦ 3 ), else ↦ 1.plus( x ↦ 2 ).plus( x ↦ 3 ) ).plus( x ↦ 9 ) ⟧ result: '⟦ x ↦ 9, λ ⤍ L_number_plus ⟧' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·3.gt-    𝑛·0·5 := 𝑛·0·2.gt( x ↦ 0.0 )-    𝑛·0·6 := ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·3.gt+    𝑛·0·5 ≔ 𝑛·0·2.gt( x ↦ 0.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧     𝔼(L_number_gt):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 0.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 0.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 00-00-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 00-00-00-00-00-00-00-00  # 0.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 00-00-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 00-00-00-00-00-00-00-00  # 0.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt       𝕄(𝑛·1·22):-        normalized 𝑛·1·23 := ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool-        𝑛·1·24 := Φ.bool( φ ↦ 𝜎1:λ )-        𝑛·1·25 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-        morphed 𝑛·1·26 := 𝑛·1·25-      𝑛·1·27 := 𝑛·1·26  # 𝕄(𝑛·1·22)+        normalized 𝑛·1·23 ≔ ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool+        𝑛·1·24 ≔ Φ.bool( φ ↦ 𝜎1:λ )+        𝑛·1·25 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+        morphed 𝑛·1·26 ≔ 𝑛·1·25+      𝑛·1·27 ≔ 𝑛·1·26  # 𝕄(𝑛·1·22)       memoized 𝑛·0·6 ⇛ 𝑛·1·27-      evaluated 𝑛·1·28 := 𝑛·1·27  # 𝑛·0·6-    normalized 𝑛·0·7 := ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if-    shared 𝑛·1 := 1.0.plus( 2.0 ).plus( 3.0 )-    𝑛·0·8 := 𝑛·1·24.if( then ↦ 𝑛·1 )-    𝑛·0·9 := ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧-    𝑛·0·10 := 𝑛·0·9( else ↦ 𝑛·1 )-    𝑛·0·11 := ⟦ then ↦ 𝑛·1, else ↦ 𝑛·1, λ ⤍ L_fork ⟧+      evaluated 𝑛·1·28 ≔ 𝑛·1·27  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if+    shared 𝑛·1 ≔ 1.0.plus( x ↦ 2.0 ).plus( x ↦ 3.0 )+    𝑛·0·8 ≔ 𝑛·1·24.if( then ↦ 𝑛·1 )+    𝑛·0·9 ≔ ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧+    𝑛·0·10 ≔ 𝑛·0·9( else ↦ 𝑛·1 )+    𝑛·0·11 ≔ ⟦ then ↦ 𝑛·1, else ↦ 𝑛·1, λ ⤍ L_fork ⟧     𝔼(L_fork):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·2·1 := Φ.bool( φ ↦ 𝜎1:λ )-          𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-          morphed 𝑛·2·3 := 𝑛·1·27-        boxed 𝑛·2·4 := 𝑛·2·3.φ-        normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4-        𝛿·2·1 := 𝔻(𝜎1:λ)-      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+          𝑛·2·1 ≔ Φ.bool( φ ↦ 𝜎1:λ )+          𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+          morphed 𝑛·2·3 ≔ 𝑛·1·27+        boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+        normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4+        𝛿·2·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)       𝕄(ξ.then):-        𝑛·2·6 := 1.0-        𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·8 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus-        𝑛·2·9 := 𝑛·2·6.plus( x ↦ 2.0 )-        𝑛·2·10 := ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧+        𝑛·2·6 ≔ 1.0+        𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·8 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus+        𝑛·2·9 ≔ 𝑛·2·6.plus( x ↦ 2.0 )+        𝑛·2·10 ≔ ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧         𝔼(L_number_plus):           𝔻(ξ.ρ):             𝕄(ξ.ρ):-              𝑛·3·1 := 1.0-              𝑛·3·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·3·3 := 𝑛·3·2-            boxed 𝑛·3·4 := 𝑛·3·3.φ-            normalized 𝑛·3·5 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·3·4+              𝑛·3·1 ≔ 1.0+              𝑛·3·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·3·3 ≔ 𝑛·3·2+            boxed 𝑛·3·4 ≔ 𝑛·3·3.φ+            normalized 𝑛·3·5 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·3·4             𝕄(𝑛·3·4):-              𝑛·3·6 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )-              𝑛·3·7 := 3F-F0-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·3·8 := 𝑛·3·7-            boxed 𝑛·3·9 := 𝑛·3·8.φ-            normalized 𝑛·3·10 := 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·3·9-            𝛿·3·1 := 3F-F0-00-00-00-00-00-00  # 1.0-          𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.ρ)+              𝑛·3·6 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )+              𝑛·3·7 ≔ 3F-F0-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·3·8 ≔ 𝑛·3·7+            boxed 𝑛·3·9 ≔ 𝑛·3·8.φ+            normalized 𝑛·3·10 ≔ 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·3·9+            𝛿·3·1 ≔ 3F-F0-00-00-00-00-00-00  # 1.0+          𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.ρ)           𝔻(ξ.x):             𝕄(ξ.x):-              𝑛·3·11 := 2.0-              𝑛·3·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·3·13 := 𝑛·3·12-            boxed 𝑛·3·14 := 𝑛·3·13.φ-            normalized 𝑛·3·15 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·3·14+              𝑛·3·11 ≔ 2.0+              𝑛·3·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·3·13 ≔ 𝑛·3·12+            boxed 𝑛·3·14 ≔ 𝑛·3·13.φ+            normalized 𝑛·3·15 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·3·14             𝕄(𝑛·3·14):-              𝑛·3·16 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )-              𝑛·3·17 := 40-00-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·3·18 := 𝑛·3·17-            boxed 𝑛·3·19 := 𝑛·3·18.φ-            normalized 𝑛·3·20 := 40-00-00-00-00-00-00-00:Δ  # 𝑛·3·19-            𝛿·3·2 := 40-00-00-00-00-00-00-00  # 2.0-          𝛿2·3 := 𝛿·3·2  # 𝔻(ξ.x)-          𝑛·3·21 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus+              𝑛·3·16 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )+              𝑛·3·17 ≔ 40-00-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·3·18 ≔ 𝑛·3·17+            boxed 𝑛·3·19 ≔ 𝑛·3·18.φ+            normalized 𝑛·3·20 ≔ 40-00-00-00-00-00-00-00:Δ  # 𝑛·3·19+            𝛿·3·2 ≔ 40-00-00-00-00-00-00-00  # 2.0+          𝛿2·3 ≔ 𝛿·3·2  # 𝔻(ξ.x)+          𝑛·3·21 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus           𝕄(𝑛·3·21):-            𝑛·3·22 := Φ.number( φ ↦ 𝜎2:λ )-            𝑛·3·23 := ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-            morphed 𝑛·3·24 := 𝑛·3·23-          𝑛·3·25 := 𝑛·3·24  # 𝕄(𝑛·3·21)+            𝑛·3·22 ≔ Φ.number( φ ↦ 𝜎2:λ )+            𝑛·3·23 ≔ ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+            morphed 𝑛·3·24 ≔ 𝑛·3·23+          𝑛·3·25 ≔ 𝑛·3·24  # 𝕄(𝑛·3·21)           memoized 𝑛·2·10 ⇛ 𝑛·3·25-          evaluated 𝑛·3·26 := 𝑛·3·25  # 𝑛·2·10-        normalized 𝑛·2·11 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·3·26.plus-        𝑛·2·12 := 𝑛·3·22.plus( x ↦ 3.0 )-        𝑛·2·13 := ⟦ x ↦ 3.0, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·14 := 𝑛·2·13-      𝑛1·2 := 𝑛·2·13  # 𝕄(ξ.then)+          evaluated 𝑛·3·26 ≔ 𝑛·3·25  # 𝑛·2·10+        normalized 𝑛·2·11 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·3·26.plus+        𝑛·2·12 ≔ 𝑛·3·22.plus( x ↦ 3.0 )+        𝑛·2·13 ≔ ⟦ x ↦ 3.0, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·14 ≔ 𝑛·2·13+      𝑛1·2 ≔ 𝑛·2·13  # 𝕄(ξ.then)       𝕄(ξ.else):-        𝑛·2·15 := Φ.number( φ ↦ 𝑛·3·6 )-        𝑛·2·16 := ⟦ φ ↦ 𝑛·3·6, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·17 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·16.plus-        𝑛·2·18 := 𝑛·2·15.plus( x ↦ 𝑛·3·11 )-        𝑛·2·19 := ⟦ x ↦ 𝑛·3·11, λ ⤍ L_number_plus ⟧+        𝑛·2·15 ≔ Φ.number( φ ↦ 𝑛·3·6 )+        𝑛·2·16 ≔ ⟦ φ ↦ 𝑛·3·6, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·17 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·16.plus+        𝑛·2·18 ≔ 𝑛·2·15.plus( x ↦ 𝑛·3·11 )+        𝑛·2·19 ≔ ⟦ x ↦ 𝑛·3·11, λ ⤍ L_number_plus ⟧         𝔼(L_number_plus):           recalled 𝑛·2·10 ⇒ 𝑛·3·25-          𝑛·4·1 := 𝑛·3·22  # 𝑛 of L_number_plus-          𝑛·4·2 := 𝑛·3·25  # 𝕄(𝑛·4·1)-          evaluated 𝑛·4·3 := 𝑛·4·2  # 𝑛·2·19-        normalized 𝑛·2·20 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·4·3.plus-        𝑛·2·21 := 𝑛·3·22.plus( x ↦ 3.0 )-        𝑛·2·22 := ⟦ x ↦ 3.0, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·23 := 𝑛·2·22-      𝑛2·2 := 𝑛·2·22  # 𝕄(ξ.else)-      𝑛·2·24 := 𝑛·2·22  # 𝑛 of L_fork+          𝑛·4·1 ≔ 𝑛·3·22  # 𝑛 of L_number_plus+          𝑛·4·2 ≔ 𝑛·3·25  # 𝕄(𝑛·4·1)+          evaluated 𝑛·4·3 ≔ 𝑛·4·2  # 𝑛·2·19+        normalized 𝑛·2·20 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·4·3.plus+        𝑛·2·21 ≔ 𝑛·3·22.plus( x ↦ 3.0 )+        𝑛·2·22 ≔ ⟦ x ↦ 3.0, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·23 ≔ 𝑛·2·22+      𝑛2·2 ≔ 𝑛·2·22  # 𝕄(ξ.else)+      𝑛·2·24 ≔ 𝑛·2·22  # 𝑛 of L_fork       𝕄(𝑛·2·24):-        morphed 𝑛·2·25 := 𝑛·2·22-      𝑛·2·26 := 𝑛·2·22  # 𝕄(𝑛·2·24)+        morphed 𝑛·2·25 ≔ 𝑛·2·22+      𝑛·2·26 ≔ 𝑛·2·22  # 𝕄(𝑛·2·24)       memoized 𝑛·0·11 ⇛ 𝑛·2·22-      evaluated 𝑛·2·27 := 𝑛·2·22  # 𝑛·0·11+      evaluated 𝑛·2·27 ≔ 𝑛·2·22  # 𝑛·0·11     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·5·1 := Φ.number( φ ↦ 𝜎2:λ )-          𝑛·5·2 := ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·5·3 := 𝑛·4·2-        boxed 𝑛·5·4 := 𝑛·5·3.φ-        normalized 𝑛·5·5 := 𝜎2:λ  # 𝑛·5·4-        𝛿·5·1 := 𝔻(𝜎2:λ)-      𝛿1·5 := 𝛿·5·1  # 𝔻(ξ.ρ)+          𝑛·5·1 ≔ Φ.number( φ ↦ 𝜎2:λ )+          𝑛·5·2 ≔ ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·5·3 ≔ 𝑛·4·2+        boxed 𝑛·5·4 ≔ 𝑛·5·3.φ+        normalized 𝑛·5·5 ≔ 𝜎2:λ  # 𝑛·5·4+        𝛿·5·1 ≔ 𝔻(𝜎2:λ)+      𝛿1·5 ≔ 𝛿·5·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·5·6 := 3.0-          𝑛·5·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·5·8 := 𝑛·5·7-        boxed 𝑛·5·9 := 𝑛·5·8.φ-        normalized 𝑛·5·10 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )  # 𝑛·5·9+          𝑛·5·6 ≔ 3.0+          𝑛·5·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·5·8 ≔ 𝑛·5·7+        boxed 𝑛·5·9 ≔ 𝑛·5·8.φ+        normalized 𝑛·5·10 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )  # 𝑛·5·9         𝕄(𝑛·5·9):-          𝑛·5·11 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )-          𝑛·5·12 := 40-08-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·5·13 := 𝑛·5·12-        boxed 𝑛·5·14 := 𝑛·5·13.φ-        normalized 𝑛·5·15 := 40-08-00-00-00-00-00-00:Δ  # 𝑛·5·14-        𝛿·5·2 := 40-08-00-00-00-00-00-00  # 3.0-      𝛿2·5 := 𝛿·5·2  # 𝔻(ξ.x)-      𝑛·5·16 := Φ.number( φ ↦ 𝜎3:λ )  # 𝑛 of L_number_plus+          𝑛·5·11 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )+          𝑛·5·12 ≔ 40-08-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·5·13 ≔ 𝑛·5·12+        boxed 𝑛·5·14 ≔ 𝑛·5·13.φ+        normalized 𝑛·5·15 ≔ 40-08-00-00-00-00-00-00:Δ  # 𝑛·5·14+        𝛿·5·2 ≔ 40-08-00-00-00-00-00-00  # 3.0+      𝛿2·5 ≔ 𝛿·5·2  # 𝔻(ξ.x)+      𝑛·5·16 ≔ Φ.number( φ ↦ 𝜎3:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·5·16):-        𝑛·5·17 := Φ.number( φ ↦ 𝜎3:λ )-        𝑛·5·18 := ⟦ φ ↦ 𝜎3:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·5·19 := 𝑛·5·18-      𝑛·5·20 := 𝑛·5·19  # 𝕄(𝑛·5·16)+        𝑛·5·17 ≔ Φ.number( φ ↦ 𝜎3:λ )+        𝑛·5·18 ≔ ⟦ φ ↦ 𝜎3:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·5·19 ≔ 𝑛·5·18+      𝑛·5·20 ≔ 𝑛·5·19  # 𝕄(𝑛·5·16)       memoized 𝑛·2·22 ⇛ 𝑛·5·20-      evaluated 𝑛·5·21 := 𝑛·5·20  # 𝑛·2·22-    normalized 𝑛·0·12 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·5·21.plus-    𝑛·0·13 := 𝑛·5·17.plus( x ↦ 9.0 )-    𝑛·0·14 := ⟦ x ↦ 9.0, λ ⤍ L_number_plus ⟧-    morphed 𝑛·0·15 := 𝑛·0·14+      evaluated 𝑛·5·21 ≔ 𝑛·5·20  # 𝑛·2·22+    normalized 𝑛·0·12 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·5·21.plus+    𝑛·0·13 ≔ 𝑛·5·17.plus( x ↦ 9.0 )+    𝑛·0·14 ≔ ⟦ x ↦ 9.0, λ ⤍ L_number_plus ⟧+    morphed 𝑛·0·15 ≔ 𝑛·0·14
test-resources/evaluate-packs/names-a-reshaped-side-of-a-fabricated-formation-by-its-meta.yaml view
@@ -33,17 +33,17 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ f( x ↦ 01-:Δ ), f(x) ↦ ⟦⟧ ⟧-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ f( x ↦ 01-:Δ ), f(x) ↦ ⟦⟧ ⟧+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.zu:φ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      symbolized 𝜎2 := 01--      𝑛3·1 := ⟦ φ ↦ f( x ↦ 𝜎2:λ ), f(x) ↦ ⟦⟧ ⟧  # symbolize(𝑛1 of L_fork)-      fabricated 𝑛·1·3 := 𝑛3·1 and 𝑛2·1  # ⟦ left🌵 ↦ 𝑛3·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, f(x) ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.f( x ↦ x ), right🌵 ↦ ρ.right🌵.f( x ↦ x ) ⟧ ⟧-      evaluated 𝑛·1·4 := 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧-    normalized 𝑛·0·1 := ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.f( x ↦ x ), right🌵 ↦ ρ.right🌵.f( x ↦ x ) ⟧  # 𝑛·1·4.f-    morphed 𝑛·0·2 := ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.f( x ↦ x ), right🌵 ↦ ρ.right🌵.f( x ↦ x ) ⟧+        morphed 𝑛·1·2 ≔ Φ.zu:φ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      symbolized 𝜎2 ≔ 01-+      𝑛3·1 ≔ ⟦ φ ↦ f( x ↦ 𝜎2:λ ), f(x) ↦ ⟦⟧ ⟧  # symbolize(𝑛1 of L_fork)+      fabricated 𝑛·1·3 ≔ 𝑛3·1 and 𝑛2·1  # ⟦ left🌵 ↦ 𝑛3·1, right🌵 ↦ 𝑛·1·2, φ ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.φ, right🌵 ↦ ρ.right🌵.φ ⟧, f(x) ↦ ⟦ λ ⤍ L_join, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.f( x ↦ x ), right🌵 ↦ ρ.right🌵.f( x ↦ x ) ⟧ ⟧+      evaluated 𝑛·1·4 ≔ 𝑛·1·3  # ⟦ c ↦ 𝜎1:λ, a ↦ 𝑛·1·1, b ↦ 𝑛·1·2, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.f( x ↦ x ), right🌵 ↦ ρ.right🌵.f( x ↦ x ) ⟧  # 𝑛·1·4.f+    morphed 𝑛·0·2 ≔ ⟦ λ ⤍ L_join, x ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ρ.left🌵.f( x ↦ x ), right🌵 ↦ ρ.right🌵.f( x ↦ x ) ⟧
test-resources/evaluate-packs/nests-the-firing-an-operand-brought-down.yaml view
@@ -18,91 +18,91 @@ input: >   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.plus( 6.plus( 7 ) ).plus( 8 ) ⟧+    φ ↦ 5.plus( x ↦ 6.plus( x ↦ 7 ) ).plus( x ↦ 8 ) ⟧ protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    shared 𝑛·1 := 6.0.plus( 7.0 )-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ 𝑛·1 )-    𝑛·0·6 := ⟦ x ↦ 𝑛·1, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    shared 𝑛·1 ≔ 6.0.plus( x ↦ 7.0 )+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 𝑛·1 )+    𝑛·0·6 ≔ ⟦ x ↦ 𝑛·1, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 6.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          normalized 𝑛·1·14 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·13.plus-          𝑛·1·15 := 𝑛·1·12.plus( x ↦ 7.0 )-          𝑛·1·16 := ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧-          morphed 𝑛·1·17 := 𝑛·1·16+          𝑛·1·12 ≔ 6.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          normalized 𝑛·1·14 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·13.plus+          𝑛·1·15 ≔ 𝑛·1·12.plus( x ↦ 7.0 )+          𝑛·1·16 ≔ ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧+          morphed 𝑛·1·17 ≔ 𝑛·1·16         𝔼(L_number_plus):           𝔻(ξ.ρ):             𝕄(ξ.ρ):-              𝑛·2·1 := 6.0-              𝑛·2·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·2·3 := 𝑛·2·2-            boxed 𝑛·2·4 := 𝑛·2·3.φ-            normalized 𝑛·2·5 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·2·4+              𝑛·2·1 ≔ 6.0+              𝑛·2·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·2·3 ≔ 𝑛·2·2+            boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+            normalized 𝑛·2·5 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·2·4             𝕄(𝑛·2·4):-              𝑛·2·6 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )-              𝑛·2·7 := 40-18-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·2·8 := 𝑛·2·7-            boxed 𝑛·2·9 := 𝑛·2·8.φ-            normalized 𝑛·2·10 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·2·9-            𝛿·2·1 := 40-18-00-00-00-00-00-00  # 6.0-          𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+              𝑛·2·6 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )+              𝑛·2·7 ≔ 40-18-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·2·8 ≔ 𝑛·2·7+            boxed 𝑛·2·9 ≔ 𝑛·2·8.φ+            normalized 𝑛·2·10 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·2·9+            𝛿·2·1 ≔ 40-18-00-00-00-00-00-00  # 6.0+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)           𝔻(ξ.x):             𝕄(ξ.x):-              𝑛·2·11 := 7.0-              𝑛·2·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·2·13 := 𝑛·2·12-            boxed 𝑛·2·14 := 𝑛·2·13.φ-            normalized 𝑛·2·15 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·14+              𝑛·2·11 ≔ 7.0+              𝑛·2·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·2·13 ≔ 𝑛·2·12+            boxed 𝑛·2·14 ≔ 𝑛·2·13.φ+            normalized 𝑛·2·15 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·14             𝕄(𝑛·2·14):-              𝑛·2·16 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )-              𝑛·2·17 := 40-1C-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·2·18 := 𝑛·2·17-            boxed 𝑛·2·19 := 𝑛·2·18.φ-            normalized 𝑛·2·20 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·19-            𝛿·2·2 := 40-1C-00-00-00-00-00-00  # 7.0-          𝛿2·2 := 𝛿·2·2  # 𝔻(ξ.x)-          𝑛·2·21 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus+              𝑛·2·16 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )+              𝑛·2·17 ≔ 40-1C-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·2·18 ≔ 𝑛·2·17+            boxed 𝑛·2·19 ≔ 𝑛·2·18.φ+            normalized 𝑛·2·20 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·19+            𝛿·2·2 ≔ 40-1C-00-00-00-00-00-00  # 7.0+          𝛿2·2 ≔ 𝛿·2·2  # 𝔻(ξ.x)+          𝑛·2·21 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus           𝕄(𝑛·2·21):-            𝑛·2·22 := Φ.number( φ ↦ 𝜎1:λ )-            𝑛·2·23 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧-            morphed 𝑛·2·24 := 𝑛·2·23-          𝑛·2·25 := 𝑛·2·24  # 𝕄(𝑛·2·21)-          evaluated 𝑛·2·26 := 𝑛·2·25  # 𝑛·1·16-        boxed 𝑛·1·18 := 𝑛·2·26.φ-        normalized 𝑛·1·19 := 𝜎1:λ  # 𝑛·1·18-        𝛿·1·2 := 𝔻(𝜎1:λ)-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·20 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus+            𝑛·2·22 ≔ Φ.number( φ ↦ 𝜎1:λ )+            𝑛·2·23 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧+            morphed 𝑛·2·24 ≔ 𝑛·2·23+          𝑛·2·25 ≔ 𝑛·2·24  # 𝕄(𝑛·2·21)+          evaluated 𝑛·2·26 ≔ 𝑛·2·25  # 𝑛·1·16+        boxed 𝑛·1·18 ≔ 𝑛·2·26.φ+        normalized 𝑛·1·19 ≔ 𝜎1:λ  # 𝑛·1·18+        𝛿·1·2 ≔ 𝔻(𝜎1:λ)+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·20 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·20):-        𝑛·1·21 := Φ.number( φ ↦ 𝜎2:λ )-        𝑛·1·22 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·1·23 := 𝑛·1·22-      𝑛·1·24 := 𝑛·1·23  # 𝕄(𝑛·1·20)-      evaluated 𝑛·1·25 := 𝑛·1·24  # 𝑛·0·6-    normalized 𝑛·0·7 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·25.plus-    𝑛·0·8 := 𝑛·1·21.plus( x ↦ 8.0 )-    𝑛·0·9 := ⟦ x ↦ 8.0, λ ⤍ L_number_plus ⟧-    morphed 𝑛·0·10 := 𝑛·0·9+        𝑛·1·21 ≔ Φ.number( φ ↦ 𝜎2:λ )+        𝑛·1·22 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·1·23 ≔ 𝑛·1·22+      𝑛·1·24 ≔ 𝑛·1·23  # 𝕄(𝑛·1·20)+      evaluated 𝑛·1·25 ≔ 𝑛·1·24  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·25.plus+    𝑛·0·8 ≔ 𝑛·1·21.plus( x ↦ 8.0 )+    𝑛·0·9 ≔ ⟦ x ↦ 8.0, λ ⤍ L_number_plus ⟧+    morphed 𝑛·0·10 ≔ 𝑛·0·9
− test-resources/evaluate-packs/parks-a-dispatch-off-a-symbol.yaml
@@ -1,21 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----# yamllint disable rule:line-length-# A λ binding naming a symbol rather than a name, which is what a value nobody-# worked out looks like: ⟦ λ ⤍ 𝜎1 ⟧. Dispatching an attribute off it asks 𝕄 to-# reduce it, 'ml' fires 𝔼 on the target, and before #1287 𝔼 refused the-# formation outright — a 'userError' nothing catches, so the whole run died on-# the first such term. 𝔼 now gets stuck on the symbol the way it gets stuck on-# a λ name no entry of the '--symbolic' file answers, so '--partial' parks the-# site: 'a' is left exactly as it was written, a taint with no root. The site-# is written to the protocol as 'unanswered(𝜎1)', spelled the way every term-# carrying that symbol spells it.-symbolic: '[]'-location: 'Q.a'-partial: true-input: '⟦ a ↦ ⟦ λ ⤍ 𝜎1 ⟧.plus( 5 ) ⟧'-result: '𝜎1:λ.plus( 5 )'-protocol: |-  𝕄(Φ.a):-    opaque 𝜎1  # 𝕄(𝜎1:λ.plus)
test-resources/evaluate-packs/parks-a-firing-whose-deferred-argument-got-stuck.yaml view
@@ -24,23 +24,23 @@ input: >   ⟦ box ↦ ⟦ s ↦ ∅, x ↦ ∅, φ ↦ ξ.s.next ⟧,     p ↦ ⟦-      c ↦ Φ.box( ⟦ λ ⤍ 𝜎1 ⟧, ⟦ arg ↦ ⟦ λ ⤍ L_none ⟧, λ ⤍ L_outer ⟧.φ ),+      c ↦ Φ.box( s ↦ ⟦ λ ⤍ 𝜎1 ⟧, x ↦ ⟦ arg ↦ ⟦ λ ⤍ L_none ⟧, λ ⤍ L_outer ⟧.φ ),       λ ⤍ L_pair ⟧.φ ⟧-result: '⟦ c ↦ Φ.box( ⟦ λ ⤍ 𝜎1 ⟧, ⟦ arg ↦ ⟦ λ ⤍ L_none ⟧, λ ⤍ L_outer ⟧.φ ), λ ⤍ L_pair ⟧.φ'+result: '⟦ c ↦ Φ.box( s ↦ ⟦ λ ⤍ 𝜎1 ⟧, x ↦ ⟦ arg ↦ ⟦ λ ⤍ L_none ⟧, λ ⤍ L_outer ⟧.φ ), λ ⤍ L_pair ⟧.φ' protocol: |   𝕄(Φ.p):     𝔼(L_pair):       𝕄(ξ.c):         remembered 𝑛·1·1 ≡ Φ.box  # ⟦ s ↦ ∅, x ↦ ∅, φ ↦ s.next ⟧-        𝑛·1·2 := Φ.box( s ↦ 𝜎1:λ )-        𝑛·1·3 := ⟦ s ↦ 𝜎1:λ, x ↦ ∅, φ ↦ s.next ⟧+        𝑛·1·2 ≔ Φ.box( s ↦ 𝜎1:λ )+        𝑛·1·3 ≔ ⟦ s ↦ 𝜎1:λ, x ↦ ∅, φ ↦ s.next ⟧         remembered 𝑛·1·3 ≡ 𝑛·1·1( s ↦ 𝜎1:λ )-        shared 𝑛·1 := ⟦ arg ↦ L_none:λ, λ ⤍ L_outer ⟧.φ-        𝑛·1·4 := 𝑛·1·2( x ↦ 𝑛·1 )-        𝑛·1·5 := ⟦ s ↦ 𝜎1:λ, x ↦ 𝑛·1, φ ↦ s.next ⟧+        shared 𝑛·1 ≔ ⟦ arg ↦ L_none:λ, λ ⤍ L_outer ⟧.φ+        𝑛·1·4 ≔ 𝑛·1·2( x ↦ 𝑛·1 )+        𝑛·1·5 ≔ ⟦ s ↦ 𝜎1:λ, x ↦ 𝑛·1, φ ↦ s.next ⟧         remembered 𝑛·1·5 ≡ 𝑛·1·3( x ↦ 𝑛·1 )-        morphed 𝑛·1·6 := 𝑛·1·5-      𝑛1·1 := 𝑛·1·6  # 𝕄(ξ.c)+        morphed 𝑛·1·6 ≔ 𝑛·1·5+      𝑛1·1 ≔ 𝑛·1·6  # 𝕄(ξ.c)       recalled 𝑛·1·5 ⇒ 𝑛·1·3( x ↦ 𝑛·1 )       recalled 𝑛·1·3 ⇒ 𝑛·1·1( s ↦ 𝜎1:λ )       recalled 𝑛·1·1 ⇒ Φ.box
test-resources/evaluate-packs/parks-a-firing-whose-join-side-got-stuck.yaml view
@@ -22,8 +22,8 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):         unanswered L_none  # 𝕄(L_none:λ.x)       stuck L_none
test-resources/evaluate-packs/parks-a-firing-whose-morph-operand-diverged.yaml view
@@ -27,18 +27,18 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):         𝔼(L_fork):           𝔻(ξ.c):-            𝛿·2·1 := 𝔻(𝜎2:λ)-          𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.c)+            𝛿·2·1 ≔ 𝔻(𝜎2:λ)+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.c)           𝕄(ξ.a):-            morphed 𝑛·2·1 := 01-:Δ-          𝑛1·2 := 01-:Δ  # 𝕄(ξ.a)+            morphed 𝑛·2·1 ≔ 01-:Δ+          𝑛1·2 ≔ 01-:Δ  # 𝕄(ξ.a)           𝕄(ξ.b):-            morphed 𝑛·2·2 := 02-:Δ-          𝑛2·2 := 02-:Δ  # 𝕄(ξ.b)+            morphed 𝑛·2·2 ≔ 02-:Δ+          𝑛2·2 ≔ 02-:Δ  # 𝕄(ξ.b)           diverged 𝑛1·2 vs 𝑛2·2  # cannot join: at .Δ the left side has Δ ⤍ 01- and the right side has Δ ⤍ 02-; cannot fabricate: the join names no otherwise       stuck L_fork
test-resources/evaluate-packs/parks-a-firing-whose-morph-operand-got-stuck.yaml view
@@ -26,8 +26,8 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):         unanswered L_none  # 𝕄(L_none:λ.x)       stuck L_none
test-resources/evaluate-packs/parks-a-firing-whose-operand-has-a-void-phi.yaml view
@@ -18,7 +18,7 @@   𝕄(Φ.y):     𝔼(L_pair):       𝔻(ξ.x):-        boxed 𝑛·1·1 := ∅:φ.φ-        normalized 𝑛·1·2 := ⊥  # 𝑛·1·1+        boxed 𝑛·1·1 ≔ ∅:φ.φ+        normalized 𝑛·1·2 ≔ ⊥  # 𝑛·1·1       unanswered ⊥  # 𝔻(⊥)       stuck ⊥
test-resources/evaluate-packs/parks-a-firing-whose-operand-reaches-the-terminator.yaml view
@@ -37,40 +37,42 @@ result: '⟦ n ↦ 1, v ↦ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read, λ ⤍ L_entry ⟧.φ' protocol: |   𝕄(Φ.l🌵.e1):-    normalized 𝑛·0·1 := ⟦ mark(n, v) ↦ L_entry:λ, e1 ↦ Φ.l🌵.mark( n ↦ 1.0, v ↦ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read ).φ ⟧  # Φ.l🌵-    normalized 𝑛·0·2 := ⟦ n ↦ ∅, v ↦ ∅, λ ⤍ L_entry ⟧  # 𝑛·0·1.mark-    𝑛·0·3 := ⟦ n ↦ ∅, v ↦ ∅, λ ⤍ L_entry ⟧( n ↦ 1.0 )-    𝑛·0·4 := ⟦ n ↦ 1.0, v ↦ ∅, λ ⤍ L_entry ⟧-    shared 𝑛·1 := Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read-    𝑛·0·5 := 𝑛·0·4( v ↦ 𝑛·1 )-    𝑛·0·6 := ⟦ n ↦ 1.0, v ↦ 𝑛·1, λ ⤍ L_entry ⟧+    normalized 𝑛·0·1 ≔ ⟦ mark(n, v) ↦ L_entry:λ, e1 ↦ Φ.l🌵.mark( n ↦ 1.0, v ↦ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read ).φ ⟧  # Φ.l🌵+    remembered 𝑛·0·2 ≡ Φ.l🌵.mark  # ⟦ n ↦ ∅, v ↦ ∅, λ ⤍ L_entry ⟧+    𝑛·0·3 ≔ 𝑛·0·2( n ↦ 1.0 )+    𝑛·0·4 ≔ ⟦ n ↦ 1.0, v ↦ ∅, λ ⤍ L_entry ⟧+    remembered 𝑛·0·4 ≡ 𝑛·0·3+    shared 𝑛·1 ≔ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).read+    𝑛·0·5 ≔ 𝑛·0·4( v ↦ 𝑛·1 )+    𝑛·0·6 ≔ ⟦ n ↦ 1.0, v ↦ 𝑛·1, λ ⤍ L_entry ⟧+    remembered 𝑛·0·6 ≡ 𝑛·0·5     𝔼(L_entry):       𝔻(ξ.n):         𝕄(ξ.n):-          normalized 𝑛·1·1 := ∅:φ  # Φ.number-          𝑛·1·2 := 1.0-          𝑛·1·3 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ):φ-          morphed 𝑛·1·4 := 𝑛·1·3-        boxed 𝑛·1·5 := 𝑛·1·4.φ-        normalized 𝑛·1·6 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·1·5+          normalized 𝑛·1·1 ≔ ∅:φ  # Φ.number+          𝑛·1·2 ≔ 1.0+          𝑛·1·3 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ):φ+          morphed 𝑛·1·4 ≔ 𝑛·1·3+        boxed 𝑛·1·5 ≔ 𝑛·1·4.φ+        normalized 𝑛·1·6 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·1·5         𝕄(𝑛·1·5):-          normalized 𝑛·1·7 := ⟦ φ ↦ ∅, size ↦ L_bytes_size:λ ⟧  # Φ.bytes-          𝑛·1·8 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )-          𝑛·1·9 := ⟦ φ ↦ 3F-F0-00-00-00-00-00-00:Δ, size ↦ L_bytes_size:λ ⟧-          morphed 𝑛·1·10 := 𝑛·1·9-        boxed 𝑛·1·11 := 𝑛·1·10.φ-        normalized 𝑛·1·12 := 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·1·11-        𝛿·1·1 := 3F-F0-00-00-00-00-00-00  # 1.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.n)+          normalized 𝑛·1·7 ≔ ⟦ φ ↦ ∅, size ↦ L_bytes_size:λ ⟧  # Φ.bytes+          𝑛·1·8 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )+          𝑛·1·9 ≔ ⟦ φ ↦ 3F-F0-00-00-00-00-00-00:Δ, size ↦ L_bytes_size:λ ⟧+          morphed 𝑛·1·10 ≔ 𝑛·1·9+        boxed 𝑛·1·11 ≔ 𝑛·1·10.φ+        normalized 𝑛·1·12 ≔ 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·1·11+        𝛿·1·1 ≔ 3F-F0-00-00-00-00-00-00  # 1.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.n)       𝕄(ξ.v.φ):-        normalized 𝑛·1·13 := ⟦ data ↦ ∅, buffer ↦ ∅, read ↦ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ ⟧  # Φ.block-        𝑛·1·14 := Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) )-        𝑛·1·15 := ⟦ data ↦ ∅, buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ), read ↦ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ ⟧-        normalized 𝑛·1·16 := Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ  # 𝑛·1·15.read-        normalized 𝑛·1·17 := Φ.dataized( target ↦ ⊥ ).as-bytes  # 𝑛·1·16.φ+        normalized 𝑛·1·13 ≔ ⟦ data ↦ ∅, buffer ↦ ∅, read ↦ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ ⟧  # Φ.block+        𝑛·1·14 ≔ Φ.block( buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ) )+        𝑛·1·15 ≔ ⟦ data ↦ ∅, buffer ↦ Φ.bytes( φ ↦ 𝜎1:λ ), read ↦ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ ⟧+        normalized 𝑛·1·16 ≔ Φ.dataized( target ↦ ρ.data.size ).as-bytes:φ  # 𝑛·1·15.read+        normalized 𝑛·1·17 ≔ Φ.dataized( target ↦ ⊥ ).as-bytes  # 𝑛·1·16.φ         remembered 𝑛·1·18 ≡ Φ.dataized  # ⟦ target ↦ ∅, λ ⤍ L_dataized ⟧-        𝑛·1·19 := Φ.dataized( target ↦ ⊥ )-        𝑛·1·20 := ⟦ target ↦ ⊥, λ ⤍ L_dataized ⟧+        𝑛·1·19 ≔ Φ.dataized( target ↦ ⊥ )+        𝑛·1·20 ≔ ⟦ target ↦ ⊥, λ ⤍ L_dataized ⟧         remembered 𝑛·1·20 ≡ 𝑛·1·18( target ↦ ⊥ )         𝔼(L_dataized):           unanswered ⊥  # 𝔻(⊥)
test-resources/evaluate-packs/parks-an-evaluate-line-firing-a-lambda-no-entry-answers.yaml view
@@ -20,7 +20,7 @@   𝕄(Φ.y):     𝔼(L_fork):       𝕄(ξ.a):-        morphed 𝑛·1·1 := L_none:λ-      𝑛1·1 := L_none:λ  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ L_none:λ+      𝑛1·1 ≔ L_none:λ  # 𝕄(ξ.a)       unanswered L_none  # 𝔼(L_none:λ)       stuck L_none
test-resources/evaluate-packs/parks-an-evaluate-line-over-a-term-that-is-no-formation.yaml view
@@ -29,7 +29,7 @@   𝕄(Φ.y):     𝔼(L_fork):       𝕄(ξ.a):-        morphed 𝑛·1·1 := Φ.k:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)-      𝑛2·1 := Φ.k  # rewrite(𝑛1 of L_fork)+        morphed 𝑛·1·1 ≔ Φ.k:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)+      𝑛2·1 ≔ Φ.k  # rewrite(𝑛1 of L_fork)       stuck L_fork
test-resources/evaluate-packs/parks-two-sides-that-do-not-join.yaml view
@@ -23,10 +23,10 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := 01-:Δ:φ+        morphed 𝑛·1·1 ≔ 01-:Δ:φ       𝕄(ξ.b):-        morphed 𝑛·1·2 := 02-:Δ:φ+        morphed 𝑛·1·2 ≔ 02-:Δ:φ       diverged 𝑛·1·1 vs 𝑛·1·2  # cannot join: at .φ.Δ the left side has Δ ⤍ 01- and the right side has Δ ⤍ 02-; cannot fabricate: the join names no otherwise
test-resources/evaluate-packs/passes-a-side-that-is-no-formation-through-an-evaluate-line-to-the-join.yaml view
@@ -40,14 +40,14 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := Φ.k:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)+        morphed 𝑛·1·1 ≔ Φ.k:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)       𝕄(ξ.b):-        morphed 𝑛·1·2 := Φ.j:φ-      𝑛2·1 := 𝑛·1·2  # 𝕄(ξ.b)-      𝑛3·1 := Φ.k  # rewrite(𝑛1 of L_fork)-      𝑛4·1 := Φ.j  # rewrite(𝑛2 of L_fork)+        morphed 𝑛·1·2 ≔ Φ.j:φ+      𝑛2·1 ≔ 𝑛·1·2  # 𝕄(ξ.b)+      𝑛3·1 ≔ Φ.k  # rewrite(𝑛1 of L_fork)+      𝑛4·1 ≔ Φ.j  # rewrite(𝑛2 of L_fork)       diverged Φ.k vs Φ.j  # cannot join: the left side is Φ.k and the right side is Φ.j; cannot fabricate: the join names no otherwise
+ test-resources/evaluate-packs/recalls-a-firing-whose-operand-dispatches-off-a-symbol.yaml view
@@ -0,0 +1,64 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# Both sides fire the same copy of 'L_id', whose operand dispatches off a+# bare symbol. The dispatch is 'opaque' and gives a new symbol (#2479), so the+# left one answers and the memo keeps the answer; the right one recalls it.+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.on🌵+    morph:+      𝑛1: $.left🌵+      𝑛2: $.right🌵+    join:+      on: 𝛿1+      left: 𝑛1+      right: 𝑛2+      otherwise: L_fork+  - λ: L_id+    morph:+      𝑛1: $.x+    𝑛: 𝑛1+location: 'Q.e1'+acyclic: plausible+input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, id ↦ ⟦ λ ⤍ L_id, x ↦ ⟦ λ ⤍ 𝜎1 ⟧.q ⟧, e1 ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ Δ ⤍ 00- ⟧, left🌵 ↦ Φ.id.φ, right🌵 ↦ Φ.id.φ ⟧.φ ⟧'+result: '𝜎6:λ'+protocol: |+  𝕄(Φ.e1):+    𝔼(L_fork):+      𝔻(ξ.on🌵):+        𝛿·1·1 ≔ 00-+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.on🌵)+      𝕄(ξ.left🌵):+        remembered 𝑛·1·1 ≡ Φ.id  # ⟦ λ ⤍ L_id, x ↦ 𝜎1:λ.q ⟧+        𝔼(L_id):+          𝕄(ξ.x):+            opaque 𝜎2:λ ≔ 𝜎1:λ.q+            morphed 𝑛·2·1 ≔ 𝜎2:λ+          𝑛1·2 ≔ 𝑛·2·1  # 𝕄(ξ.x)+          𝑛·2·2 ≔ 𝑛1·2  # 𝑛 of L_id+          𝕄(𝑛·2·2):+            morphed 𝑛·2·3 ≔ 𝑛1·2+          𝑛·2·4 ≔ 𝑛1·2  # 𝕄(𝑛·2·2)+          memoized 𝑛·1·1 ⇛ 𝜎2:λ+          evaluated 𝑛·2·5 ≔ 𝑛·2·4  # 𝑛·1·1+        opaque 𝜎3:λ ≔ 𝜎2:λ.φ+        morphed 𝑛·1·2 ≔ 𝜎3:λ+      𝑛1·1 ≔ 𝑛·1·2  # 𝕄(ξ.left🌵)+      𝕄(ξ.right🌵):+        𝔼(L_id):+          recalled 𝑛·1·1 ⇒ 𝜎2:λ+          𝑛·3·1 ≔ 𝑛·2·4  # 𝑛 of L_id+          𝑛·3·2 ≔ 𝑛·2·4  # 𝕄(𝑛·3·1)+          evaluated 𝑛·3·3 ≔ 𝑛·3·2  # 𝑛·1·1+        opaque 𝜎4:λ ≔ 𝜎2:λ.φ+        morphed 𝑛·1·3 ≔ 𝜎4:λ+      𝑛2·1 ≔ 𝑛·1·3  # 𝕄(ξ.right🌵)+      joined 𝜎5 ≔ 𝛿1·1 ? 𝜎3 : 𝜎4+      𝑛·1·4 ≔ 𝜎5:λ+      memoized 𝑛·1·5 ⇛ 𝜎5:λ  # ⟦ λ ⤍ L_fork, on🌵 ↦ 00-:Δ, left🌵 ↦ Φ.id.φ, right🌵 ↦ Φ.id.φ ⟧+      evaluated 𝑛·1·6 ≔ 𝑛·1·4  # 𝑛·1·5+    opaque 𝜎6:λ ≔ 𝜎5:λ.φ+    morphed 𝑛·0·1 ≔ 𝜎6:λ
test-resources/evaluate-packs/reduces-a-carried-symbol-through-morphing.yaml view
@@ -16,12 +16,12 @@   𝕄(Φ.y):     𝔼(L_keep):       𝕄(ξ.x):-        morphed 𝑛·1·1 := 𝜎4:λ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.x)-      𝑛·1·2 := 𝜎5:λ:z  # 𝑛 of L_keep+        morphed 𝑛·1·1 ≔ 𝜎4:λ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.x)+      𝑛·1·2 ≔ 𝜎5:λ:z  # 𝑛 of L_keep       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := 𝜎5:λ:z-      𝑛·1·4 := 𝑛·1·3  # 𝕄(𝑛·1·2)-      evaluated 𝑛·1·5 := 𝑛·1·4  # ⟦ x ↦ 𝜎4:λ, λ ⤍ L_keep ⟧-    normalized 𝑛·0·1 := 𝜎5:λ  # 𝑛·1·5.z-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·3 ≔ 𝜎5:λ:z+      𝑛·1·4 ≔ 𝑛·1·3  # 𝕄(𝑛·1·2)+      evaluated 𝑛·1·5 ≔ 𝑛·1·4  # ⟦ x ↦ 𝜎4:λ, λ ⤍ L_keep ⟧+    normalized 𝑛·0·1 ≔ 𝜎5:λ  # 𝑛·1·5.z+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/refuses-a-meta-bound-to-a-term-that-is-not-a-normal-form.yaml view
@@ -25,6 +25,6 @@   𝕄(Φ.y):     𝔼(L_wrap):       𝕄(ξ.x):-        morphed 𝑛·1·1 := 01-:Δ-      𝑛1·1 := 01-:Δ  # 𝕄(ξ.x)-      𝑛2·1 := 01-:Δ:k.k  # rewrite(𝑛1 of L_wrap)+        morphed 𝑛·1·1 ≔ 01-:Δ+      𝑛1·1 ≔ 01-:Δ  # 𝕄(ξ.x)+      𝑛2·1 ≔ 01-:Δ:k.k  # rewrite(𝑛1 of L_wrap)
test-resources/evaluate-packs/refuses-to-fabricate-of-sides-that-disagree-on-a-void.yaml view
@@ -23,10 +23,10 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := ⟦ φ ↦ 𝜎2:λ, k ↦ ∅ ⟧+        morphed 𝑛·1·1 ≔ ⟦ φ ↦ 𝜎2:λ, k ↦ ∅ ⟧       𝕄(ξ.b):-        morphed 𝑛·1·2 := ⟦ φ ↦ 𝜎3:λ, k ↦ ⟦⟧ ⟧+        morphed 𝑛·1·2 ≔ ⟦ φ ↦ 𝜎3:λ, k ↦ ⟦⟧ ⟧       unripe 𝑛·1·1 vs 𝑛·1·2  # k is void on the left and attached on the right
test-resources/evaluate-packs/renames-the-answer-of-a-firing-alike-up-to-the-symbols-of-its-positions.yaml view
@@ -46,69 +46,69 @@     𝔼(L_triple):       𝕄(ξ.a):         remembered 𝑛·1·1 ≡ Φ.dataized  # ⟦ target ↦ ∅, λ ⤍ L_dataized ⟧-        𝑛·1·2 := Φ.dataized( target ↦ Φ.u )-        𝑛·1·3 := ⟦ target ↦ Φ.u, λ ⤍ L_dataized ⟧+        𝑛·1·2 ≔ Φ.dataized( target ↦ Φ.u )+        𝑛·1·3 ≔ ⟦ target ↦ Φ.u, λ ⤍ L_dataized ⟧         remembered 𝑛·1·3 ≡ 𝑛·1·1( target ↦ Φ.u )-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·3  # 𝕄(ξ.a)+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·3  # 𝕄(ξ.a)       𝕄(ξ.b):         remembered 𝑛·1·5 ≡ Φ.peek  # ⟦ target ↦ ∅, λ ⤍ L_peek ⟧-        𝑛·1·6 := Φ.peek( target ↦ Φ.v )-        𝑛·1·7 := ⟦ target ↦ Φ.v, λ ⤍ L_peek ⟧+        𝑛·1·6 ≔ Φ.peek( target ↦ Φ.v )+        𝑛·1·7 ≔ ⟦ target ↦ Φ.v, λ ⤍ L_peek ⟧         remembered 𝑛·1·7 ≡ 𝑛·1·5( target ↦ Φ.v )-        morphed 𝑛·1·8 := 𝑛·1·7-      𝑛2·1 := 𝑛·1·7  # 𝕄(ξ.b)+        morphed 𝑛·1·8 ≔ 𝑛·1·7+      𝑛2·1 ≔ 𝑛·1·7  # 𝕄(ξ.b)       𝕄(ξ.c):-        𝑛·1·9 := Φ.dataized( target ↦ Φ.v )-        𝑛·1·10 := ⟦ target ↦ Φ.v, λ ⤍ L_dataized ⟧+        𝑛·1·9 ≔ Φ.dataized( target ↦ Φ.v )+        𝑛·1·10 ≔ ⟦ target ↦ Φ.v, λ ⤍ L_dataized ⟧         remembered 𝑛·1·10 ≡ 𝑛·1·1( target ↦ Φ.v )-        morphed 𝑛·1·11 := 𝑛·1·10-      𝑛3·1 := 𝑛·1·10  # 𝕄(ξ.c)+        morphed 𝑛·1·11 ≔ 𝑛·1·10+      𝑛3·1 ≔ 𝑛·1·10  # 𝕄(ξ.c)       recalled 𝑛·1·3 ⇒ 𝑛·1·1( target ↦ Φ.u )       recalled 𝑛·1·1 ⇒ Φ.dataized       𝔼(L_dataized):  # 𝔼(𝑛1 of L_triple)         𝔻(ξ.target):           𝕄(ξ.target):-            normalized 𝑛·2·1 := 𝜎1:λ  # Φ.u-            morphed 𝑛·2·2 := 𝑛·2·1-          𝛿·2·1 := 𝔻(𝜎1:λ)-        𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.target)-        𝑛·2·3 := 𝜎3:λ  # 𝑛 of L_dataized+            normalized 𝑛·2·1 ≔ 𝜎1:λ  # Φ.u+            morphed 𝑛·2·2 ≔ 𝑛·2·1+          𝛿·2·1 ≔ 𝔻(𝜎1:λ)+        𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.target)+        𝑛·2·3 ≔ 𝜎3:λ  # 𝑛 of L_dataized         𝕄(𝑛·2·3):-          morphed 𝑛·2·4 := 𝜎3:λ-        𝑛·2·5 := 𝑛·2·4  # 𝕄(𝑛·2·3)+          morphed 𝑛·2·4 ≔ 𝜎3:λ+        𝑛·2·5 ≔ 𝑛·2·4  # 𝕄(𝑛·2·3)         memoized 𝑛·1·3 ⇛ 𝜎3:λ-        evaluated 𝑛·2·6 := 𝑛·2·5  # 𝑛·1·3-      𝑛4·1 := 𝑛·2·5  # 𝔼(𝑛1 of L_triple)+        evaluated 𝑛·2·6 ≔ 𝑛·2·5  # 𝑛·1·3+      𝑛4·1 ≔ 𝑛·2·5  # 𝔼(𝑛1 of L_triple)       recalled 𝑛·1·7 ⇒ 𝑛·1·5( target ↦ Φ.v )       recalled 𝑛·1·5 ⇒ Φ.peek       𝔼(L_peek):  # 𝔼(𝑛2 of L_triple)         𝔻(ξ.target):           𝕄(ξ.target):-            normalized 𝑛·3·1 := 𝜎2:λ  # Φ.v-            morphed 𝑛·3·2 := 𝑛·3·1-          𝛿·3·1 := 𝔻(𝜎2:λ)-        𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.target)-        𝑛·3·3 := 𝜎4:λ  # 𝑛 of L_peek+            normalized 𝑛·3·1 ≔ 𝜎2:λ  # Φ.v+            morphed 𝑛·3·2 ≔ 𝑛·3·1+          𝛿·3·1 ≔ 𝔻(𝜎2:λ)+        𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.target)+        𝑛·3·3 ≔ 𝜎4:λ  # 𝑛 of L_peek         𝕄(𝑛·3·3):-          morphed 𝑛·3·4 := 𝜎4:λ-        𝑛·3·5 := 𝑛·3·4  # 𝕄(𝑛·3·3)+          morphed 𝑛·3·4 ≔ 𝜎4:λ+        𝑛·3·5 ≔ 𝑛·3·4  # 𝕄(𝑛·3·3)         memoized 𝑛·1·7 ⇛ 𝜎4:λ-        evaluated 𝑛·3·6 := 𝑛·3·5  # 𝑛·1·7-      𝑛5·1 := 𝑛·3·5  # 𝔼(𝑛2 of L_triple)+        evaluated 𝑛·3·6 ≔ 𝑛·3·5  # 𝑛·1·7+      𝑛5·1 ≔ 𝑛·3·5  # 𝔼(𝑛2 of L_triple)       recalled 𝑛·1·10 ⇒ 𝑛·1·1( target ↦ Φ.v )       recalled 𝑛·1·1 ⇒ Φ.dataized       𝔼(L_dataized):  # 𝔼(𝑛3 of L_triple)         renamed 𝑛·1·10 ⇛ 𝜎5:λ  # from 𝑛·1·3, 𝜎1 as 𝜎2, 𝜎3 as 𝜎5-        𝑛·4·1 := 𝜎5:λ  # 𝑛 of L_dataized-        𝑛·4·2 := 𝜎5:λ  # 𝕄(𝑛·4·1)-        evaluated 𝑛·4·3 := 𝑛·4·2  # 𝑛·1·10-      𝑛6·1 := 𝑛·4·2  # 𝔼(𝑛3 of L_triple)-      𝑛·1·12 := ⟦ a ↦ 𝜎3:λ, b ↦ 𝜎4:λ, c ↦ 𝜎5:λ ⟧:φ  # 𝑛 of L_triple+        𝑛·4·1 ≔ 𝜎5:λ  # 𝑛 of L_dataized+        𝑛·4·2 ≔ 𝜎5:λ  # 𝕄(𝑛·4·1)+        evaluated 𝑛·4·3 ≔ 𝑛·4·2  # 𝑛·1·10+      𝑛6·1 ≔ 𝑛·4·2  # 𝔼(𝑛3 of L_triple)+      𝑛·1·12 ≔ ⟦ a ↦ 𝜎3:λ, b ↦ 𝜎4:λ, c ↦ 𝜎5:λ ⟧:φ  # 𝑛 of L_triple       𝕄(𝑛·1·12):-        morphed 𝑛·1·13 := ⟦ a ↦ 𝜎3:λ, b ↦ 𝜎4:λ, c ↦ 𝜎5:λ ⟧:φ-      𝑛·1·14 := 𝑛·1·13  # 𝕄(𝑛·1·12)+        morphed 𝑛·1·13 ≔ ⟦ a ↦ 𝜎3:λ, b ↦ 𝜎4:λ, c ↦ 𝜎5:λ ⟧:φ+      𝑛·1·14 ≔ 𝑛·1·13  # 𝕄(𝑛·1·12)       memoized 𝑛·1·15 ⇛ 𝑛·1·14  # ⟦ a ↦ 𝑛·1·2, b ↦ 𝑛·1·6, c ↦ 𝑛·1·9, λ ⤍ L_triple ⟧-      evaluated 𝑛·1·16 := 𝑛·1·14  # 𝑛·1·15-    normalized 𝑛·0·1 := ⟦ a ↦ 𝜎3:λ, b ↦ 𝜎4:λ, c ↦ 𝜎5:λ ⟧  # 𝑛·1·16.φ-    morphed 𝑛·0·2 := 𝑛·0·1+      evaluated 𝑛·1·16 ≔ 𝑛·1·14  # 𝑛·1·15+    normalized 𝑛·0·1 ≔ ⟦ a ↦ 𝜎3:λ, b ↦ 𝜎4:λ, c ↦ 𝜎5:λ ⟧  # 𝑛·1·16.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/spends-a-step-on-every-firing-of-an-evaluate-line.yaml view
@@ -25,8 +25,8 @@     remembered 𝑛·0·1 ≡ Φ.loop  # ⟦ next🌵 ↦ Φ.loop, λ ⤍ L_loop ⟧     𝔼(L_loop):       𝕄(ξ.next🌵):-        morphed 𝑛·1·1 := 𝑛·0·1-      𝑛1·1 := 𝑛·0·1  # 𝕄(ξ.next🌵)+        morphed 𝑛·1·1 ≔ 𝑛·0·1+      𝑛1·1 ≔ 𝑛·0·1  # 𝕄(ξ.next🌵)       recalled 𝑛·0·1 ⇒ Φ.loop       𝔼(L_loop):  # 𝔼(𝑛1 of L_loop)         𝕄(ξ.next🌵):
test-resources/evaluate-packs/spends-the-step-budget-on-an-entry-answering-itself.yaml view
@@ -16,36 +16,36 @@ protocol: |   𝕄(Φ.x):     𝔼(L_loop):-      𝑛·1·1 := L_loop:λ  # 𝑛 of L_loop+      𝑛·1·1 ≔ L_loop:λ  # 𝑛 of L_loop       𝕄(𝑛·1·1):-        morphed 𝑛·1·2 := L_loop:λ-      𝑛·1·3 := L_loop:λ  # 𝕄(𝑛·1·1)-      evaluated 𝑛·1·4 := L_loop:λ  # L_loop:λ+        morphed 𝑛·1·2 ≔ L_loop:λ+      𝑛·1·3 ≔ L_loop:λ  # 𝕄(𝑛·1·1)+      evaluated 𝑛·1·4 ≔ L_loop:λ  # L_loop:λ     𝔼(L_loop):-      𝑛·2·1 := L_loop:λ  # 𝑛 of L_loop+      𝑛·2·1 ≔ L_loop:λ  # 𝑛 of L_loop       𝕄(𝑛·2·1):-        morphed 𝑛·2·2 := L_loop:λ-      𝑛·2·3 := L_loop:λ  # 𝕄(𝑛·2·1)-      evaluated 𝑛·2·4 := L_loop:λ  # L_loop:λ+        morphed 𝑛·2·2 ≔ L_loop:λ+      𝑛·2·3 ≔ L_loop:λ  # 𝕄(𝑛·2·1)+      evaluated 𝑛·2·4 ≔ L_loop:λ  # L_loop:λ     𝔼(L_loop):-      𝑛·3·1 := L_loop:λ  # 𝑛 of L_loop+      𝑛·3·1 ≔ L_loop:λ  # 𝑛 of L_loop       𝕄(𝑛·3·1):-        morphed 𝑛·3·2 := L_loop:λ-      𝑛·3·3 := L_loop:λ  # 𝕄(𝑛·3·1)-      evaluated 𝑛·3·4 := L_loop:λ  # L_loop:λ+        morphed 𝑛·3·2 ≔ L_loop:λ+      𝑛·3·3 ≔ L_loop:λ  # 𝕄(𝑛·3·1)+      evaluated 𝑛·3·4 ≔ L_loop:λ  # L_loop:λ     𝔼(L_loop):-      𝑛·4·1 := L_loop:λ  # 𝑛 of L_loop+      𝑛·4·1 ≔ L_loop:λ  # 𝑛 of L_loop       𝕄(𝑛·4·1):-        morphed 𝑛·4·2 := L_loop:λ-      𝑛·4·3 := L_loop:λ  # 𝕄(𝑛·4·1)-      evaluated 𝑛·4·4 := L_loop:λ  # L_loop:λ+        morphed 𝑛·4·2 ≔ L_loop:λ+      𝑛·4·3 ≔ L_loop:λ  # 𝕄(𝑛·4·1)+      evaluated 𝑛·4·4 ≔ L_loop:λ  # L_loop:λ     𝔼(L_loop):-      𝑛·5·1 := L_loop:λ  # 𝑛 of L_loop+      𝑛·5·1 ≔ L_loop:λ  # 𝑛 of L_loop       𝕄(𝑛·5·1):-        morphed 𝑛·5·2 := L_loop:λ-      𝑛·5·3 := L_loop:λ  # 𝕄(𝑛·5·1)-      evaluated 𝑛·5·4 := L_loop:λ  # L_loop:λ+        morphed 𝑛·5·2 ≔ L_loop:λ+      𝑛·5·3 ≔ L_loop:λ  # 𝕄(𝑛·5·1)+      evaluated 𝑛·5·4 ≔ L_loop:λ  # L_loop:λ     𝔼(L_loop):-      𝑛·6·1 := L_loop:λ  # 𝑛 of L_loop+      𝑛·6·1 ≔ L_loop:λ  # 𝑛 of L_loop       𝕄(𝑛·6·1):         starved 6
test-resources/evaluate-packs/starts-minting-after-the-symbols-the-program-carries.yaml view
@@ -16,54 +16,54 @@   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,     old ↦ ⟦ λ ⤍ 𝜎3 ⟧,-    φ ↦ 5.plus( 6 ).φ ⟧+    φ ↦ 5.plus( x ↦ 6 ).φ ⟧ result: '𝜎4:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ 6.0 )-    𝑛·0·6 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 6.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 6.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 6.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.number( φ ↦ 𝜎4:λ )  # 𝑛 of L_number_plus+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎4:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·22):-        𝑛·1·23 := Φ.number( φ ↦ 𝜎4:λ )-        𝑛·1·24 := ⟦ φ ↦ 𝜎4:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·1·25 := 𝑛·1·24-      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·6-    normalized 𝑛·0·7 := 𝜎4:λ  # 𝑛·1·27.φ-    morphed 𝑛·0·8 := 𝑛·0·7+        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎4:λ )+        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎4:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·1·25 ≔ 𝑛·1·24+      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ 𝜎4:λ  # 𝑛·1·27.φ+    morphed 𝑛·0·8 ≔ 𝑛·0·7
test-resources/evaluate-packs/takes-the-answer-of-a-firing-with-the-same-operands.yaml view
@@ -40,53 +40,53 @@     𝔼(L_pair):       𝕄(ξ.a):         remembered 𝑛·1·1 ≡ Φ.dataized  # ⟦ target ↦ ∅, λ ⤍ L_dataized ⟧-        𝑛·1·2 := Φ.dataized( target ↦ Φ.x )-        𝑛·1·3 := ⟦ target ↦ Φ.x, λ ⤍ L_dataized ⟧+        𝑛·1·2 ≔ Φ.dataized( target ↦ Φ.x )+        𝑛·1·3 ≔ ⟦ target ↦ Φ.x, λ ⤍ L_dataized ⟧         remembered 𝑛·1·3 ≡ 𝑛·1·1( target ↦ Φ.x )-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛1·1 := 𝑛·1·3  # 𝕄(ξ.a)+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·3  # 𝕄(ξ.a)       𝕄(ξ.b):-        𝑛·1·5 := Φ.dataized( target ↦ Φ.y )-        𝑛·1·6 := ⟦ target ↦ Φ.y, λ ⤍ L_dataized ⟧+        𝑛·1·5 ≔ Φ.dataized( target ↦ Φ.y )+        𝑛·1·6 ≔ ⟦ target ↦ Φ.y, λ ⤍ L_dataized ⟧         remembered 𝑛·1·6 ≡ 𝑛·1·1( target ↦ Φ.y )-        morphed 𝑛·1·7 := 𝑛·1·6-      𝑛2·1 := 𝑛·1·6  # 𝕄(ξ.b)+        morphed 𝑛·1·7 ≔ 𝑛·1·6+      𝑛2·1 ≔ 𝑛·1·6  # 𝕄(ξ.b)       recalled 𝑛·1·3 ⇒ 𝑛·1·1( target ↦ Φ.x )       recalled 𝑛·1·1 ⇒ Φ.dataized       𝔼(L_dataized):  # 𝔼(𝑛1 of L_pair)         𝔻(ξ.target):           𝕄(ξ.target):-            normalized 𝑛·2·1 := 01-:Δ  # Φ.x-            morphed 𝑛·2·2 := 01-:Δ-          𝛿·2·1 := 01--        𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.target)-        𝑛·2·3 := 𝜎1:λ  # 𝑛 of L_dataized+            normalized 𝑛·2·1 ≔ 01-:Δ  # Φ.x+            morphed 𝑛·2·2 ≔ 01-:Δ+          𝛿·2·1 ≔ 01-+        𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.target)+        𝑛·2·3 ≔ 𝜎1:λ  # 𝑛 of L_dataized         𝕄(𝑛·2·3):-          morphed 𝑛·2·4 := 𝜎1:λ-        𝑛·2·5 := 𝑛·2·4  # 𝕄(𝑛·2·3)+          morphed 𝑛·2·4 ≔ 𝜎1:λ+        𝑛·2·5 ≔ 𝑛·2·4  # 𝕄(𝑛·2·3)         memoized 𝑛·1·3 ⇛ 𝜎1:λ-        evaluated 𝑛·2·6 := 𝑛·2·5  # 𝑛·1·3-      𝑛3·1 := 𝑛·2·5  # 𝔼(𝑛1 of L_pair)+        evaluated 𝑛·2·6 ≔ 𝑛·2·5  # 𝑛·1·3+      𝑛3·1 ≔ 𝑛·2·5  # 𝔼(𝑛1 of L_pair)       recalled 𝑛·1·6 ⇒ 𝑛·1·1( target ↦ Φ.y )       recalled 𝑛·1·1 ⇒ Φ.dataized       𝔼(L_dataized):  # 𝔼(𝑛2 of L_pair)         𝔻(ξ.target):           𝕄(ξ.target):-            normalized 𝑛·3·1 := 01-:Δ  # Φ.y-            morphed 𝑛·3·2 := 01-:Δ-          𝛿·3·1 := 01--        𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.target)+            normalized 𝑛·3·1 ≔ 01-:Δ  # Φ.y+            morphed 𝑛·3·2 ≔ 01-:Δ+          𝛿·3·1 ≔ 01-+        𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.target)         recalled 𝑛·1·3 ⇒ 𝜎1:λ-        𝑛·3·3 := 𝑛3·1  # 𝑛 of L_dataized-        𝑛·3·4 := 𝑛3·1  # 𝕄(𝑛·3·3)+        𝑛·3·3 ≔ 𝑛3·1  # 𝑛 of L_dataized+        𝑛·3·4 ≔ 𝑛3·1  # 𝕄(𝑛·3·3)         memoized 𝑛·1·6 ⇛ 𝜎1:λ-        evaluated 𝑛·3·5 := 𝑛·3·4  # 𝑛·1·6-      𝑛4·1 := 𝑛·3·4  # 𝔼(𝑛2 of L_pair)-      𝑛·1·8 := ⟦ a ↦ 𝜎1:λ, b ↦ 𝜎1:λ ⟧:φ  # 𝑛 of L_pair+        evaluated 𝑛·3·5 ≔ 𝑛·3·4  # 𝑛·1·6+      𝑛4·1 ≔ 𝑛·3·4  # 𝔼(𝑛2 of L_pair)+      𝑛·1·8 ≔ ⟦ a ↦ 𝜎1:λ, b ↦ 𝜎1:λ ⟧:φ  # 𝑛 of L_pair       𝕄(𝑛·1·8):-        morphed 𝑛·1·9 := ⟦ a ↦ 𝜎1:λ, b ↦ 𝜎1:λ ⟧:φ-      𝑛·1·10 := 𝑛·1·9  # 𝕄(𝑛·1·8)+        morphed 𝑛·1·9 ≔ ⟦ a ↦ 𝜎1:λ, b ↦ 𝜎1:λ ⟧:φ+      𝑛·1·10 ≔ 𝑛·1·9  # 𝕄(𝑛·1·8)       memoized 𝑛·1·11 ⇛ 𝑛·1·10  # ⟦ a ↦ 𝑛·1·2, b ↦ 𝑛·1·5, λ ⤍ L_pair ⟧-      evaluated 𝑛·1·12 := 𝑛·1·10  # 𝑛·1·11-    normalized 𝑛·0·1 := ⟦ a ↦ 𝜎1:λ, b ↦ 𝜎1:λ ⟧  # 𝑛·1·12.φ-    morphed 𝑛·0·2 := 𝑛·0·1+      evaluated 𝑛·1·12 ≔ 𝑛·1·10  # 𝑛·1·11+    normalized 𝑛·0·1 ≔ ⟦ a ↦ 𝜎1:λ, b ↦ 𝜎1:λ ⟧  # 𝑛·1·12.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
+ test-resources/evaluate-packs/takes-the-formation-a-bare-symbol-faces-in-a-join.yaml view
@@ -0,0 +1,46 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# The left side is a bare symbol, which stands for a value nobody worked out,+# and the right side is a formation, which no formation could join with the+# symbol, since it would ask the symbol for 'k' it does not bind. The join+# takes the symbol for the formation and answers the formation as it is,+# writing an 'assumed' line, so the run goes on rather than getting stuck+# (#2469).+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.c+    morph:+      𝑛1: $.a+      𝑛2: $.b+    join:+      on: 𝛿1+      left: 𝑛1+      right: 𝑛2+      otherwise: L_fork+location: 'Q.app'+input: '⟦ x ↦ ⟦ λ ⤍ 𝜎1 ⟧, y ↦ ⟦ λ ⤍ 𝜎2 ⟧, app ↦ ⟦ c ↦ Φ.x, a ↦ Φ.y, b ↦ ⟦ k ↦ ⟦ Δ ⤍ 2A- ⟧ ⟧, λ ⤍ L_fork ⟧.k ⟧'+result: '⟦ Δ ⤍ 2A- ⟧'+protocol: |+  𝕄(Φ.app):+    𝔼(L_fork):+      𝔻(ξ.c):+        𝕄(ξ.c):+          normalized 𝑛·1·1 ≔ 𝜎1:λ  # Φ.x+          morphed 𝑛·1·2 ≔ 𝑛·1·1+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)+      𝕄(ξ.a):+        normalized 𝑛·1·3 ≔ 𝜎2:λ  # Φ.y+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛1·1 ≔ 𝑛·1·3  # 𝕄(ξ.a)+      𝕄(ξ.b):+        morphed 𝑛·1·5 ≔ 2A-:Δ:k+      𝑛2·1 ≔ 𝑛·1·5  # 𝕄(ξ.b)+      assumed 𝜎2:λ ≡ 𝑛2·1+      𝑛·1·6 ≔ 𝑛·1·5+      evaluated 𝑛·1·7 ≔ 𝑛·1·6  # ⟦ c ↦ Φ.x, a ↦ Φ.y, b ↦ 𝑛·1·6, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ 2A-:Δ  # 𝑛·1·7.k+    morphed 𝑛·0·2 ≔ 2A-:Δ
+ test-resources/evaluate-packs/takes-the-formation-a-bare-symbol-faces-on-the-right-of-a-join.yaml view
@@ -0,0 +1,46 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+# yamllint disable rule:line-length+# The right side is a bare symbol, which stands for a value nobody worked out,+# and the left side is a formation, which no formation could join with the+# symbol, since it would ask the symbol for 'k' it does not bind. The join+# takes the symbol for the formation and answers the formation as it is,+# writing an 'assumed' line, so the run goes on rather than getting stuck+# (#2469).+symbolic: |+  - λ: L_fork+    dataize:+      𝛿1: $.c+    morph:+      𝑛1: $.a+      𝑛2: $.b+    join:+      on: 𝛿1+      left: 𝑛1+      right: 𝑛2+      otherwise: L_fork+location: 'Q.app'+input: '⟦ x ↦ ⟦ λ ⤍ 𝜎1 ⟧, y ↦ ⟦ λ ⤍ 𝜎2 ⟧, app ↦ ⟦ c ↦ Φ.x, a ↦ ⟦ k ↦ ⟦ Δ ⤍ 2A- ⟧ ⟧, b ↦ Φ.y, λ ⤍ L_fork ⟧.k ⟧'+result: '⟦ Δ ⤍ 2A- ⟧'+protocol: |+  𝕄(Φ.app):+    𝔼(L_fork):+      𝔻(ξ.c):+        𝕄(ξ.c):+          normalized 𝑛·1·1 ≔ 𝜎1:λ  # Φ.x+          morphed 𝑛·1·2 ≔ 𝑛·1·1+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)+      𝕄(ξ.a):+        morphed 𝑛·1·3 ≔ 2A-:Δ:k+      𝑛1·1 ≔ 𝑛·1·3  # 𝕄(ξ.a)+      𝕄(ξ.b):+        normalized 𝑛·1·4 ≔ 𝜎2:λ  # Φ.y+        morphed 𝑛·1·5 ≔ 𝑛·1·4+      𝑛2·1 ≔ 𝑛·1·4  # 𝕄(ξ.b)+      assumed 𝜎2:λ ≡ 𝑛1·1+      𝑛·1·6 ≔ 𝑛·1·3+      evaluated 𝑛·1·7 ≔ 𝑛·1·6  # ⟦ c ↦ Φ.x, a ↦ 𝑛·1·6, b ↦ Φ.y, λ ⤍ L_fork ⟧+    normalized 𝑛·0·1 ≔ 2A-:Δ  # 𝑛·1·7.k+    morphed 𝑛·0·2 ≔ 2A-:Δ
test-resources/evaluate-packs/takes-the-one-term-both-sides-of-a-join-come-to.yaml view
@@ -29,125 +29,125 @@     number(φ) ↦ ⟦       gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧,       plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    φ ↦ 5.gt( 0 ).if( 1.plus( 2 ), 1.plus( 2 ) ).φ ⟧+    φ ↦ 5.gt( x ↦ 0 ).if( then ↦ 1.plus( x ↦ 2 ), else ↦ 1.plus( x ↦ 2 ) ).φ ⟧ result: '𝜎2:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := 5.0-    𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·3.gt-    𝑛·0·5 := 𝑛·0·2.gt( x ↦ 0.0 )-    𝑛·0·6 := ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ 5.0+    𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·3.gt+    𝑛·0·5 ≔ 𝑛·0·2.gt( x ↦ 0.0 )+    𝑛·0·6 ≔ ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧     𝔼(L_number_gt):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 0.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 0.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 00-00-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 00-00-00-00-00-00-00-00  # 0.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 00-00-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 00-00-00-00-00-00-00-00  # 0.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt       𝕄(𝑛·1·22):-        normalized 𝑛·1·23 := ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool-        𝑛·1·24 := Φ.bool( φ ↦ 𝜎1:λ )-        𝑛·1·25 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-        morphed 𝑛·1·26 := 𝑛·1·25-      𝑛·1·27 := 𝑛·1·26  # 𝕄(𝑛·1·22)-      evaluated 𝑛·1·28 := 𝑛·1·27  # 𝑛·0·6-    normalized 𝑛·0·7 := ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if-    shared 𝑛·1 := 1.0.plus( 2.0 )-    𝑛·0·8 := 𝑛·1·24.if( then ↦ 𝑛·1 )-    𝑛·0·9 := ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧-    𝑛·0·10 := 𝑛·0·9( else ↦ 𝑛·1 )-    𝑛·0·11 := ⟦ then ↦ 𝑛·1, else ↦ 𝑛·1, λ ⤍ L_fork ⟧+        normalized 𝑛·1·23 ≔ ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool+        𝑛·1·24 ≔ Φ.bool( φ ↦ 𝜎1:λ )+        𝑛·1·25 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+        morphed 𝑛·1·26 ≔ 𝑛·1·25+      𝑛·1·27 ≔ 𝑛·1·26  # 𝕄(𝑛·1·22)+      evaluated 𝑛·1·28 ≔ 𝑛·1·27  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if+    shared 𝑛·1 ≔ 1.0.plus( x ↦ 2.0 )+    𝑛·0·8 ≔ 𝑛·1·24.if( then ↦ 𝑛·1 )+    𝑛·0·9 ≔ ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧+    𝑛·0·10 ≔ 𝑛·0·9( else ↦ 𝑛·1 )+    𝑛·0·11 ≔ ⟦ then ↦ 𝑛·1, else ↦ 𝑛·1, λ ⤍ L_fork ⟧     𝔼(L_fork):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·2·1 := Φ.bool( φ ↦ 𝜎1:λ )-          𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-          morphed 𝑛·2·3 := 𝑛·1·27-        boxed 𝑛·2·4 := 𝑛·2·3.φ-        normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4-        𝛿·2·1 := 𝔻(𝜎1:λ)-      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+          𝑛·2·1 ≔ Φ.bool( φ ↦ 𝜎1:λ )+          𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+          morphed 𝑛·2·3 ≔ 𝑛·1·27+        boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+        normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4+        𝛿·2·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)       𝕄(ξ.then):-        𝑛·2·6 := 1.0-        𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·8 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus-        𝑛·2·9 := 𝑛·2·6.plus( x ↦ 2.0 )-        𝑛·2·10 := ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·11 := 𝑛·2·10+        𝑛·2·6 ≔ 1.0+        𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·8 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus+        𝑛·2·9 ≔ 𝑛·2·6.plus( x ↦ 2.0 )+        𝑛·2·10 ≔ ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·11 ≔ 𝑛·2·10       𝕄(ξ.else):-        𝑛·2·12 := 1.0-        𝑛·2·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·14 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·13.plus-        𝑛·2·15 := 𝑛·2·12.plus( x ↦ 2.0 )-        𝑛·2·16 := ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·17 := 𝑛·2·16-      𝑛·2·18 := 𝑛·2·16-      evaluated 𝑛·2·19 := 𝑛·2·16  # 𝑛·0·11+        𝑛·2·12 ≔ 1.0+        𝑛·2·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·14 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·13.plus+        𝑛·2·15 ≔ 𝑛·2·12.plus( x ↦ 2.0 )+        𝑛·2·16 ≔ ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·17 ≔ 𝑛·2·16+      𝑛·2·18 ≔ 𝑛·2·16+      evaluated 𝑛·2·19 ≔ 𝑛·2·16  # 𝑛·0·11     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·3·1 := 1.0-          𝑛·3·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·3·3 := 𝑛·3·2-        boxed 𝑛·3·4 := 𝑛·3·3.φ-        normalized 𝑛·3·5 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·3·4+          𝑛·3·1 ≔ 1.0+          𝑛·3·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·3·3 ≔ 𝑛·3·2+        boxed 𝑛·3·4 ≔ 𝑛·3·3.φ+        normalized 𝑛·3·5 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·3·4         𝕄(𝑛·3·4):-          𝑛·3·6 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )-          𝑛·3·7 := 3F-F0-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·3·8 := 𝑛·3·7-        boxed 𝑛·3·9 := 𝑛·3·8.φ-        normalized 𝑛·3·10 := 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·3·9-        𝛿·3·1 := 3F-F0-00-00-00-00-00-00  # 1.0-      𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.ρ)+          𝑛·3·6 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )+          𝑛·3·7 ≔ 3F-F0-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·3·8 ≔ 𝑛·3·7+        boxed 𝑛·3·9 ≔ 𝑛·3·8.φ+        normalized 𝑛·3·10 ≔ 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·3·9+        𝛿·3·1 ≔ 3F-F0-00-00-00-00-00-00  # 1.0+      𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·3·11 := 2.0-          𝑛·3·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·3·13 := 𝑛·3·12-        boxed 𝑛·3·14 := 𝑛·3·13.φ-        normalized 𝑛·3·15 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·3·14+          𝑛·3·11 ≔ 2.0+          𝑛·3·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·3·13 ≔ 𝑛·3·12+        boxed 𝑛·3·14 ≔ 𝑛·3·13.φ+        normalized 𝑛·3·15 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·3·14         𝕄(𝑛·3·14):-          𝑛·3·16 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )-          𝑛·3·17 := 40-00-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·3·18 := 𝑛·3·17-        boxed 𝑛·3·19 := 𝑛·3·18.φ-        normalized 𝑛·3·20 := 40-00-00-00-00-00-00-00:Δ  # 𝑛·3·19-        𝛿·3·2 := 40-00-00-00-00-00-00-00  # 2.0-      𝛿2·3 := 𝛿·3·2  # 𝔻(ξ.x)-      𝑛·3·21 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus+          𝑛·3·16 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )+          𝑛·3·17 ≔ 40-00-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·3·18 ≔ 𝑛·3·17+        boxed 𝑛·3·19 ≔ 𝑛·3·18.φ+        normalized 𝑛·3·20 ≔ 40-00-00-00-00-00-00-00:Δ  # 𝑛·3·19+        𝛿·3·2 ≔ 40-00-00-00-00-00-00-00  # 2.0+      𝛿2·3 ≔ 𝛿·3·2  # 𝔻(ξ.x)+      𝑛·3·21 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·3·21):-        𝑛·3·22 := Φ.number( φ ↦ 𝜎2:λ )-        𝑛·3·23 := ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·3·24 := 𝑛·3·23-      𝑛·3·25 := 𝑛·3·24  # 𝕄(𝑛·3·21)-      evaluated 𝑛·3·26 := 𝑛·3·25  # 𝑛·2·16-    normalized 𝑛·0·12 := 𝜎2:λ  # 𝑛·3·26.φ-    morphed 𝑛·0·13 := 𝑛·0·12+        𝑛·3·22 ≔ Φ.number( φ ↦ 𝜎2:λ )+        𝑛·3·23 ≔ ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·3·24 ≔ 𝑛·3·23+      𝑛·3·25 ≔ 𝑛·3·24  # 𝕄(𝑛·3·21)+      evaluated 𝑛·3·26 ≔ 𝑛·3·25  # 𝑛·2·16+    normalized 𝑛·0·12 ≔ 𝜎2:λ  # 𝑛·3·26.φ+    morphed 𝑛·0·13 ≔ 𝑛·0·12
test-resources/evaluate-packs/tells-two-carried-symbols-apart-in-one-firing.yaml view
@@ -16,41 +16,41 @@   ⟦ bytes(φ) ↦ ⟦⟧,     number(φ) ↦ ⟦ plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,     φ ↦ Φ.number( φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ).plus(-          Φ.number( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ) ).φ ⟧+          x ↦ Φ.number( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ) ).φ ⟧ result: '𝜎6:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·2 := Φ.number( φ ↦ 𝜎2:λ )-    𝑛·0·3 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus-    𝑛·0·5 := 𝑛·0·2.plus( x ↦ Φ.number( φ ↦ 𝜎5:λ ) )-    𝑛·0·6 := ⟦ x ↦ Φ.number( φ ↦ 𝜎5:λ ), λ ⤍ L_number_plus ⟧+    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·2 ≔ Φ.number( φ ↦ 𝜎2:λ )+    𝑛·0·3 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus+    𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ Φ.number( φ ↦ 𝜎5:λ ) )+    𝑛·0·6 ≔ ⟦ x ↦ Φ.number( φ ↦ 𝜎5:λ ), λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := Φ.number( φ ↦ 𝜎2:λ )-          𝑛·1·2 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := 𝜎2:λ  # 𝑛·1·4-        𝛿·1·1 := 𝔻(𝜎2:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          𝑛·1·1 ≔ Φ.number( φ ↦ 𝜎2:λ )+          𝑛·1·2 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ 𝜎2:λ  # 𝑛·1·4+        𝛿·1·1 ≔ 𝔻(𝜎2:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·6 := Φ.number( φ ↦ 𝜎5:λ )-          𝑛·1·7 := ⟦ φ ↦ 𝜎5:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·8 := 𝑛·1·7-        boxed 𝑛·1·9 := 𝑛·1·8.φ-        normalized 𝑛·1·10 := 𝜎5:λ  # 𝑛·1·9-        𝛿·1·2 := 𝔻(𝜎5:λ)-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·11 := Φ.number( φ ↦ 𝜎6:λ )  # 𝑛 of L_number_plus+          𝑛·1·6 ≔ Φ.number( φ ↦ 𝜎5:λ )+          𝑛·1·7 ≔ ⟦ φ ↦ 𝜎5:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·8 ≔ 𝑛·1·7+        boxed 𝑛·1·9 ≔ 𝑛·1·8.φ+        normalized 𝑛·1·10 ≔ 𝜎5:λ  # 𝑛·1·9+        𝛿·1·2 ≔ 𝔻(𝜎5:λ)+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·11 ≔ Φ.number( φ ↦ 𝜎6:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·1·11):-        𝑛·1·12 := Φ.number( φ ↦ 𝜎6:λ )-        𝑛·1·13 := ⟦ φ ↦ 𝜎6:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·1·14 := 𝑛·1·13-      𝑛·1·15 := 𝑛·1·14  # 𝕄(𝑛·1·11)-      evaluated 𝑛·1·16 := 𝑛·1·15  # 𝑛·0·6-    normalized 𝑛·0·7 := 𝜎6:λ  # 𝑛·1·16.φ-    morphed 𝑛·0·8 := 𝑛·0·7+        𝑛·1·12 ≔ Φ.number( φ ↦ 𝜎6:λ )+        𝑛·1·13 ≔ ⟦ φ ↦ 𝜎6:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·1·14 ≔ 𝑛·1·13+      𝑛·1·15 ≔ 𝑛·1·14  # 𝕄(𝑛·1·11)+      evaluated 𝑛·1·16 ≔ 𝑛·1·15  # 𝑛·0·6+    normalized 𝑛·0·7 ≔ 𝜎6:λ  # 𝑛·1·16.φ+    morphed 𝑛·0·8 ≔ 𝑛·0·7
test-resources/evaluate-packs/tells-two-symbols-of-one-datum-apart-between-firings.yaml view
@@ -27,81 +27,81 @@     dataized(target) ↦ L_dataized:λ,     pair(x, y) ↦ L_pair:λ,     φ ↦ Φ.pair(-      Φ.dataized( Φ.bytes( φ ↦ 𝜎1:λ ) ).φ,-      Φ.dataized( Φ.bytes( φ ↦ 𝜎2:λ ) ).φ ).φ ⟧+      x ↦ Φ.dataized( target ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).φ,+      y ↦ Φ.dataized( target ↦ Φ.bytes( φ ↦ 𝜎2:λ ) ).φ ).φ ⟧ result: '⟦ x ↦ 𝜎3:λ, y ↦ 𝜎4:λ ⟧' protocol: |   𝕄(Φ.φ):     remembered 𝑛·0·1 ≡ Φ.pair  # ⟦ x ↦ ∅, y ↦ ∅, λ ⤍ L_pair ⟧-    shared 𝑛·1 := Φ.dataized( Φ.bytes( φ ↦ 𝜎1:λ ) ).φ-    𝑛·0·2 := Φ.pair( x ↦ 𝑛·1 )-    𝑛·0·3 := ⟦ x ↦ 𝑛·1, y ↦ ∅, λ ⤍ L_pair ⟧+    shared 𝑛·1 ≔ Φ.dataized( target ↦ Φ.bytes( φ ↦ 𝜎1:λ ) ).φ+    𝑛·0·2 ≔ Φ.pair( x ↦ 𝑛·1 )+    𝑛·0·3 ≔ ⟦ x ↦ 𝑛·1, y ↦ ∅, λ ⤍ L_pair ⟧     remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ 𝑛·1 )-    shared 𝑛·2 := Φ.dataized( Φ.bytes( φ ↦ 𝜎2:λ ) ).φ-    𝑛·0·4 := 𝑛·0·3( y ↦ 𝑛·2 )-    𝑛·0·5 := ⟦ x ↦ 𝑛·1, y ↦ 𝑛·2, λ ⤍ L_pair ⟧+    shared 𝑛·2 ≔ Φ.dataized( target ↦ Φ.bytes( φ ↦ 𝜎2:λ ) ).φ+    𝑛·0·4 ≔ 𝑛·0·3( y ↦ 𝑛·2 )+    𝑛·0·5 ≔ ⟦ x ↦ 𝑛·1, y ↦ 𝑛·2, λ ⤍ L_pair ⟧     remembered 𝑛·0·5 ≡ 𝑛·0·4     𝔼(L_pair):       𝕄(ξ.x):         remembered 𝑛·1·1 ≡ Φ.dataized  # ⟦ target ↦ ∅, λ ⤍ L_dataized ⟧-        𝑛·1·2 := Φ.dataized( target ↦ Φ.bytes( φ ↦ 𝜎1:λ ) )-        𝑛·1·3 := ⟦ target ↦ Φ.bytes( φ ↦ 𝜎1:λ ), λ ⤍ L_dataized ⟧+        𝑛·1·2 ≔ Φ.dataized( target ↦ Φ.bytes( φ ↦ 𝜎1:λ ) )+        𝑛·1·3 ≔ ⟦ target ↦ Φ.bytes( φ ↦ 𝜎1:λ ), λ ⤍ L_dataized ⟧         remembered 𝑛·1·3 ≡ 𝑛·1·1( target ↦ Φ.bytes( φ ↦ 𝜎1:λ ) )         𝔼(L_dataized):           𝔻(ξ.target):             𝕄(ξ.target):-              normalized 𝑛·2·1 := ∅:φ  # Φ.bytes-              𝑛·2·2 := Φ.bytes( φ ↦ 𝜎1:λ )-              𝑛·2·3 := 𝜎1:λ:φ-              morphed 𝑛·2·4 := 𝑛·2·3-            boxed 𝑛·2·5 := 𝑛·2·4.φ-            normalized 𝑛·2·6 := 𝜎1:λ  # 𝑛·2·5-            𝛿·2·1 := 𝔻(𝜎1:λ)-          𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.target)-          𝑛·2·7 := Φ.bytes( φ ↦ 𝜎3:λ )  # 𝑛 of L_dataized+              normalized 𝑛·2·1 ≔ ∅:φ  # Φ.bytes+              𝑛·2·2 ≔ Φ.bytes( φ ↦ 𝜎1:λ )+              𝑛·2·3 ≔ 𝜎1:λ:φ+              morphed 𝑛·2·4 ≔ 𝑛·2·3+            boxed 𝑛·2·5 ≔ 𝑛·2·4.φ+            normalized 𝑛·2·6 ≔ 𝜎1:λ  # 𝑛·2·5+            𝛿·2·1 ≔ 𝔻(𝜎1:λ)+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.target)+          𝑛·2·7 ≔ Φ.bytes( φ ↦ 𝜎3:λ )  # 𝑛 of L_dataized           𝕄(𝑛·2·7):-            𝑛·2·8 := Φ.bytes( φ ↦ 𝜎3:λ )-            𝑛·2·9 := 𝜎3:λ:φ-            morphed 𝑛·2·10 := 𝑛·2·9-          𝑛·2·11 := 𝑛·2·10  # 𝕄(𝑛·2·7)+            𝑛·2·8 ≔ Φ.bytes( φ ↦ 𝜎3:λ )+            𝑛·2·9 ≔ 𝜎3:λ:φ+            morphed 𝑛·2·10 ≔ 𝑛·2·9+          𝑛·2·11 ≔ 𝑛·2·10  # 𝕄(𝑛·2·7)           remembered 𝑛·2·11 ≡ 𝑛·1·3           memoized 𝑛·1·3 ⇛ 𝑛·2·11-          evaluated 𝑛·2·12 := 𝑛·2·11  # 𝑛·1·3-        normalized 𝑛·1·4 := 𝜎3:λ  # 𝑛·2·12.φ-        morphed 𝑛·1·5 := 𝑛·1·4-      𝑛1·1 := 𝑛·1·4  # 𝕄(ξ.x)+          evaluated 𝑛·2·12 ≔ 𝑛·2·11  # 𝑛·1·3+        normalized 𝑛·1·4 ≔ 𝜎3:λ  # 𝑛·2·12.φ+        morphed 𝑛·1·5 ≔ 𝑛·1·4+      𝑛1·1 ≔ 𝑛·1·4  # 𝕄(ξ.x)       𝕄(ξ.y):-        𝑛·1·6 := Φ.dataized( target ↦ Φ.bytes( φ ↦ 𝜎2:λ ) )-        𝑛·1·7 := ⟦ target ↦ Φ.bytes( φ ↦ 𝜎2:λ ), λ ⤍ L_dataized ⟧+        𝑛·1·6 ≔ Φ.dataized( target ↦ Φ.bytes( φ ↦ 𝜎2:λ ) )+        𝑛·1·7 ≔ ⟦ target ↦ Φ.bytes( φ ↦ 𝜎2:λ ), λ ⤍ L_dataized ⟧         remembered 𝑛·1·7 ≡ 𝑛·1·1( target ↦ Φ.bytes( φ ↦ 𝜎2:λ ) )         𝔼(L_dataized):           𝔻(ξ.target):             𝕄(ξ.target):-              𝑛·3·1 := Φ.bytes( φ ↦ 𝜎2:λ )-              𝑛·3·2 := 𝜎2:λ:φ-              morphed 𝑛·3·3 := 𝑛·3·2-            boxed 𝑛·3·4 := 𝑛·3·3.φ-            normalized 𝑛·3·5 := 𝜎2:λ  # 𝑛·3·4-            𝛿·3·1 := 𝔻(𝜎2:λ)-          𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.target)-          𝑛·3·6 := Φ.bytes( φ ↦ 𝜎4:λ )  # 𝑛 of L_dataized+              𝑛·3·1 ≔ Φ.bytes( φ ↦ 𝜎2:λ )+              𝑛·3·2 ≔ 𝜎2:λ:φ+              morphed 𝑛·3·3 ≔ 𝑛·3·2+            boxed 𝑛·3·4 ≔ 𝑛·3·3.φ+            normalized 𝑛·3·5 ≔ 𝜎2:λ  # 𝑛·3·4+            𝛿·3·1 ≔ 𝔻(𝜎2:λ)+          𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.target)+          𝑛·3·6 ≔ Φ.bytes( φ ↦ 𝜎4:λ )  # 𝑛 of L_dataized           𝕄(𝑛·3·6):-            𝑛·3·7 := Φ.bytes( φ ↦ 𝜎4:λ )-            𝑛·3·8 := 𝜎4:λ:φ-            morphed 𝑛·3·9 := 𝑛·3·8-          𝑛·3·10 := 𝑛·3·9  # 𝕄(𝑛·3·6)+            𝑛·3·7 ≔ Φ.bytes( φ ↦ 𝜎4:λ )+            𝑛·3·8 ≔ 𝜎4:λ:φ+            morphed 𝑛·3·9 ≔ 𝑛·3·8+          𝑛·3·10 ≔ 𝑛·3·9  # 𝕄(𝑛·3·6)           remembered 𝑛·3·10 ≡ 𝑛·1·7           memoized 𝑛·1·7 ⇛ 𝑛·3·10-          evaluated 𝑛·3·11 := 𝑛·3·10  # 𝑛·1·7-        normalized 𝑛·1·8 := 𝜎4:λ  # 𝑛·3·11.φ-        morphed 𝑛·1·9 := 𝑛·1·8-      𝑛2·1 := 𝑛·1·8  # 𝕄(ξ.y)-      𝑛·1·10 := ⟦ x ↦ 𝜎3:λ, y ↦ 𝜎4:λ ⟧:φ  # 𝑛 of L_pair+          evaluated 𝑛·3·11 ≔ 𝑛·3·10  # 𝑛·1·7+        normalized 𝑛·1·8 ≔ 𝜎4:λ  # 𝑛·3·11.φ+        morphed 𝑛·1·9 ≔ 𝑛·1·8+      𝑛2·1 ≔ 𝑛·1·8  # 𝕄(ξ.y)+      𝑛·1·10 ≔ ⟦ x ↦ 𝜎3:λ, y ↦ 𝜎4:λ ⟧:φ  # 𝑛 of L_pair       𝕄(𝑛·1·10):-        morphed 𝑛·1·11 := ⟦ x ↦ 𝜎3:λ, y ↦ 𝜎4:λ ⟧:φ-      𝑛·1·12 := 𝑛·1·11  # 𝕄(𝑛·1·10)+        morphed 𝑛·1·11 ≔ ⟦ x ↦ 𝜎3:λ, y ↦ 𝜎4:λ ⟧:φ+      𝑛·1·12 ≔ 𝑛·1·11  # 𝕄(𝑛·1·10)       remembered 𝑛·1·12 ≡ 𝑛·0·5       memoized 𝑛·0·5 ⇛ 𝑛·1·12-      evaluated 𝑛·1·13 := 𝑛·1·12  # 𝑛·0·5-    normalized 𝑛·0·6 := ⟦ x ↦ 𝜎3:λ, y ↦ 𝜎4:λ ⟧  # 𝑛·1·13.φ-    morphed 𝑛·0·7 := 𝑛·0·6+      evaluated 𝑛·1·13 ≔ 𝑛·1·12  # 𝑛·0·5+    normalized 𝑛·0·6 ≔ ⟦ x ↦ 𝜎3:λ, y ↦ 𝜎4:λ ⟧  # 𝑛·1·13.φ+    morphed 𝑛·0·7 ≔ 𝑛·0·6
test-resources/evaluate-packs/tells-why-a-join-fabricated-nothing-of-a-side-that-is-no-formation.yaml view
@@ -33,10 +33,10 @@   𝕄(Φ.y):     𝔼(L_fork):       𝔻(ξ.c):-        𝛿·1·1 := 𝔻(𝜎1:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.c)+        𝛿·1·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.c)       𝕄(ξ.a):-        morphed 𝑛·1·1 := Φ.k:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.a)-      𝑛2·1 := Φ.k  # rewrite(𝑛1 of L_fork)+        morphed 𝑛·1·1 ≔ Φ.k:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.a)+      𝑛2·1 ≔ Φ.k  # rewrite(𝑛1 of L_fork)       diverged 𝑛1·1 vs 𝑛2·1  # cannot join: the left side is 𝑛·1·1 and the right side is Φ.k; cannot fabricate: the right side is no formation
test-resources/evaluate-packs/undresses-a-formation-twice-to-reach-what-it-wraps.yaml view
@@ -22,20 +22,20 @@   𝕄(Φ.y):     𝔼(L_peel):       𝕄(ξ.x):-        morphed 𝑛·1·1 := Φ.z:φ:φ-      𝑛1·1 := 𝑛·1·1  # 𝕄(ξ.x)-      undressed 𝑛·1·2 := 𝑛·1·1.φ+        morphed 𝑛·1·1 ≔ Φ.z:φ:φ+      𝑛1·1 ≔ 𝑛·1·1  # 𝕄(ξ.x)+      undressed 𝑛·1·2 ≔ 𝑛·1·1.φ       𝕄(𝑛·1·2):-        morphed 𝑛·1·3 := Φ.z:φ-      undressed 𝑛·1·4 := 𝑛·1·3.φ+        morphed 𝑛·1·3 ≔ Φ.z:φ+      undressed 𝑛·1·4 ≔ 𝑛·1·3.φ       𝕄(𝑛·1·4):-        normalized 𝑛·1·5 := ⟦ t(k) ↦ ⟦⟧ ⟧  # Φ.z-        morphed 𝑛·1·6 := 𝑛·1·5-      𝑛2·1 := 𝑛·1·6  # undress(𝑛1 of L_peel)-      𝑛·1·7 := 𝑛·1·6  # 𝑛 of L_peel+        normalized 𝑛·1·5 ≔ ⟦ t(k) ↦ ⟦⟧ ⟧  # Φ.z+        morphed 𝑛·1·6 ≔ 𝑛·1·5+      𝑛2·1 ≔ 𝑛·1·6  # undress(𝑛1 of L_peel)+      𝑛·1·7 ≔ 𝑛·1·6  # 𝑛 of L_peel       𝕄(𝑛·1·7):-        morphed 𝑛·1·8 := 𝑛·1·6-      𝑛·1·9 := 𝑛·1·8  # 𝕄(𝑛·1·7)-      evaluated 𝑛·1·10 := 𝑛·1·9  # ⟦ λ ⤍ L_peel, x ↦ 𝑛·1·1 ⟧-    normalized 𝑛·0·1 := ∅:k  # 𝑛·1·10.t-    morphed 𝑛·0·2 := 𝑛·0·1+        morphed 𝑛·1·8 ≔ 𝑛·1·6+      𝑛·1·9 ≔ 𝑛·1·8  # 𝕄(𝑛·1·7)+      evaluated 𝑛·1·10 ≔ 𝑛·1·9  # ⟦ λ ⤍ L_peel, x ↦ 𝑛·1·1 ⟧+    normalized 𝑛·0·1 ≔ ∅:k  # 𝑛·1·10.t+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/undresses-a-formation-wrapping-itself-until-the-steps-run-out.yaml view
@@ -23,11 +23,11 @@     𝔼(L_peel):       𝕄(ξ.x):         remembered 𝑛·1·1 ≡ Φ.w  # Φ.w:φ-        morphed 𝑛·1·2 := 𝑛·1·1-      𝑛1·1 := 𝑛·1·2  # 𝕄(ξ.x)-      undressed 𝑛·1·3 := 𝑛·1·2.φ+        morphed 𝑛·1·2 ≔ 𝑛·1·1+      𝑛1·1 ≔ 𝑛·1·2  # 𝕄(ξ.x)+      undressed 𝑛·1·3 ≔ 𝑛·1·2.φ       𝕄(𝑛·1·3):-        morphed 𝑛·1·4 := 𝑛·1·2-      undressed 𝑛·1·5 := 𝑛·1·4.φ+        morphed 𝑛·1·4 ≔ 𝑛·1·2+      undressed 𝑛·1·5 ≔ 𝑛·1·4.φ       𝕄(𝑛·1·5):         starved 6
test-resources/evaluate-packs/work-out-an-argument-that-comes-to-a-hanging-object.yaml view
@@ -28,7 +28,7 @@       left: 𝑛3       right: 𝑛4 location: 'Q.y'-input: '⟦ box(x, w) ↦ ⟦ φ ↦ x.next ⟧, done ↦ ⟦⟧, hang(x) ↦ ⟦ φ ↦ ξ.x ⟧, num(φ) ↦ ⟦⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ x ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ λ ⤍ 𝜎3 ⟧, b ↦ Φ.box( x ↦ Φ.items.tail, w ↦ Φ.hang( Φ.num( φ ↦ ⟦ λ ⤍ 𝜎4 ⟧ ) ) ), λ ⤍ L_fork ⟧, λ ⤍ L_inc ⟧.φ ⟧'+input: '⟦ box(x, w) ↦ ⟦ φ ↦ x.next ⟧, done ↦ ⟦⟧, hang(x) ↦ ⟦ φ ↦ ξ.x ⟧, num(φ) ↦ ⟦⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ x ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ λ ⤍ 𝜎3 ⟧, b ↦ Φ.box( x ↦ Φ.items.tail, w ↦ Φ.hang( x ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎4 ⟧ ) ) ), λ ⤍ L_fork ⟧, λ ⤍ L_inc ⟧.φ ⟧' result: '𝜎7:λ' protocol: |   𝕄(Φ.y):@@ -36,46 +36,46 @@       𝔻(ξ.x):         𝔼(L_fork):           𝔻(ξ.c):-            𝛿·2·1 := 𝔻(𝜎2:λ)-          𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.c)+            𝛿·2·1 ≔ 𝔻(𝜎2:λ)+          𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.c)           𝕄(ξ.a):-            morphed 𝑛·2·1 := 𝜎3:λ-          𝑛1·2 := 𝑛·2·1  # 𝕄(ξ.a)+            morphed 𝑛·2·1 ≔ 𝜎3:λ+          𝑛1·2 ≔ 𝑛·2·1  # 𝕄(ξ.a)           𝕄(ξ.b):             remembered 𝑛·2·2 ≡ Φ.box  # ⟦ x ↦ ∅, w ↦ ∅, φ ↦ x.next ⟧-            𝑛·2·3 := Φ.box( x ↦ Φ.items.tail )-            𝑛·2·4 := ⟦ x ↦ Φ.items.tail, w ↦ ∅, φ ↦ x.next ⟧+            𝑛·2·3 ≔ Φ.box( x ↦ Φ.items.tail )+            𝑛·2·4 ≔ ⟦ x ↦ Φ.items.tail, w ↦ ∅, φ ↦ x.next ⟧             remembered 𝑛·2·4 ≡ 𝑛·2·2( x ↦ Φ.items.tail )-            𝑛·2·5 := 𝑛·2·3( w ↦ Φ.hang( Φ.num( φ ↦ 𝜎4:λ ) ) )-            𝑛·2·6 := ⟦ x ↦ Φ.items.tail, w ↦ Φ.hang( Φ.num( φ ↦ 𝜎4:λ ) ), φ ↦ x.next ⟧-            remembered 𝑛·2·6 ≡ 𝑛·2·4( w ↦ Φ.hang( Φ.num( φ ↦ 𝜎4:λ ) ) )-            morphed 𝑛·2·7 := 𝑛·2·6-          𝑛2·2 := 𝑛·2·7  # 𝕄(ξ.b)-          recalled 𝑛·2·6 ⇒ 𝑛·2·4( w ↦ Φ.hang( Φ.num( φ ↦ 𝜎4:λ ) ) )+            𝑛·2·5 ≔ 𝑛·2·3( w ↦ Φ.hang( x ↦ Φ.num( φ ↦ 𝜎4:λ ) ) )+            𝑛·2·6 ≔ ⟦ x ↦ Φ.items.tail, w ↦ Φ.hang( x ↦ Φ.num( φ ↦ 𝜎4:λ ) ), φ ↦ x.next ⟧+            remembered 𝑛·2·6 ≡ 𝑛·2·4( w ↦ Φ.hang( x ↦ Φ.num( φ ↦ 𝜎4:λ ) ) )+            morphed 𝑛·2·7 ≔ 𝑛·2·6+          𝑛2·2 ≔ 𝑛·2·7  # 𝕄(ξ.b)+          recalled 𝑛·2·6 ⇒ 𝑛·2·4( w ↦ Φ.hang( x ↦ Φ.num( φ ↦ 𝜎4:λ ) ) )           recalled 𝑛·2·4 ⇒ 𝑛·2·2( x ↦ Φ.items.tail )           recalled 𝑛·2·2 ⇒ Φ.box           𝕄(𝑛2.w):-            normalized 𝑛·2·8 := ⟦ x ↦ ∅, φ ↦ x ⟧  # Φ.hang-            𝑛·2·9 := Φ.hang( x ↦ Φ.num( φ ↦ 𝜎4:λ ) )-            𝑛·2·10 := ⟦ x ↦ Φ.num( φ ↦ 𝜎4:λ ), φ ↦ x ⟧-            morphed 𝑛·2·11 := 𝑛·2·10+            normalized 𝑛·2·8 ≔ ⟦ x ↦ ∅, φ ↦ x ⟧  # Φ.hang+            𝑛·2·9 ≔ Φ.hang( x ↦ Φ.num( φ ↦ 𝜎4:λ ) )+            𝑛·2·10 ≔ ⟦ x ↦ Φ.num( φ ↦ 𝜎4:λ ), φ ↦ x ⟧+            morphed 𝑛·2·11 ≔ 𝑛·2·10           𝕄(𝑛2.w.φ):-            normalized 𝑛·2·12 := ∅:φ  # Φ.num-            𝑛·2·13 := Φ.num( φ ↦ 𝜎4:λ )-            𝑛·2·14 := 𝜎4:λ:φ-            morphed 𝑛·2·15 := 𝑛·2·14-          deferred 𝜎5 := Φ.box( x ↦ 𝜎1:λ, w ↦ 𝑛·2·15 )  # 𝕄(𝑛2.φ)-          joined 𝜎6 := 𝛿1·2 ? 𝜎3 : 𝜎5-          𝑛·2·16 := 𝜎6:λ-          evaluated 𝑛·2·17 := 𝑛·2·16  # ⟦ c ↦ 𝜎2:λ, a ↦ 𝜎3:λ, b ↦ 𝑛·2·5, λ ⤍ L_fork ⟧-        𝛿·1·1 := 𝔻(𝜎6:λ)-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.x)-      𝑛·1·1 := Φ.num( φ ↦ 𝜎7:λ )  # 𝑛 of L_inc+            normalized 𝑛·2·12 ≔ ∅:φ  # Φ.num+            𝑛·2·13 ≔ Φ.num( φ ↦ 𝜎4:λ )+            𝑛·2·14 ≔ 𝜎4:λ:φ+            morphed 𝑛·2·15 ≔ 𝑛·2·14+          deferred 𝜎5 ≔ Φ.box( x ↦ 𝜎1:λ, w ↦ 𝑛·2·15 )  # 𝕄(𝑛2.φ)+          joined 𝜎6 ≔ 𝛿1·2 ? 𝜎3 : 𝜎5+          𝑛·2·16 ≔ 𝜎6:λ+          evaluated 𝑛·2·17 ≔ 𝑛·2·16  # ⟦ c ↦ 𝜎2:λ, a ↦ 𝜎3:λ, b ↦ 𝑛·2·5, λ ⤍ L_fork ⟧+        𝛿·1·1 ≔ 𝔻(𝜎6:λ)+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.x)+      𝑛·1·1 ≔ Φ.num( φ ↦ 𝜎7:λ )  # 𝑛 of L_inc       𝕄(𝑛·1·1):-        𝑛·1·2 := Φ.num( φ ↦ 𝜎7:λ )-        𝑛·1·3 := 𝜎7:λ:φ-        morphed 𝑛·1·4 := 𝑛·1·3-      𝑛·1·5 := 𝑛·1·4  # 𝕄(𝑛·1·1)-      evaluated 𝑛·1·6 := 𝑛·1·5  # ⟦ x ↦ ⟦ c ↦ 𝜎2:λ, a ↦ 𝜎3:λ, b ↦ 𝑛·2·5, λ ⤍ L_fork ⟧, λ ⤍ L_inc ⟧-    normalized 𝑛·0·1 := 𝜎7:λ  # 𝑛·1·6.φ-    morphed 𝑛·0·2 := 𝑛·0·1+        𝑛·1·2 ≔ Φ.num( φ ↦ 𝜎7:λ )+        𝑛·1·3 ≔ 𝜎7:λ:φ+        morphed 𝑛·1·4 ≔ 𝑛·1·3+      𝑛·1·5 ≔ 𝑛·1·4  # 𝕄(𝑛·1·1)+      evaluated 𝑛·1·6 ≔ 𝑛·1·5  # ⟦ x ↦ ⟦ c ↦ 𝜎2:λ, a ↦ 𝜎3:λ, b ↦ 𝑛·2·5, λ ⤍ L_fork ⟧, λ ⤍ L_inc ⟧+    normalized 𝑛·0·1 ≔ 𝜎7:λ  # 𝑛·1·6.φ+    morphed 𝑛·0·2 ≔ 𝑛·0·1
test-resources/evaluate-packs/writes-no-joined-line-for-a-join-the-memo-answered.yaml view
@@ -5,7 +5,7 @@ # A join the memo of 'plausible' answered writes no 'joined' line (#2011). The # program reads 'f' twice, so the join of 'L_fork' fires twice over the same # formation. The first firing brings its condition down to '𝛿1·2', mints 𝜎4-# and writes 'joined 𝜎4 := 𝛿1·2 ? 𝜎2 : 𝜎3'. The second one takes that answer+# and writes 'joined 𝜎4 ≔ 𝛿1·2 ? 𝜎2 : 𝜎3'. The second one takes that answer # from the memo and brings nothing down, so no meta of its own holds the # condition, and it writes the answer alone, the way a firing the memo # answered writes no symbol it minted.@@ -35,262 +35,262 @@     number(φ) ↦ ⟦       gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧,       plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,-    f ↦ 5.gt( 0 ).if( 1.plus( 2 ).plus( 0 ), 3.plus( 4 ).plus( 0 ) ),-    φ ↦ Φ.f.plus( Φ.f ).φ ⟧+    f ↦ 5.gt( x ↦ 0 ).if( then ↦ 1.plus( x ↦ 2 ).plus( x ↦ 0 ), else ↦ 3.plus( x ↦ 4 ).plus( x ↦ 0 ) ),+    φ ↦ Φ.f.plus( x ↦ Φ.f ).φ ⟧ result: '𝜎6:λ' protocol: |   𝕄(Φ.φ):-    normalized 𝑛·0·1 := 5.0.gt( 0.0 ).if( 1.0.plus( 2.0 ).plus( 0.0 ), 3.0.plus( 4.0 ).plus( 0.0 ) )  # Φ.f-    normalized 𝑛·0·2 := ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number-    𝑛·0·3 := 5.0-    𝑛·0·4 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-    normalized 𝑛·0·5 := ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·4.gt-    𝑛·0·6 := 𝑛·0·3.gt( x ↦ 0.0 )-    𝑛·0·7 := ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧+    normalized 𝑛·0·1 ≔ 5.0.gt( x ↦ 0.0 ).if( then ↦ 1.0.plus( x ↦ 2.0 ).plus( x ↦ 0.0 ), else ↦ 3.0.plus( x ↦ 4.0 ).plus( x ↦ 0.0 ) )  # Φ.f+    normalized 𝑛·0·2 ≔ ⟦ φ ↦ ∅, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number+    𝑛·0·3 ≔ 5.0+    𝑛·0·4 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+    normalized 𝑛·0·5 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·0·4.gt+    𝑛·0·6 ≔ 𝑛·0·3.gt( x ↦ 0.0 )+    𝑛·0·7 ≔ ⟦ x ↦ 0.0, λ ⤍ L_number_gt ⟧     𝔼(L_number_gt):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·1·1 := 5.0-          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·3 := 𝑛·1·2-        boxed 𝑛·1·4 := 𝑛·1·3.φ-        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4+          𝑛·1·1 ≔ 5.0+          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·3 ≔ 𝑛·1·2+        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ+        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4         𝕄(𝑛·1·4):-          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes-          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )-          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·9 := 𝑛·1·8-        boxed 𝑛·1·10 := 𝑛·1·9.φ-        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10-        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0-      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)+          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes+          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )+          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·9 ≔ 𝑛·1·8+        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ+        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10+        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0+      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·1·12 := 0.0-          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·1·14 := 𝑛·1·13-        boxed 𝑛·1·15 := 𝑛·1·14.φ-        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15+          𝑛·1·12 ≔ 0.0+          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·1·14 ≔ 𝑛·1·13+        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ+        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )  # 𝑛·1·15         𝕄(𝑛·1·15):-          𝑛·1·17 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )-          𝑛·1·18 := 00-00-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·1·19 := 𝑛·1·18-        boxed 𝑛·1·20 := 𝑛·1·19.φ-        normalized 𝑛·1·21 := 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20-        𝛿·1·2 := 00-00-00-00-00-00-00-00  # 0.0-      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)-      𝑛·1·22 := Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt+          𝑛·1·17 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )+          𝑛·1·18 ≔ 00-00-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·1·19 ≔ 𝑛·1·18+        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ+        normalized 𝑛·1·21 ≔ 00-00-00-00-00-00-00-00:Δ  # 𝑛·1·20+        𝛿·1·2 ≔ 00-00-00-00-00-00-00-00  # 0.0+      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)+      𝑛·1·22 ≔ Φ.bool( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_gt       𝕄(𝑛·1·22):-        normalized 𝑛·1·23 := ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool-        𝑛·1·24 := Φ.bool( φ ↦ 𝜎1:λ )-        𝑛·1·25 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-        morphed 𝑛·1·26 := 𝑛·1·25-      𝑛·1·27 := 𝑛·1·26  # 𝕄(𝑛·1·22)+        normalized 𝑛·1·23 ≔ ⟦ φ ↦ ∅, if(then, else) ↦ L_fork:λ ⟧  # Φ.bool+        𝑛·1·24 ≔ Φ.bool( φ ↦ 𝜎1:λ )+        𝑛·1·25 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+        morphed 𝑛·1·26 ≔ 𝑛·1·25+      𝑛·1·27 ≔ 𝑛·1·26  # 𝕄(𝑛·1·22)       memoized 𝑛·0·7 ⇛ 𝑛·1·27-      evaluated 𝑛·1·28 := 𝑛·1·27  # 𝑛·0·7-    normalized 𝑛·0·8 := ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if-    shared 𝑛·1 := 1.0.plus( 2.0 ).plus( 𝑛·1·12 )-    𝑛·0·9 := 𝑛·1·24.if( then ↦ 𝑛·1 )-    𝑛·0·10 := ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧-    shared 𝑛·2 := 3.0.plus( 4.0 ).plus( 𝑛·1·12 )-    𝑛·0·11 := 𝑛·0·10( else ↦ 𝑛·2 )-    𝑛·0·12 := ⟦ then ↦ 𝑛·1, else ↦ 𝑛·2, λ ⤍ L_fork ⟧+      evaluated 𝑛·1·28 ≔ 𝑛·1·27  # 𝑛·0·7+    normalized 𝑛·0·8 ≔ ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·1·28.if+    shared 𝑛·1 ≔ 1.0.plus( x ↦ 2.0 ).plus( x ↦ 𝑛·1·12 )+    𝑛·0·9 ≔ 𝑛·1·24.if( then ↦ 𝑛·1 )+    𝑛·0·10 ≔ ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧+    shared 𝑛·2 ≔ 3.0.plus( x ↦ 4.0 ).plus( x ↦ 𝑛·1·12 )+    𝑛·0·11 ≔ 𝑛·0·10( else ↦ 𝑛·2 )+    𝑛·0·12 ≔ ⟦ then ↦ 𝑛·1, else ↦ 𝑛·2, λ ⤍ L_fork ⟧     𝔼(L_fork):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·2·1 := Φ.bool( φ ↦ 𝜎1:λ )-          𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧-          morphed 𝑛·2·3 := 𝑛·1·27-        boxed 𝑛·2·4 := 𝑛·2·3.φ-        normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4-        𝛿·2·1 := 𝔻(𝜎1:λ)-      𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)+          𝑛·2·1 ≔ Φ.bool( φ ↦ 𝜎1:λ )+          𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, if(then, else) ↦ L_fork:λ ⟧+          morphed 𝑛·2·3 ≔ 𝑛·1·27+        boxed 𝑛·2·4 ≔ 𝑛·2·3.φ+        normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4+        𝛿·2·1 ≔ 𝔻(𝜎1:λ)+      𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)       𝕄(ξ.then):-        𝑛·2·6 := 1.0-        𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·8 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus-        𝑛·2·9 := 𝑛·2·6.plus( x ↦ 2.0 )-        𝑛·2·10 := ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧+        𝑛·2·6 ≔ 1.0+        𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·8 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·7.plus+        𝑛·2·9 ≔ 𝑛·2·6.plus( x ↦ 2.0 )+        𝑛·2·10 ≔ ⟦ x ↦ 2.0, λ ⤍ L_number_plus ⟧         𝔼(L_number_plus):           𝔻(ξ.ρ):             𝕄(ξ.ρ):-              𝑛·3·1 := 1.0-              𝑛·3·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·3·3 := 𝑛·3·2-            boxed 𝑛·3·4 := 𝑛·3·3.φ-            normalized 𝑛·3·5 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·3·4+              𝑛·3·1 ≔ 1.0+              𝑛·3·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·3·3 ≔ 𝑛·3·2+            boxed 𝑛·3·4 ≔ 𝑛·3·3.φ+            normalized 𝑛·3·5 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )  # 𝑛·3·4             𝕄(𝑛·3·4):-              𝑛·3·6 := Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )-              𝑛·3·7 := 3F-F0-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·3·8 := 𝑛·3·7-            boxed 𝑛·3·9 := 𝑛·3·8.φ-            normalized 𝑛·3·10 := 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·3·9-            𝛿·3·1 := 3F-F0-00-00-00-00-00-00  # 1.0-          𝛿1·3 := 𝛿·3·1  # 𝔻(ξ.ρ)+              𝑛·3·6 ≔ Φ.bytes( φ ↦ 3F-F0-00-00-00-00-00-00:Δ )+              𝑛·3·7 ≔ 3F-F0-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·3·8 ≔ 𝑛·3·7+            boxed 𝑛·3·9 ≔ 𝑛·3·8.φ+            normalized 𝑛·3·10 ≔ 3F-F0-00-00-00-00-00-00:Δ  # 𝑛·3·9+            𝛿·3·1 ≔ 3F-F0-00-00-00-00-00-00  # 1.0+          𝛿1·3 ≔ 𝛿·3·1  # 𝔻(ξ.ρ)           𝔻(ξ.x):             𝕄(ξ.x):-              𝑛·3·11 := 2.0-              𝑛·3·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·3·13 := 𝑛·3·12-            boxed 𝑛·3·14 := 𝑛·3·13.φ-            normalized 𝑛·3·15 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·3·14+              𝑛·3·11 ≔ 2.0+              𝑛·3·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·3·13 ≔ 𝑛·3·12+            boxed 𝑛·3·14 ≔ 𝑛·3·13.φ+            normalized 𝑛·3·15 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·3·14             𝕄(𝑛·3·14):-              𝑛·3·16 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )-              𝑛·3·17 := 40-00-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·3·18 := 𝑛·3·17-            boxed 𝑛·3·19 := 𝑛·3·18.φ-            normalized 𝑛·3·20 := 40-00-00-00-00-00-00-00:Δ  # 𝑛·3·19-            𝛿·3·2 := 40-00-00-00-00-00-00-00  # 2.0-          𝛿2·3 := 𝛿·3·2  # 𝔻(ξ.x)-          𝑛·3·21 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus+              𝑛·3·16 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )+              𝑛·3·17 ≔ 40-00-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·3·18 ≔ 𝑛·3·17+            boxed 𝑛·3·19 ≔ 𝑛·3·18.φ+            normalized 𝑛·3·20 ≔ 40-00-00-00-00-00-00-00:Δ  # 𝑛·3·19+            𝛿·3·2 ≔ 40-00-00-00-00-00-00-00  # 2.0+          𝛿2·3 ≔ 𝛿·3·2  # 𝔻(ξ.x)+          𝑛·3·21 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus           𝕄(𝑛·3·21):-            𝑛·3·22 := Φ.number( φ ↦ 𝜎2:λ )-            𝑛·3·23 := ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-            morphed 𝑛·3·24 := 𝑛·3·23-          𝑛·3·25 := 𝑛·3·24  # 𝕄(𝑛·3·21)+            𝑛·3·22 ≔ Φ.number( φ ↦ 𝜎2:λ )+            𝑛·3·23 ≔ ⟦ φ ↦ 𝜎2:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+            morphed 𝑛·3·24 ≔ 𝑛·3·23+          𝑛·3·25 ≔ 𝑛·3·24  # 𝕄(𝑛·3·21)           memoized 𝑛·2·10 ⇛ 𝑛·3·25-          evaluated 𝑛·3·26 := 𝑛·3·25  # 𝑛·2·10-        normalized 𝑛·2·11 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·3·26.plus-        𝑛·2·12 := 𝑛·3·22.plus( x ↦ 𝑛·1·12 )-        𝑛·2·13 := ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·14 := 𝑛·2·13+          evaluated 𝑛·3·26 ≔ 𝑛·3·25  # 𝑛·2·10+        normalized 𝑛·2·11 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·3·26.plus+        𝑛·2·12 ≔ 𝑛·3·22.plus( x ↦ 𝑛·1·12 )+        𝑛·2·13 ≔ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·14 ≔ 𝑛·2·13       𝕄(ξ.else):-        𝑛·2·15 := 3.0-        𝑛·2·16 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        normalized 𝑛·2·17 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·16.plus-        𝑛·2·18 := 𝑛·2·15.plus( x ↦ 4.0 )-        𝑛·2·19 := ⟦ x ↦ 4.0, λ ⤍ L_number_plus ⟧+        𝑛·2·15 ≔ 3.0+        𝑛·2·16 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        normalized 𝑛·2·17 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·2·16.plus+        𝑛·2·18 ≔ 𝑛·2·15.plus( x ↦ 4.0 )+        𝑛·2·19 ≔ ⟦ x ↦ 4.0, λ ⤍ L_number_plus ⟧         𝔼(L_number_plus):           𝔻(ξ.ρ):             𝕄(ξ.ρ):-              𝑛·4·1 := 3.0-              𝑛·4·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·4·3 := 𝑛·4·2-            boxed 𝑛·4·4 := 𝑛·4·3.φ-            normalized 𝑛·4·5 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )  # 𝑛·4·4+              𝑛·4·1 ≔ 3.0+              𝑛·4·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·4·3 ≔ 𝑛·4·2+            boxed 𝑛·4·4 ≔ 𝑛·4·3.φ+            normalized 𝑛·4·5 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )  # 𝑛·4·4             𝕄(𝑛·4·4):-              𝑛·4·6 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )-              𝑛·4·7 := 40-08-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·4·8 := 𝑛·4·7-            boxed 𝑛·4·9 := 𝑛·4·8.φ-            normalized 𝑛·4·10 := 40-08-00-00-00-00-00-00:Δ  # 𝑛·4·9-            𝛿·4·1 := 40-08-00-00-00-00-00-00  # 3.0-          𝛿1·4 := 𝛿·4·1  # 𝔻(ξ.ρ)+              𝑛·4·6 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )+              𝑛·4·7 ≔ 40-08-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·4·8 ≔ 𝑛·4·7+            boxed 𝑛·4·9 ≔ 𝑛·4·8.φ+            normalized 𝑛·4·10 ≔ 40-08-00-00-00-00-00-00:Δ  # 𝑛·4·9+            𝛿·4·1 ≔ 40-08-00-00-00-00-00-00  # 3.0+          𝛿1·4 ≔ 𝛿·4·1  # 𝔻(ξ.ρ)           𝔻(ξ.x):             𝕄(ξ.x):-              𝑛·4·11 := 4.0-              𝑛·4·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-              morphed 𝑛·4·13 := 𝑛·4·12-            boxed 𝑛·4·14 := 𝑛·4·13.φ-            normalized 𝑛·4·15 := Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )  # 𝑛·4·14+              𝑛·4·11 ≔ 4.0+              𝑛·4·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ ), gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+              morphed 𝑛·4·13 ≔ 𝑛·4·12+            boxed 𝑛·4·14 ≔ 𝑛·4·13.φ+            normalized 𝑛·4·15 ≔ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )  # 𝑛·4·14             𝕄(𝑛·4·14):-              𝑛·4·16 := Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )-              𝑛·4·17 := 40-10-00-00-00-00-00-00:Δ:φ-              morphed 𝑛·4·18 := 𝑛·4·17-            boxed 𝑛·4·19 := 𝑛·4·18.φ-            normalized 𝑛·4·20 := 40-10-00-00-00-00-00-00:Δ  # 𝑛·4·19-            𝛿·4·2 := 40-10-00-00-00-00-00-00  # 4.0-          𝛿2·4 := 𝛿·4·2  # 𝔻(ξ.x)-          𝑛·4·21 := Φ.number( φ ↦ 𝜎3:λ )  # 𝑛 of L_number_plus+              𝑛·4·16 ≔ Φ.bytes( φ ↦ 40-10-00-00-00-00-00-00:Δ )+              𝑛·4·17 ≔ 40-10-00-00-00-00-00-00:Δ:φ+              morphed 𝑛·4·18 ≔ 𝑛·4·17+            boxed 𝑛·4·19 ≔ 𝑛·4·18.φ+            normalized 𝑛·4·20 ≔ 40-10-00-00-00-00-00-00:Δ  # 𝑛·4·19+            𝛿·4·2 ≔ 40-10-00-00-00-00-00-00  # 4.0+          𝛿2·4 ≔ 𝛿·4·2  # 𝔻(ξ.x)+          𝑛·4·21 ≔ Φ.number( φ ↦ 𝜎3:λ )  # 𝑛 of L_number_plus           𝕄(𝑛·4·21):-            𝑛·4·22 := Φ.number( φ ↦ 𝜎3:λ )-            𝑛·4·23 := ⟦ φ ↦ 𝜎3:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-            morphed 𝑛·4·24 := 𝑛·4·23-          𝑛·4·25 := 𝑛·4·24  # 𝕄(𝑛·4·21)+            𝑛·4·22 ≔ Φ.number( φ ↦ 𝜎3:λ )+            𝑛·4·23 ≔ ⟦ φ ↦ 𝜎3:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+            morphed 𝑛·4·24 ≔ 𝑛·4·23+          𝑛·4·25 ≔ 𝑛·4·24  # 𝕄(𝑛·4·21)           memoized 𝑛·2·19 ⇛ 𝑛·4·25-          evaluated 𝑛·4·26 := 𝑛·4·25  # 𝑛·2·19-        normalized 𝑛·2·20 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·4·26.plus-        𝑛·2·21 := 𝑛·4·22.plus( x ↦ 𝑛·1·12 )-        𝑛·2·22 := ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧-        morphed 𝑛·2·23 := 𝑛·2·22-      joined 𝜎4 := 𝛿1·2 ? 𝜎2 : 𝜎3-      𝑛·2·24 := ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧+          evaluated 𝑛·4·26 ≔ 𝑛·4·25  # 𝑛·2·19+        normalized 𝑛·2·20 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·4·26.plus+        𝑛·2·21 ≔ 𝑛·4·22.plus( x ↦ 𝑛·1·12 )+        𝑛·2·22 ≔ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧+        morphed 𝑛·2·23 ≔ 𝑛·2·22+      joined 𝜎4 ≔ 𝛿1·2 ? 𝜎2 : 𝜎3+      𝑛·2·24 ≔ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧       memoized 𝑛·0·12 ⇛ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧-      evaluated 𝑛·2·25 := ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧  # 𝑛·0·12+      evaluated 𝑛·2·25 ≔ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧  # 𝑛·0·12     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·5·1 := Φ.number( φ ↦ 𝜎4:λ )-          𝑛·5·2 := ⟦ φ ↦ 𝜎4:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·5·3 := 𝑛·5·2-        boxed 𝑛·5·4 := 𝑛·5·3.φ-        normalized 𝑛·5·5 := 𝜎4:λ  # 𝑛·5·4-        𝛿·5·1 := 𝔻(𝜎4:λ)-      𝛿1·5 := 𝛿·5·1  # 𝔻(ξ.ρ)+          𝑛·5·1 ≔ Φ.number( φ ↦ 𝜎4:λ )+          𝑛·5·2 ≔ ⟦ φ ↦ 𝜎4:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·5·3 ≔ 𝑛·5·2+        boxed 𝑛·5·4 ≔ 𝑛·5·3.φ+        normalized 𝑛·5·5 ≔ 𝜎4:λ  # 𝑛·5·4+        𝛿·5·1 ≔ 𝔻(𝜎4:λ)+      𝛿1·5 ≔ 𝛿·5·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          𝑛·5·6 := Φ.number( φ ↦ 𝑛·1·17 )-          𝑛·5·7 := ⟦ φ ↦ 𝑛·1·17, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·5·8 := 𝑛·5·7-        boxed 𝑛·5·9 := 𝑛·5·8.φ-        normalized 𝑛·5·10 := 𝑛·1·17  # 𝑛·5·9+          𝑛·5·6 ≔ Φ.number( φ ↦ 𝑛·1·17 )+          𝑛·5·7 ≔ ⟦ φ ↦ 𝑛·1·17, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·5·8 ≔ 𝑛·5·7+        boxed 𝑛·5·9 ≔ 𝑛·5·8.φ+        normalized 𝑛·5·10 ≔ 𝑛·1·17  # 𝑛·5·9         𝕄(𝑛·5·9):-          𝑛·5·11 := Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )-          𝑛·5·12 := 00-00-00-00-00-00-00-00:Δ:φ-          morphed 𝑛·5·13 := 𝑛·5·12-        boxed 𝑛·5·14 := 𝑛·5·13.φ-        normalized 𝑛·5·15 := 00-00-00-00-00-00-00-00:Δ  # 𝑛·5·14-        𝛿·5·2 := 00-00-00-00-00-00-00-00  # 0.0-      𝛿2·5 := 𝛿·5·2  # 𝔻(ξ.x)-      𝑛·5·16 := Φ.number( φ ↦ 𝜎5:λ )  # 𝑛 of L_number_plus+          𝑛·5·11 ≔ Φ.bytes( φ ↦ 00-00-00-00-00-00-00-00:Δ )+          𝑛·5·12 ≔ 00-00-00-00-00-00-00-00:Δ:φ+          morphed 𝑛·5·13 ≔ 𝑛·5·12+        boxed 𝑛·5·14 ≔ 𝑛·5·13.φ+        normalized 𝑛·5·15 ≔ 00-00-00-00-00-00-00-00:Δ  # 𝑛·5·14+        𝛿·5·2 ≔ 00-00-00-00-00-00-00-00  # 0.0+      𝛿2·5 ≔ 𝛿·5·2  # 𝔻(ξ.x)+      𝑛·5·16 ≔ Φ.number( φ ↦ 𝜎5:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·5·16):-        𝑛·5·17 := Φ.number( φ ↦ 𝜎5:λ )-        𝑛·5·18 := ⟦ φ ↦ 𝜎5:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·5·19 := 𝑛·5·18-      𝑛·5·20 := 𝑛·5·19  # 𝕄(𝑛·5·16)+        𝑛·5·17 ≔ Φ.number( φ ↦ 𝜎5:λ )+        𝑛·5·18 ≔ ⟦ φ ↦ 𝜎5:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·5·19 ≔ 𝑛·5·18+      𝑛·5·20 ≔ 𝑛·5·19  # 𝕄(𝑛·5·16)       memoized 𝑛·5·21 ⇛ 𝑛·5·20  # ⟦ x ↦ 𝑛·5·6, λ ⤍ L_number_plus ⟧-      evaluated 𝑛·5·22 := 𝑛·5·20  # 𝑛·5·21-    normalized 𝑛·0·13 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·5·22.plus-    𝑛·0·14 := 𝑛·5·17.plus( x ↦ Φ.f )-    𝑛·0·15 := ⟦ x ↦ Φ.f, λ ⤍ L_number_plus ⟧+      evaluated 𝑛·5·22 ≔ 𝑛·5·20  # 𝑛·5·21+    normalized 𝑛·0·13 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·5·22.plus+    𝑛·0·14 ≔ 𝑛·5·17.plus( x ↦ Φ.f )+    𝑛·0·15 ≔ ⟦ x ↦ Φ.f, λ ⤍ L_number_plus ⟧     𝔼(L_number_plus):       𝔻(ξ.ρ):         𝕄(ξ.ρ):-          𝑛·6·1 := Φ.number( φ ↦ 𝜎5:λ )-          𝑛·6·2 := ⟦ φ ↦ 𝜎5:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          morphed 𝑛·6·3 := 𝑛·5·20-        boxed 𝑛·6·4 := 𝑛·6·3.φ-        normalized 𝑛·6·5 := 𝜎5:λ  # 𝑛·6·4-        𝛿·6·1 := 𝔻(𝜎5:λ)-      𝛿1·6 := 𝛿·6·1  # 𝔻(ξ.ρ)+          𝑛·6·1 ≔ Φ.number( φ ↦ 𝜎5:λ )+          𝑛·6·2 ≔ ⟦ φ ↦ 𝜎5:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          morphed 𝑛·6·3 ≔ 𝑛·5·20+        boxed 𝑛·6·4 ≔ 𝑛·6·3.φ+        normalized 𝑛·6·5 ≔ 𝜎5:λ  # 𝑛·6·4+        𝛿·6·1 ≔ 𝔻(𝜎5:λ)+      𝛿1·6 ≔ 𝛿·6·1  # 𝔻(ξ.ρ)       𝔻(ξ.x):         𝕄(ξ.x):-          normalized 𝑛·6·6 := 𝑛·1·1.gt( 𝑛·5·6 ).if( 𝑛·3·1.plus( 𝑛·3·11 ).plus( 𝑛·5·6 ), 𝑛·4·1.plus( 𝑛·4·11 ).plus( 𝑛·5·6 ) )  # Φ.f-          𝑛·6·7 := Φ.number( φ ↦ 𝑛·1·7 )-          𝑛·6·8 := ⟦ φ ↦ 𝑛·1·7, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-          normalized 𝑛·6·9 := ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·6·8.gt-          𝑛·6·10 := 𝑛·6·7.gt( x ↦ 𝑛·5·6 )-          𝑛·6·11 := ⟦ x ↦ 𝑛·5·6, λ ⤍ L_number_gt ⟧+          normalized 𝑛·6·6 ≔ 𝑛·0·6.if( then ↦ 𝑛·2·9.plus( x ↦ 𝑛·5·6 ), else ↦ 𝑛·2·18.plus( x ↦ 𝑛·5·6 ) )  # Φ.f+          𝑛·6·7 ≔ Φ.number( φ ↦ 𝑛·1·7 )+          𝑛·6·8 ≔ ⟦ φ ↦ 𝑛·1·7, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+          normalized 𝑛·6·9 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_gt ⟧  # 𝑛·6·8.gt+          𝑛·6·10 ≔ 𝑛·6·7.gt( x ↦ 𝑛·5·6 )+          𝑛·6·11 ≔ ⟦ x ↦ 𝑛·5·6, λ ⤍ L_number_gt ⟧           𝔼(L_number_gt):             recalled 𝑛·0·7 ⇒ 𝑛·1·27-            𝑛·7·1 := 𝑛·2·1  # 𝑛 of L_number_gt-            𝑛·7·2 := 𝑛·1·27  # 𝕄(𝑛·7·1)-            evaluated 𝑛·7·3 := 𝑛·7·2  # 𝑛·6·11-          normalized 𝑛·6·12 := ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·7·3.if-          𝑛·6·13 := 𝑛·2·1.if( then ↦ 𝑛·1 )-          𝑛·6·14 := ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧-          𝑛·6·15 := 𝑛·6·14( else ↦ 𝑛·2 )-          𝑛·6·16 := ⟦ then ↦ 𝑛·1, else ↦ 𝑛·2, λ ⤍ L_fork ⟧-          morphed 𝑛·6·17 := 𝑛·6·16+            𝑛·7·1 ≔ 𝑛·2·1  # 𝑛 of L_number_gt+            𝑛·7·2 ≔ 𝑛·1·27  # 𝕄(𝑛·7·1)+            evaluated 𝑛·7·3 ≔ 𝑛·7·2  # 𝑛·6·11+          normalized 𝑛·6·12 ≔ ⟦ then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧  # 𝑛·7·3.if+          𝑛·6·13 ≔ 𝑛·2·1.if( then ↦ 𝑛·1 )+          𝑛·6·14 ≔ ⟦ then ↦ 𝑛·1, else ↦ ∅, λ ⤍ L_fork ⟧+          𝑛·6·15 ≔ 𝑛·6·14( else ↦ 𝑛·2 )+          𝑛·6·16 ≔ ⟦ then ↦ 𝑛·1, else ↦ 𝑛·2, λ ⤍ L_fork ⟧+          morphed 𝑛·6·17 ≔ 𝑛·6·16         𝔼(L_fork):           recalled 𝑛·0·12 ⇒ ⟦ x ↦ 𝑛·1·12, λ ⤍ L_number_plus ⟧-          𝑛·8·1 := 𝑛·5·21-          evaluated 𝑛·8·2 := 𝑛·5·21  # 𝑛·6·16+          𝑛·8·1 ≔ 𝑛·5·21+          evaluated 𝑛·8·2 ≔ 𝑛·5·21  # 𝑛·6·16         𝔼(L_number_plus):           recalled 𝑛·5·21 ⇒ 𝑛·5·20-          𝑛·9·1 := 𝑛·6·1  # 𝑛 of L_number_plus-          𝑛·9·2 := 𝑛·5·20  # 𝕄(𝑛·9·1)-          evaluated 𝑛·9·3 := 𝑛·9·2  # 𝑛·5·21-        boxed 𝑛·6·18 := 𝑛·9·3.φ-        𝛿·6·2 := 𝔻(𝜎5:λ)-      𝛿2·6 := 𝛿·6·2  # 𝔻(ξ.x)-      𝑛·6·19 := Φ.number( φ ↦ 𝜎6:λ )  # 𝑛 of L_number_plus+          𝑛·9·1 ≔ 𝑛·6·1  # 𝑛 of L_number_plus+          𝑛·9·2 ≔ 𝑛·5·20  # 𝕄(𝑛·9·1)+          evaluated 𝑛·9·3 ≔ 𝑛·9·2  # 𝑛·5·21+        boxed 𝑛·6·18 ≔ 𝑛·9·3.φ+        𝛿·6·2 ≔ 𝔻(𝜎5:λ)+      𝛿2·6 ≔ 𝛿·6·2  # 𝔻(ξ.x)+      𝑛·6·19 ≔ Φ.number( φ ↦ 𝜎6:λ )  # 𝑛 of L_number_plus       𝕄(𝑛·6·19):-        𝑛·6·20 := Φ.number( φ ↦ 𝜎6:λ )-        𝑛·6·21 := ⟦ φ ↦ 𝜎6:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧-        morphed 𝑛·6·22 := 𝑛·6·21-      𝑛·6·23 := 𝑛·6·22  # 𝕄(𝑛·6·19)+        𝑛·6·20 ≔ Φ.number( φ ↦ 𝜎6:λ )+        𝑛·6·21 ≔ ⟦ φ ↦ 𝜎6:λ, gt(x) ↦ L_number_gt:λ, plus(x) ↦ L_number_plus:λ ⟧+        morphed 𝑛·6·22 ≔ 𝑛·6·21+      𝑛·6·23 ≔ 𝑛·6·22  # 𝕄(𝑛·6·19)       memoized 𝑛·0·15 ⇛ 𝑛·6·23-      evaluated 𝑛·6·24 := 𝑛·6·23  # 𝑛·0·15-    normalized 𝑛·0·16 := 𝜎6:λ  # 𝑛·6·24.φ-    morphed 𝑛·0·17 := 𝑛·0·16+      evaluated 𝑛·6·24 ≔ 𝑛·6·23  # 𝑛·0·15+    normalized 𝑛·0·16 ≔ 𝜎6:λ  # 𝑛·6·24.φ+    morphed 𝑛·0·17 ≔ 𝑛·0·16
test-resources/evaluate-packs/writes-the-term-a-normalize-premise-came-to.yaml view
@@ -17,5 +17,5 @@ protocol: |   𝕄(Φ.φ):     remembered 𝑛·0·1 ≡ Φ.x  # ⟦⟧:a:φ-    normalized 𝑛·0·2 := ⟦⟧  # 𝑛·0·1.φ.a-    morphed 𝑛·0·3 := 𝑛·0·2+    normalized 𝑛·0·2 ≔ ⟦⟧  # 𝑛·0·1.φ.a+    morphed 𝑛·0·3 ≔ 𝑛·0·2
− test-resources/explain-packs/contextualization/caa.yaml
@@ -1,11 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----latex: |--  \begin{phinoContextualizationInference}-    \phinoName{caa}-    \phinoPremise{ \phinoContextualize{ n_1 }{ k }{ n_2 } }-    \phinoPremise{ \phinoContextualize{ e }{ k }{ n_3 } }-    \phinoConclusion{ \phinoContextualize{ n_1 ( \phiTerminal{\alpha_{i}} -> e ) }{ k }{ n_2 ( \phiTerminal{\alpha_{i}} -> n_3 ) } }-  \end{phinoContextualizationInference}
− test-resources/explain-packs/morphing/maa.yaml
@@ -1,12 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----latex: |--  \begin{phinoMorphingInference}-    \phinoName{maa}-    \phinoPremise{ \phinoMorph{ n_1 }{ e }{ s_1 }{ n_2 }{ s_2 } }-    \phinoPremise{ \phinoNormalize{ n_2 ( \phiTerminal{\alpha_{i}} -> k ) }{ n_3 } }-    \phinoPremise{ \phinoMorph{ n_3 }{ e }{ s_2 }{ n_4 }{ s_3 } }-    \phinoConclusion{ \phinoMorph{ n_1 ( \phiTerminal{\alpha_{i}} -> k ) }{ e }{ s_1 }{ n_4 }{ s_3 } }-  \end{phinoMorphingInference}
− test-resources/explain-packs/morphing/maad.yaml
@@ -1,11 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----latex: |--  \begin{phinoMorphingInference}-    \phinoName{maad}-    \phinoCondition{ \phinoNotAbsolute{ n_1 } }-    \phinoPremise{ \phinoMorph{ T }{ e }{ s_1 }{ n_2 }{ s_2 } }-    \phinoConclusion{ \phinoMorph{ n ( \phiTerminal{\alpha_{i}} -> n_1 ) }{ e }{ s_1 }{ n_2 }{ s_2 } }-  \end{phinoMorphingInference}
− test-resources/explain-packs/normalize/alpha.yaml
@@ -1,10 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----latex: |--  \phinoNormalizationRule{alpha}-    { [[ B_1, \tau -> ?, B_2 ]] ( \phiTerminal{\alpha_{i}} -> e ) }-    { [[ B_1, \tau -> ?, B_2 ]] ( \tau -> e ) }-    { i = \vert \overline{ B_1 } \vert \phiText{and} \tau \not= \phiTerminal{\rho} }-    { }
− test-resources/explain-packs/normalize/amiss.yaml
@@ -1,10 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----latex: |--  \phinoNormalizationRule{amiss}-    { [[ B ]] ( \phiTerminal{\alpha_{i}} -> e ) }-    { T }-    { \vert \overline{ B } \vert \leq i }-    { }
− test-resources/explain-packs/normalize/dca.yaml
@@ -1,10 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----latex: |--  \phinoNormalizationRule{dca}-    { T ( \phiTerminal{\alpha_{i}} -> e ) }-    { T }-    { }-    { }
− test-resources/explain-packs/normalize/overa.yaml
@@ -1,10 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----latex: |--  \phinoNormalizationRule{overa}-    { [[ B_1, \tau -> e_1, B_2 ]] ( \phiTerminal{\alpha_{i}} -> e_2 ) }-    { T }-    { i = \vert \overline{ B_1 } \vert \phiText{and} \tau \not= \phiTerminal{\rho} }-    { }
− test-resources/latex-packs/positional-application.yaml
@@ -1,10 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----expression: |-  [[ f -> Q.foo(Q.a, Q.b) ]]-result: |--  \begin{phiquation}-  Q . |foo| ( Q . |a|, Q . |b| ) : |f|{.}-  \end{phiquation}
test-resources/morph-packs/fails-on-a-premise-that-runs-out-of-cycles.yaml view
@@ -12,14 +12,14 @@     tuple(length, head, tail) ↦ ⟦ empty ↦ ⟦ ⟧ ⟧,     map(pairs) ↦ ⟦       φ ↦ ctor(-        entries ↦ pairs.length.eq( 0 ).if(-          Φ.tuple.empty,-          walk( tup ↦ pairs ).φ+        entries ↦ pairs.length.eq( x ↦ 0 ).if(+          left ↦ Φ.tuple.empty,+          right ↦ walk( tup ↦ pairs ).φ         )       ),       ctor(entries) ↦ ⟦ keys ↦ entries ⟧,       walk(ρ, tup) ↦ ⟦-        φ ↦ tup.length.eq( 0 ).if( Φ.tuple.empty, prev ),+        φ ↦ tup.length.eq( x ↦ 0 ).if( left ↦ Φ.tuple.empty, right ↦ prev ),         prev ↦ ρ.walk( tup ↦ tup.tail ).φ       ⟧     ⟧,
test-resources/morph-packs/parks-a-premise-that-runs-out-of-cycles.yaml view
@@ -10,14 +10,14 @@     tuple(length, head, tail) ↦ ⟦ empty ↦ ⟦ ⟧ ⟧,     map(pairs) ↦ ⟦       φ ↦ ctor(-        entries ↦ pairs.length.eq( 0 ).if(-          Φ.tuple.empty,-          walk( tup ↦ pairs ).φ+        entries ↦ pairs.length.eq( x ↦ 0 ).if(+          left ↦ Φ.tuple.empty,+          right ↦ walk( tup ↦ pairs ).φ         )       ),       ctor(entries) ↦ ⟦ keys ↦ entries ⟧,       walk(ρ, tup) ↦ ⟦-        φ ↦ tup.length.eq( 0 ).if( Φ.tuple.empty, prev ),+        φ ↦ tup.length.eq( x ↦ 0 ).if( left ↦ Φ.tuple.empty, right ↦ prev ),         prev ↦ ρ.walk( tup ↦ tup.tail ).φ       ⟧     ⟧,@@ -33,14 +33,14 @@       length ↦ L_len:λ, head ↦ L_head:λ, tail ↦ L_tail:λ     ),     φ ↦ ctor(-      entries ↦ pairs.length.eq( 0 ).if(-        Φ.tuple.empty,-        walk( tup ↦ pairs ).φ+      entries ↦ pairs.length.eq( x ↦ 0 ).if(+        left ↦ Φ.tuple.empty,+        right ↦ walk( tup ↦ pairs ).φ       )     ),     ctor(entries) ↦ ⟦ keys ↦ entries ⟧,     walk(ρ, tup) ↦ ⟦-      φ ↦ tup.length.eq( 0 ).if( Φ.tuple.empty, prev ),+      φ ↦ tup.length.eq( x ↦ 0 ).if( left ↦ Φ.tuple.empty, right ↦ prev ),       prev ↦ ρ.walk( tup ↦ tup.tail ).φ     ⟧   ⟧.keys
test-resources/parser-packs/all-the-basics.phi view
@@ -32,9 +32,9 @@     float-application ↦ 52.1(z ↦ ξ.f, k ↦ ξ.i),     minus ↦ -0,     inline-application ↦ Φ.x(-      "Hello", 42, Φ.y("world", 11.plus(12)), 42.5+      a ↦ "Hello", b ↦ 42, c ↦ Φ.y(d ↦ "world", e ↦ 11.plus(f ↦ 12)), g ↦ 42.5     ),-    default-package ↦ Φ.number(42),+    default-package ↦ Φ.number(φ ↦ 42),     inline-voids(text, φ) ↦ ⟦ ⟧,     empty-inline-voids() ↦ ⟦       num ↦ 42
test-resources/parser-packs/ascii-with-braces.phi view
@@ -5,7 +5,7 @@       b -> Q.org.^.@,       c -> $.xyz(         q -> Q.y,-        ~0 -> $.a.b+        r -> $.a.b       ),       z -> [[         L> Func,@@ -14,8 +14,7 @@         num -> 42,         str -> "Hello, world!"       ]],-      w -> x(-42, "Hi", y, Q.io.text),+      w -> x(a -> -42, b -> "Hi", c -> y, d -> Q.io.text),       error -> T     ]]   ]]-
test-resources/parser-packs/ascii-with-global.phi view
@@ -4,7 +4,7 @@     b -> Q.org.^.@,     c -> $.xyz(       q -> Q.y,-      ~0 -> $.a.b+      r -> $.a.b     ),     z -> [[       L> Func,
test-resources/parser-packs/salty-fibo.phi view
@@ -5,27 +5,27 @@         fibonacci ↦ ⟦           n ↦ ∅,           φ ↦ ξ.n.lt(-            α0 ↦ Φ.number(-              α0 ↦ Φ.bytes(-                α0 ↦ ⟦ Δ ⤍ 40-00-00-00-00-00-00-00 ⟧+            x ↦ Φ.number(+              φ ↦ Φ.bytes(+                φ ↦ ⟦ Δ ⤍ 40-00-00-00-00-00-00-00 ⟧               )             )           ).if(-            α0 ↦ ξ.n,-            α1 ↦ Φ.eo.example.fibonacci(-              α0 ↦ ξ.n.minus(-                α0 ↦ Φ.number(-                  α0 ↦ Φ.bytes(-                    α0 ↦ ⟦ Δ ⤍ 3F-F0-00-00-00-00-00-00 ⟧+            left ↦ ξ.n,+            right ↦ Φ.eo.example.fibonacci(+              n ↦ ξ.n.minus(+                x ↦ Φ.number(+                  φ ↦ Φ.bytes(+                    φ ↦ ⟦ Δ ⤍ 3F-F0-00-00-00-00-00-00 ⟧                   )                 )               )             ).plus(-              α0 ↦ Φ.eo.example.fibonacci(-                α0 ↦ ξ.n.minus(-                  α0 ↦ Φ.number(-                    α0 ↦ Φ.bytes(-                      α0 ↦ ⟦ Δ ⤍ 40-00-00-00-00-00-00-00 ⟧+              x ↦ Φ.eo.example.fibonacci(+                n ↦ ξ.n.minus(+                  x ↦ Φ.number(+                    φ ↦ Φ.bytes(+                      φ ↦ ⟦ Δ ⤍ 40-00-00-00-00-00-00-00 ⟧                     )                   )                 )@@ -38,4 +38,3 @@       λ ⤍ Package     ⟧   ⟧-
test-resources/parser-packs/sweet-fibo.phi view
@@ -2,10 +2,10 @@   eo ↦ ⟦     example ↦ ⟦       fibonacci(n) ↦ ⟦-        φ ↦ n.lt(2).if(-          n,-          Φ.eo.example.fibonacci(n.minus(1)).plus(-            Φ.eo.example.fibonacci(n.minus(2))+        φ ↦ n.lt(x ↦ 2).if(+          left ↦ n,+          right ↦ Φ.eo.example.fibonacci(n ↦ n.minus(x ↦ 1)).plus(+            x ↦ Φ.eo.example.fibonacci(n ↦ n.minus(x ↦ 2))           )         )       ⟧,
− test-resources/phi-typos-packs/alpha-index-out-of-range.phi
@@ -1,3 +0,0 @@-[[-  r -> [[ x -> ? ]](~18446744073709551616 -> [[]])-]]
+ test-resources/phi-typos-packs/positional-argument.phi view
@@ -0,0 +1,3 @@+[[+  r -> [[ x -> ? ]](~0 -> [[]])+]]
+ test-resources/phi-typos-packs/positional-list.phi view
@@ -0,0 +1,3 @@+⟦+  r ↦ Φ.f(Φ.a, Φ.b)+⟧
− test-resources/rewriter-packs/basic/alpha-first.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ x -> ?, y -> [[ ]] ]](~0 -> Q.y)-output: |--  ⟦ x ↦ ∅, y ↦ ⟦ ⟧ ⟧(x ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-fourth.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ q -> $.y, w -> ?, z -> ?, x -> ?, y -> [[ ]] ]](~3 -> Q.y)-output: |--  [[ q -> $.y, w -> ?, z -> ?, x -> ?, y -> [[ ]] ]](x -> Q.y)
− test-resources/rewriter-packs/basic/alpha-rho-middle-skipped.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ a -> ?, ^ -> ?, x -> ? ]](~1 -> Q.y)-output: |--  ⟦ a ↦ ∅, ρ ↦ ∅, x ↦ ∅ ⟧(x ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-rho-void-before-x.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ ^ -> ?, x -> ? ]](~0 -> Q.y)-output: |--  ⟦ ρ ↦ ∅, x ↦ ∅ ⟧(x ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-second.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ q -> $.y, x -> ?, y -> [[ ]] ]](~1 -> Q.y)-output: |--  ⟦ q ↦ ξ.y, x ↦ ∅, y ↦ ⟦ ⟧ ⟧(x ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-simple.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ x -> ? ]](~0 -> Q.y)-output: |--  ⟦ x ↦ ∅ ⟧(x ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-skips-bound-rho.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ ^ -> Q.y, x -> ? ]](~0 -> Q.z)-output: |--  ⟦ ρ ↦ Φ.y, x ↦ ∅ ⟧(x ↦ Φ.z)
− test-resources/rewriter-packs/basic/alpha-skips-delta-asset.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ D> 42-, x -> ? ]](~0 -> Q.y)-output: |--  ⟦ Δ ⤍ 42-, x ↦ ∅ ⟧(x ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-skips-lambda-asset-hits-rho.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ L> Fn, x -> ? ]](~1 -> Q.y)-output: |--  ⟦ λ ⤍ Fn, x ↦ ∅ ⟧(α1 ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-skips-lambda-asset-out-of-range.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ L> Fn, x -> ? ]](~2 -> Q.y)-output: |--  ⟦ λ ⤍ Fn, x ↦ ∅ ⟧(α2 ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-skips-lambda-asset.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ L> Fn, x -> ? ]](~0 -> Q.y)-output: |--  ⟦ λ ⤍ Fn, x ↦ ∅ ⟧(x ↦ Φ.y)
− test-resources/rewriter-packs/basic/alpha-stops-at-idx.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ x -> ? ]](~2 -> Q.y)-output: |--  ∅:x( α2 ↦ Φ.y )
− test-resources/rewriter-packs/basic/alpha-stops-at-length.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['alpha']-input: |-  [[ x -> ?, y -> $.x ]](~1 -> Q.y)-output: |--  [[ x -> ?, y -> $.x ]](~1 -> Q.y)
− test-resources/rewriter-packs/basic/dca-from-paper.yaml
@@ -1,9 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----rules:-  basic: ['dca']-input: |-  ⊥(α0 ↦ ⟦ x ↦ ξ.t, t ↦ ∅ ⟧)-output: |--  ⊥
− test-resources/rewriter-packs/custom/concat-positional-bytes.yaml
@@ -1,18 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----input: '[[ x -> Q.bytes([[ D> 68-69 ]]) ]]'-output: |--  ⟦-    s ↦ "hi"-  ⟧-rules:-  custom:-    - name: concat positional bytes-      pattern: '[[ x -> !e1 ]]'-      result: '[[ s -> !e2 ]]'-      where:-        - meta: '!e2'-          function: concat-          args:-            - '!e1'
test-resources/rewriter-packs/custom/desugar-fibo.yaml view
@@ -6,10 +6,10 @@     eo ↦ ⟦       example ↦ ⟦         fibonacci(n) ↦ ⟦-          φ ↦ n.lt(2).if(-            n,-            Φ.eo.example.fibonacci(n.minus(1)).plus(-              Φ.eo.example.fibonacci(n.minus(2))+          φ ↦ n.lt(x ↦ 2).if(+            left ↦ n,+            right ↦ Φ.eo.example.fibonacci(n ↦ n.minus(x ↦ 1)).plus(+              x ↦ Φ.eo.example.fibonacci(n ↦ n.minus(x ↦ 2))             )           )         ⟧,@@ -25,26 +25,26 @@         fibonacci ↦ ⟦           n ↦ ∅,           φ ↦ ξ.n.lt(-            α0 ↦ Φ.number(+            x ↦ Φ.number(               φ ↦ Φ.bytes(                 φ ↦ ⟦ Δ ⤍ 40-00-00-00-00-00-00-00 ⟧               )             )           ).if(-            α0 ↦ ξ.n+            left ↦ ξ.n           )(-            α1 ↦ Φ.eo.example.fibonacci(-              α0 ↦ ξ.n.minus(-                α0 ↦ Φ.number(+            right ↦ Φ.eo.example.fibonacci(+              n ↦ ξ.n.minus(+                x ↦ Φ.number(                   φ ↦ Φ.bytes(                     φ ↦ ⟦ Δ ⤍ 3F-F0-00-00-00-00-00-00 ⟧                   )                 )               )             ).plus(-              α0 ↦ Φ.eo.example.fibonacci(-                α0 ↦ ξ.n.minus(-                  α0 ↦ Φ.number(+              x ↦ Φ.eo.example.fibonacci(+                n ↦ ξ.n.minus(+                  x ↦ Φ.number(                     φ ↦ Φ.bytes(                       φ ↦ ⟦ Δ ⤍ 40-00-00-00-00-00-00-00 ⟧                     )
− test-resources/rewriter-packs/custom/with-alpha-index.yaml
@@ -1,14 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----input: '[[ x -> ? ]](~0 -> Q.y)'-output: '⟦ x ↦ ∅ ⟧(α0 ↦ Φ)'-rules:-  custom:-    - name: with-alpha-index-      pattern: '[[ !B1 ]](α𝑖1 ↦ !e1)'-      result: '[[ !B1 ]](α𝑖1 ↦ Φ)'-      when:-        eq:-          - 𝑖1-          - 0
− test-resources/rewriter-packs/custom/with-alpha-meta.yaml
@@ -1,13 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----input: '[[x -> $.q, y -> Q.a]](~0 -> Q.x)'-output: |--  ⟦-    y ↦ Φ.a-  ⟧-rules:-  custom:-    - name: with-alpha-meta-      pattern: '[[!t1 -> $.q, !B1]](α𝑖1 ↦ !e1)'-      result: '[[!B1]]'
− test-resources/rewriter-packs/normalize/e-ald.yaml
@@ -1,8 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----normalize: true-input: |-  ⟦ k ↦ ⟦ x ↦ ∅ ⟧ ( α1 ↦ ⟦ Δ ⤍ 42- ⟧ ).x ⟧-output: |--  ⟦ k ↦ ⊥ ⟧
− test-resources/rewriter-packs/normalize/e-alp.yaml
@@ -1,8 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----normalize: true-input: |-  ⟦ k ↦ ⟦ x ↦ ∅ ⟧ ( α0 ↦ ⟦ Δ ⤍ 42- ⟧ ).x ⟧-output: |--  42-:Δ:k
− test-resources/rewriter-packs/normalize/e-ami.yaml
@@ -1,8 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----normalize: true-input: |-  ⟦ m ↦ ⟦ x ↦ ∅ ⟧ ( α2 ↦ ⟦⟧ ) ⟧-output: |--  ⟦ m ↦ ⊥ ⟧
− test-resources/rewriter-packs/normalize/e-ov2.yaml
@@ -1,8 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----normalize: true-input: |-  ⟦ x ↦ ∅, y ↦ ∅ ⟧( α0 ↦ ⟦⟧ )( α0 ↦ ⟦⟧ )-output: |--  ⊥
− test-resources/rewriter-packs/normalize/e-ova.yaml
@@ -1,8 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----normalize: true-input: |-  ⟦ x ↦ ⟦⟧, ρ ↦ ∅ ⟧( α0 ↦ ⟦⟧ )-output: |--  ⊥
test-resources/sodg-packs/bottom-dispatch.yaml view
@@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com # SPDX-License-Identifier: MIT ----input: '⟦ x ↦ ⊥.foo, y ↦ ⊥( α0 ↦ ⟦⟧ ) ⟧'+input: '⟦ x ↦ ⊥.foo, y ↦ ⊥( k ↦ ⟦⟧ ) ⟧' output: |   F c0 x y   T c1@@ -9,5 +9,5 @@   P c0 x c2   T c3   F c4-  A c5 c3 α0 c4+  A c5 c3 k c4   P c0 y c5
test-resources/sodg-packs/order.yaml view
@@ -1,13 +1,13 @@ # SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com # SPDX-License-Identifier: MIT ----input: '⟦ order(qty, price) ↦ ⟦ cost ↦ ξ.qty.mul( ξ.price ) ⟧ ⟧'+input: '⟦ order(qty, price) ↦ ⟦ cost ↦ ξ.qty.mul( x ↦ ξ.price ) ⟧ ⟧' output: |   F c0 order   F c1 qty price cost   D c2 c1 qty   D c3 c2 mul   D c4 c1 price-  A c5 c3 α0 c4+  A c5 c3 x c4   P c1 cost c5   P c0 order c1
+ test-resources/xmir-parsing-packs/alpha-application-arg.yaml view
@@ -0,0 +1,11 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+failure: true+xmir: |+  <object>+    <o name="x" base="Φ.f">+      <o as="α0" base="Φ.y"/>+    </o>+  </object>+phi: ''
− test-resources/xmir-parsing-packs/alpha-max-int-application-arg.yaml
@@ -1,10 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----xmir: |-  <object>-    <o name="x" base="Φ.f">-      <o as="α9223372036854775807" base="Φ.y"/>-    </o>-  </object>-phi: '⟦ x ↦ Φ.f( α9223372036854775807 ↦ Φ.y ) ⟧'
− test-resources/xmir-parsing-packs/alpha-negative-application-arg.yaml
@@ -1,11 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----failure: true-xmir: |-  <object>-    <o name="x" base="Φ.f">-      <o as="α-1" base="Φ.y"/>-    </o>-  </object>-phi: ''
− test-resources/xmir-parsing-packs/alpha-non-integer-application-arg.yaml
@@ -1,14 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----failure: true-xmir: |-  <object>-    <o name="app">-      <o name="x" base=".foo">-        <o base="Φ"/>-        <o as="αX" base="Φ.number"><o>40-14-00-00-00-00-00-00</o></o>-      </o>-    </o>-  </object>-phi: ''
− test-resources/xmir-parsing-packs/alpha-overflow-application-arg.yaml
@@ -1,11 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-----failure: true-xmir: |-  <object>-    <o name="x" base="Φ.f">-      <o as="α18446744073709551616" base="Φ.y"/>-    </o>-  </object>-phi: ''
+ test-resources/xmir-parsing-packs/application-arg-without-as.yaml view
@@ -0,0 +1,11 @@+# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com+# SPDX-License-Identifier: MIT+---+failure: true+xmir: |+  <object>+    <o name="x" base="Φ.f">+      <o base="Φ.y"/>+    </o>+  </object>+phi: ''
test-resources/xmir-parsing-packs/application-with-dispatch.yaml view
@@ -7,12 +7,12 @@     <o name="app">       <o name="x" base=".plus">         <o base="Φ.number">-          <o>00-00-00-01</o>+          <o as="φ">00-00-00-01</o>         </o>         <o as="arg" base="Φ.number">-          <o>00-00-00-02</o>+          <o as="φ">00-00-00-02</o>         </o>       </o>     </o>   </object>-phi: '[[ app -> [[ x -> Q.number([[ D> 00-00-00-01 ]]).plus(arg -> Q.number([[ D> 00-00-00-02 ]])) ]] ]]'+phi: '[[ app -> [[ x -> Q.number(@ -> [[ D> 00-00-00-01 ]]).plus(arg -> Q.number(@ -> [[ D> 00-00-00-02 ]])) ]] ]]'
test-resources/xmir-parsing-packs/application.yaml view
@@ -6,8 +6,8 @@   <object>     <o name="app">       <o name="x" base="Φ.org.eolang">-        <o base="Φ.x"/>-        <o as="α1" base=".plus">+        <o as="first" base="Φ.x"/>+        <o as="second" base=".plus">           <o base="Φ.y"/>         </o>         <o as="arg">@@ -16,4 +16,4 @@       </o>     </o>   </object>-phi: '[[ app -> [[ x -> Q.org.eolang(~0 -> Q.x)(~1 -> Q.y.plus)(arg -> [[ y -> $ ]]) ]] ]]'+phi: '[[ app -> [[ x -> Q.org.eolang(first -> Q.x)(second -> Q.y.plus)(arg -> [[ y -> $ ]]) ]] ]]'
test-resources/xmir-parsing-packs/phi-with-application.yaml view
@@ -5,9 +5,9 @@   <object>     <o name="app">       <o name="x" base="Φ">-        <o base="Φ.y"/>+        <o as="b" base="Φ.y"/>         <o as="a" base="ξ"/>       </o>     </o>   </object>-phi: '[[ app -> [[ x -> Q(~0 -> Q.y, a -> $) ]] ]]'+phi: '[[ app -> [[ x -> Q(b -> Q.y, a -> $) ]] ]]'
test-resources/xmir-parsing-packs/termination-with-application.yaml view
@@ -5,8 +5,8 @@   <object>     <o name="app">       <o name="x" base="⊥">-        <o base="Φ.number"/>+        <o as="b" base="Φ.number"/>       </o>     </o>   </object>-phi: '[[ app -> [[ x -> T(Q.number) ]] ]]'+phi: '[[ app -> [[ x -> T(b -> Q.number) ]] ]]'
test-resources/xmir-parsing-packs/xi-with-application.yaml view
@@ -5,8 +5,8 @@   <object>     <o name="app">       <o name="x" base="ξ">-        <o base="Φ.y"/>+        <o as="b" base="Φ.y"/>       </o>     </o>   </object>-phi: '[[ app -> [[ x -> $(~0 -> Q.y) ]] ]]'+phi: '[[ app -> [[ x -> $(b -> Q.y) ]] ]]'
test-resources/xmir-printing-packs/application.yaml view
@@ -6,11 +6,11 @@   [[     foo -> [[       @ -> $.^.z,-      bar -> Q.y(5, "foo")+      bar -> Q.y(a -> 5, b -> "foo")     ]]   ]] xpaths:   - '/object/o[@name="foo" and o[2][@base="Φ.y"]]'-  - '/object/o/o/o[@as="α0" and @base="Φ.number"]'-  - '/object/o/o/o[@as="α1" and @base="Φ.string"]'+  - '/object/o/o/o[@as="a" and @base="Φ.number"]'+  - '/object/o/o/o[@as="b" and @base="Φ.string"]'   - '/object/o/o[@name="φ" and @base="ξ.ρ.z"]'
− test-resources/xmir-printing-packs/legacy-positional-data-object.yaml
@@ -1,16 +0,0 @@-# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com-# SPDX-License-Identifier: MIT-# yamllint disable rule:line-length-----# jeo-maven-plugin versions before 0.15.3 emit the as-bytes/data pair of a-# primitive data object positionally (α0) instead of by name; 'matchDataObject'-# in AST.hs still recognizes that legacy form, so it must print exactly like-# the modern named form.-phi: |-  [[-    x -> Q.number(~0 -> Q.bytes(~0 -> [[ D> 40-14-00-00-00-00-00-00 ]]))-  ]]-xpaths:-  - '/object/o[@name="x" and @base="Φ.number"]'-  - '/object/o/o[@as="φ" and @base="Φ.bytes"]'-  - '/object/o/o/o[@as="φ"]'
test/ASTSpec.hs view
@@ -31,25 +31,6 @@           it desc $ show attr `shouldBe` expected       ) -  describe "Attribute Show instance renders AtAlpha" $-    forM_-      [ ("zero index", Alpha 0, "α0")-      , ("positive index", Alpha 42, "α42")-      , ("large index", Alpha 999, "α999")-      ]-      ( \(desc, attr, expected) ->-          it desc $ show attr `shouldBe` expected-      )--  describe "Alpha Eq instance compares same constructors" $-    forM_-      [ ("alphas equal", Alpha 1, Alpha 1, True)-      , ("alphas differ", Alpha 1, Alpha 2, False)-      ]-      ( \(desc, lhs, rhs, expected) ->-          it desc $ (lhs == rhs) `shouldBe` expected-      )-   describe "Attribute Show instance renders special attributes" $     forM_       [ ("rho", AtRho, "ρ")@@ -231,7 +212,7 @@       , ("deeply nested dispatch", ExDispatch (ExDispatch ExRoot (AtLabel "a")) (AtLabel "b"), 5)       , ("formation with dispatch inside", ExFormation [BiTau AtRho (ExDispatch ExRoot (AtLabel "x"))], 7)       , ("application with tau argument", ExApplication ExRoot (ArTau AtRho ExRoot), 6)-      , ("application with alpha argument", ExApplication ExRoot (ArAlpha (Alpha 0) ExRoot), 6)+      , ("application with a named argument", ExApplication ExRoot (ArTau (AtLabel "kx") ExRoot), 6)       , ("phi-meet wraps its inner count", ExPhiMeet Nothing 1 (ExDispatch ExRoot (AtLabel "x")), 3)       , ("phi-meet with label wraps its inner count", ExPhiMeet (Just "m") 2 ExRoot, 1)       , ("phi-again wraps its inner count", ExPhiAgain Nothing 1 (ExDispatch ExRoot (AtLabel "x")), 3)@@ -243,7 +224,7 @@       )    describe "hashExpression" $ do-    it "hashes every Expression/Binding/Bytes/Attribute/Argument/Alpha/Function constructor without collisions" $+    it "hashes every Expression/Binding/Bytes/Attribute/Argument/Function constructor without collisions" $       let exprs =             [ ExFormation []             , ExFormation [BiTau AtRho ExRoot]@@ -259,8 +240,8 @@             , ExRoot             , ExTermination             , ExApplication ExRoot (ArTau AtRho ExXi)-            , ExApplication ExRoot (ArAlpha (Alpha 3) ExXi)-            , ExApplication ExRoot (ArAlpha (AlMeta "A") ExXi)+            , ExApplication ExRoot (ArTau (AtLabel "x") ExXi)+            , ExApplication ExRoot (ArTau (AtMeta "A") ExXi)             , ExDispatch ExRoot (AtLabel "x")             , ExDispatch ExRoot AtPhi             , ExDispatch ExRoot AtRho@@ -390,7 +371,7 @@           depths :: Map.Map T.Text Int           depths = List.foldl' (\kept (name, term) -> Map.insert name (deepness look (`Map.lookup` kept) term) kept) Map.empty (Map.toAscList terms)           whole :: Expression-          whole = ExApplication three (ArAlpha (Alpha 0) (ExMeta "n·2"))+          whole = ExApplication three (ArTau (AtLabel "arg") (ExMeta "n·2"))        in deepness look (`Map.lookup` depths) whole `shouldBe` deepness look (const Nothing) whole    describe "reaches" $ do@@ -502,19 +483,6 @@             )         , Just (BtOne "05")         )-      ,-        ( "matches the legacy positional (alpha0) form on both layers"-        , ExApplication-            (ExDispatch ExRoot (AtLabel "number"))-            ( ArAlpha-                (Alpha 0)-                ( ExApplication-                    (ExDispatch ExRoot (AtLabel "bytes"))-                    (ArAlpha (Alpha 0) (ExFormation [BiDelta (BtOne "05")]))-                )-            )-        , Just (BtOne "05")-        )       ]       ( \(desc, expr, expected) ->           it desc $@@ -584,7 +552,7 @@     it "does not take a dispatch on a formation for inert" $       inert (ExDispatch (ExFormation [BiTau (AtLabel "hm") ExRoot]) (AtLabel "hm")) `shouldBe` False     it "does not take an application of ⊥ for inert" $-      inert (ExApplication ExTermination (ArAlpha (Alpha 2) ExXi)) `shouldBe` False+      inert (ExApplication ExTermination (ArTau (AtLabel "zwei") ExXi)) `shouldBe` False     it "does not take a formation holding both λ and Δ for inert" $       inert (ExFormation [BiDelta (BtOne "3F"), BiVoid AtRho, BiLambda (Function "L_ep")]) `shouldBe` False     it "does not take a formation holding a redex deep inside for inert" $@@ -626,8 +594,8 @@    describe "Expression Show instance" $     it "does not show what a node carries besides its parts" $-      show (ExApplication (ExDispatch ExXi (AtLabel "yb")) (ArAlpha (Alpha 0) (ExFormation [BiVoid AtRho])))-        `shouldBe` "ExApplication (ExDispatch ExXi yb) (ArAlpha α0 (ExFormation [BiVoid ρ]))"+      show (ExApplication (ExDispatch ExXi (AtLabel "yb")) (ArTau (AtLabel "kl") (ExFormation [BiVoid AtRho])))+        `shouldBe` "ExApplication (ExDispatch ExXi yb) (ArTau kl (ExFormation [BiVoid ρ]))"    describe "lifted" $ do     it "raises every symbol above the floor by the offset" $
test/AbridgeSpec.hs view
@@ -95,7 +95,7 @@     it "folds a long application its dispatch is made of" $       printExpressionWith         (const (abridged True 64))-        (ExDispatch (foldl (\expr idx -> ExApplication expr (ArAlpha (Alpha idx) (ExDispatch ExRoot (AtLabel "langer-name")))) (ExDispatch ExRoot (AtLabel "fluss")) [0 .. 5 :: Int]) (AtLabel "ufer"))+        (ExDispatch (foldl (\expr idx -> ExApplication expr (ArTau (AtLabel (T.pack ("arm" ++ show idx))) (ExDispatch ExRoot (AtLabel "langer-name")))) (ExDispatch ExRoot (AtLabel "fluss")) [0 .. 5 :: Int]) (AtLabel "ufer"))         (SWEET, UNICODE, SINGLELINE, defaultMargin)         `shouldBe` "Φ.fluss( +6 ).ufer"     it "cuts a long byte string to its first bytes, its last bytes and the count of the bytes between them" $
test/BuilderSpec.hs view
@@ -86,16 +86,10 @@             )         )       ,-        ( "Q.c(α!i -> !e) => (!i >> 2, !e >> $) => Q.c(α2 -> $)"-        , ExApplication (ExDispatch ExRoot (AtLabel "c")) (ArAlpha (AlMeta "i") (ExMeta "e"))-        , [("i", MvIndex 2), ("e", MvExpression ExXi)]-        , Right (ExApplication (ExDispatch ExRoot (AtLabel "c")) (ArAlpha (Alpha 2) ExXi))-        )-      ,-        ( "Q.c(α!i -> Q) => () => X"-        , ExApplication (ExDispatch ExRoot (AtLabel "c")) (ArAlpha (AlMeta "i") ExRoot)+        ( "Q.c(!t -> Q) => () => X"+        , ExApplication (ExDispatch ExRoot (AtLabel "c")) (ArTau (AtMeta "t") ExRoot)         , []-        , Left "meta 'i' is either does not exist or refers to an inappropriate term"+        , Left "meta 't' is either does not exist or refers to an inappropriate term"         )       ] 
test/CLISpec.hs view
@@ -12,4681 +12,4782 @@ import Control.Exception import Control.Monad (forM_, unless) import Data.Char (isDigit)-import Data.List (intercalate, isInfixOf, isPrefixOf, sort)-import Data.Text qualified as T-import Data.Time.Clock (addUTCTime, getCurrentTime)-import Data.Time.Clock.POSIX (getPOSIXTime)-import Data.Version (showVersion)-import Files (allPathsIn)-import Fixtures (explainPack, lambdasFile, loopingLambdas, readProtocol, readUtf8, recording, withLambdasOf)-import GHC.IO.Encoding (TextEncoding (textEncodingName), getFileSystemEncoding)-import GHC.IO.Handle-import Paths_phino (version)-import System.Directory (createDirectoryIfMissing, doesDirectoryExist, doesFileExist, getTemporaryDirectory, listDirectory, makeAbsolute, removeDirectoryRecursive, removeFile, removePathForcibly, setModificationTime, withCurrentDirectory)-import System.Exit (ExitCode (ExitFailure))-import System.FilePath (takeFileName, (</>))-import System.IO-import System.Timeout (timeout)-import Test.Hspec-import Text.Printf (printf)-import Text.XML qualified as X--withStdin :: String -> IO a -> IO a-withStdin input action =-  bracket (openTempFile "." "stdinXXXXXX.tmp") cleanup $ \(filePath, h) -> do-    hSetEncoding h utf8-    hPutStr h input-    hFlush h-    hClose h-    withFile filePath ReadMode $ \hIn -> do-      hSetEncoding hIn utf8-      bracket (hDuplicate stdin) restoreStdin $ \_ -> do-        hDuplicateTo hIn stdin-        hSetEncoding stdin utf8-        action-  where-    restoreStdin orig = hDuplicateTo orig stdin >> hClose orig-    cleanup (fp, _) = removeFile fp--withStdout :: IO a -> IO (String, a)-withStdout action =-  bracket-    (openTempFile "." "stdoutXXXXXX.tmp")-    cleanup-    ( \(path, hTmp) -> do-        hSetEncoding hTmp utf8-        oldOut <- hDuplicate stdout-        oldErr <- hDuplicate stderr-        hDuplicateTo hTmp stdout-        hDuplicateTo hTmp stderr--        result <--          action `finally` do-            hFlush stdout-            hFlush stderr-            hDuplicateTo oldOut stdout >> hClose oldOut-            hDuplicateTo oldErr stderr >> hClose oldErr-            hClose hTmp--        captured <- readFile path-        _ <- evaluate (length captured)-        return (captured, result)-    )-  where-    cleanup (fp, _) = removeFile fp--withTempFile :: String -> ((FilePath, Handle) -> IO a) -> IO a-withTempFile pattern =-  bracket-    (openTempFile "." pattern)-    (\(path, _) -> removeFile path)--withTempFileContent :: String -> String -> (FilePath -> IO a) -> IO a-withTempFileContent pattern content action =-  withTempFile pattern $ \(path, h) -> do-    hPutStr h content-    hClose h-    action path--withTempDirectory :: String -> (FilePath -> IO a) -> IO a-withTempDirectory prefix action = do-  tmp <- getTemporaryDirectory-  stamp <- getPOSIXTime-  let dir = tmp </> (prefix ++ "-" ++ show (round (stamp * 1000000) :: Integer))-  bracket (pure dir) removedEventually action-  where-    removedEventually :: FilePath -> IO ()-    removedEventually = retrying (10 :: Int)-      where-        retrying 0 dir = removePathForcibly dir-        retrying left dir = removePathForcibly dir `catch` \(_ :: IOException) -> threadDelay 200000 >> retrying (left - 1) dir--testCLI' :: [String] -> [String] -> Either ExitCode () -> Expectation-testCLI' args outputs exit = do-  (out, result) <- withStdout (try (runCLI args) :: IO (Either ExitCode ()))-  if null outputs-    then-      unless (null out) $-        expectationFailure ("Expected that output is empty, but got:\n" ++ out)-    else-      forM_-        outputs-        ( \output ->-            unless (output `isInfixOf` out) $-              expectationFailure-                ("Expected that output contains:\n" ++ output ++ "\nbut got:\n" ++ out)-        )-  result `shouldBe` exit--testCLISucceeded :: [String] -> [String] -> Expectation-testCLISucceeded args outputs = testCLI' args outputs (Right ())--symbolic :: String-symbolic = "--symbolic=" ++ lambdasFile--testCLIFailed :: [String] -> [String] -> Expectation-testCLIFailed args outputs = testCLI' args outputs (Left (ExitFailure 1))--resource :: String -> String-resource file = "test-resources/cli/expressions/" <> file--rule :: String -> String-rule file = "--rule=test-resources/cli/rules/" <> file--spec :: Spec-spec = do-  describe "regex execution limits" $ do-    forM_-      [ ("matches", ["  matches: ['^(a|b)*$', '!e1']"])-      , ("or", ["  or:", "    - matches: ['^(a|b)*$', '!e1']", "    - eq: [1, 1]"])-      ]-      ( \(desc, condition) ->-          it ("fails normally when a " ++ desc ++ " condition exceeds the recursion limit") $-            withTempFileContent-              "regex-limit.yaml"-              ( unlines-                  ( [ "name: mt"-                    , "pattern: '[[ x -> !e1 ]]'"-                    , "result: '[[ y -> !e1 ]]'"-                    , "when:"-                    ]-                      ++ condition-                  )-              )-              ( \path ->-                  withStdin ("[[ x -> \"" ++ replicate 9000 'a' ++ "\" ]]") $-                    testCLIFailed ["rewrite", "--sweet", "--rule=" ++ path] ["Regex execution failed:"]-              )-      )--    forM_ ["(a|b)*", "(ab)+"] $ \pattern ->-      forM_ ["", "g"] $ \flag ->-        it ("fails normally when sed exceeds the recursion limit with " ++ pattern ++ " and flag '" ++ flag ++ "'") $-          withTempFileContent-            "regex-limit.yaml"-            ( unlines-                [ "name: sed-limit"-                , "pattern: '[[ x -> !e1 ]]'"-                , "result: '[[ y -> !e2 ]]'"-                , "where:"-                , "  - meta: '!e2'"-                , "    function: sed"-                , "    args: ['!e1', '\"s/" ++ pattern ++ "/X/" ++ flag ++ "\"']"-                ]-            )-            ( \path ->-                withStdin ("[[ x -> \"" ++ concat (replicate 10000 "ab") ++ "\" ]]") $-                  testCLIFailed ["rewrite", "--sweet", "--rule=" ++ path] ["Regex execution failed:"]-            )--  it "prints version" $-    testCLISucceeded ["--version"] [showVersion version]--  it "prints help" $-    testCLISucceeded-      ["--help"]-      ["Phino - CLI Manipulator of 𝜑-Calculus Expressions", "Usage:"]--  describe "--pin" $-    forM_-      [-        ( "succeeds when --pin matches actual version"-        , ["--pin=" ++ showVersion version, "rewrite", "--sweet"]-        , testCLISucceeded-        , ["⟦⟧"]-        )-      ,-        ( "fails when --pin doesn't match actual version"-        , ["--pin=9.9.9.9", "rewrite"]-        , testCLIFailed-        , ["Version mismatch: --pin requires '9.9.9.9', but this is phino " ++ showVersion version]-        )-      ,-        ( "fails when --pin is empty"-        , ["--pin=", "rewrite"]-        , testCLIFailed-        , ["Version mismatch: --pin requires ''"]-        )-      ]-      (\(desc, args, test, expected) -> it desc (withStdin "[[ ]]" (test args expected)))--  describe "--pin-file" $-    forM_-      [-        ( "succeeds when --pin-file holds actual version among spaces"-        , Just ("  \n" ++ showVersion version ++ " \t\n\n")-        , testCLISucceeded-        , ["⟦⟧"]-        )-      ,-        ( "fails when --pin-file holds another version"-        , Just "7.3.0.41\n"-        , testCLIFailed-        , ["Version mismatch: --pin requires '7.3.0.41', but this is phino " ++ showVersion version]-        )-      ,-        ( "fails when --pin-file is empty"-        , Just " \n"-        , testCLIFailed-        , ["Version mismatch: --pin requires ''"]-        )-      ,-        ( "fails when --pin-file is absent"-        , Nothing-        , testCLIFailed-        , ["does not exist"]-        )-      ]-      ( \(desc, content, test, expected) ->-          it desc $-            withTempDirectory "phino-pin-file" $ \dir -> do-              createDirectoryIfMissing True dir-              let file = dir </> "vérsion.txt"-              forM_ content (writeFile file)-              withStdin "[[ ]]" (test ["--pin-file=" ++ file, "rewrite", "--sweet"] expected)-      )--  it "fails when both --pin and --pin-file are given" $-    withTempFileContent "pin-versionXXXXXX.txt" (showVersion version ++ "\n") $ \file ->-      withStdin "[[ ]]" $-        testCLIFailed-          ["--pin=" ++ showVersion version, "--pin-file=" ++ file, "rewrite"]-          ["[ERROR]: Invalid option `--pin-file=" ++ file ++ "'"]--  describe "--cheat" $ do-    it "drops a ρ applied to a term that already ends with one" $-      withStdin "[[ a -> Q.x(^ -> [[ ]]), b -> [[ ]] ]].a" $-        testCLISucceeded ["rewrite", "--normalize", "--flat", "--sweet", "--cheat"] ["Φ.x( ρ ↦ ⟦⟧ )"]-    it "keeps every ρ the rules prescribe without it" $-      withStdin "[[ a -> Q.x(^ -> [[ ]]), b -> [[ ]] ]].a" $-        testCLISucceeded ["rewrite", "--normalize", "--flat", "--sweet"] ["Φ.x( ρ ↦ ⟦⟧, ρ ↦ ⟦ a ↦ Φ.x( ρ ↦ ⟦⟧ ), b ↦ ⟦⟧ ⟧ )"]-    it "keeps the terms of nested forks small while dataizing" $-      withTempFileContent "cheat-atomsXXXXXX.yaml" "- λ: L_eq\n  𝑛: '⟦ if ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ⟧'\n- λ: L_fork\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    'on': $.on🌵\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n" $ \atoms ->-        withStdin "[[ eq -> L_eq:λ, false -> [[ if(left, right) -> right:φ ]], entry -> [[ φ -> s.if(s, s), s -> Q.outer ]], outer -> [[ φ -> h.if(Q.good, h), h -> Q.inner ]], good -> [[ φ -> Q.eq, text -> [[ D> 00- ]] ]], inner -> Q.eq.if(Q.false, Q.eq.if(Q.false, Q.good)), e1 -> Q.entry.text ]]" $-          testCLISucceeded ["dataize", "--cheat", "--acyclic=plausible", "--max-loops=1", "--max-nodes=5000", "--locator=Q.e1", "--symbolic=" ++ atoms] ["00-"]-    it "lets the terms of nested forks grow while dataizing without it" $-      withTempFileContent "cheat-atomsXXXXXX.yaml" "- λ: L_eq\n  𝑛: '⟦ if ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ⟧'\n- λ: L_fork\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    'on': $.on🌵\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n" $ \atoms ->-        withStdin "[[ eq -> L_eq:λ, false -> [[ if(left, right) -> right:φ ]], entry -> [[ φ -> s.if(s, s), s -> Q.outer ]], outer -> [[ φ -> h.if(Q.good, h), h -> Q.inner ]], good -> [[ φ -> Q.eq, text -> [[ D> 00- ]] ]], inner -> Q.eq.if(Q.false, Q.eq.if(Q.false, Q.good)), e1 -> Q.entry.text ]]" $-          testCLIFailed ["dataize", "--acyclic=plausible", "--max-loops=1", "--max-nodes=5000", "--locator=Q.e1", "--symbolic=" ++ atoms] ["--max-nodes=5000"]--  describe "--hide-rho" $-    forM_-      [-        ( "drops every rho binding from the default salty output"-        , "[[ foo -> [[ x -> [[ ]], ^ -> $.y ]], y -> [[ ]] ]]"-        , ["rewrite", "--flat", "--hide-rho"]-        , ["⟦ foo ↦ ⟦ x ↦ ⟦⟧ ⟧, y ↦ ⟦⟧ ⟧"]-        )-      ,-        ( "also drops the rho that --sweet leaves behind"-        , "[[ foo -> [[ x -> [[ ]], ^ -> $.y ]], y -> [[ ]] ]]"-        , ["rewrite", "--flat", "--sweet", "--hide-rho"]-        , ["⟦ foo ↦ ⟦⟧:x, y ↦ ⟦⟧ ⟧"]-        )-      ,-        ( "keeps sweet numeric literals intact"-        , "[[ a -> 42 ]]"-        , ["rewrite", "--flat", "--sweet", "--hide-rho"]-        , ["42.0:a"]-        )-      ,-        ( "keeps the one-binding sugar after inline voids"-        , "[[ x(y) -> [[ a -> 42, ^ -> ? ]] ]]"-        , ["rewrite", "--flat", "--sweet", "--hide-rho"]-        , ["⟦ x(y) ↦ 42.0:a ⟧"]-        )-      ,-        ( "prints a lone void as the term without the rho would be printed"-        , "⟦ a ↦ ⟦ x ↦ ⟦ ρ ↦ ξ, y ↦ ∅ ⟧ ⟧ ⟧"-        , ["rewrite", "--sweet", "--hide-rho"]-        , ["⟦ x(y) ↦ ⟦⟧ ⟧:a"]-        )-      ,-        ( "indents the body as the term without the rho would be indented"-        , "⟦ a ↦ ⟦ x ↦ ⟦ ρ ↦ ∅, b ↦ ⟦ c ↦ ∅, ρ ↦ ∅ ⟧ ⟧ ⟧ ⟧"-        , ["rewrite", "--sweet", "--hide-rho", "--margin=3"]-        , ["⟦\n  b(c) ↦ ⟦⟧\n⟧:x:a"]-        )-      ,-        ( "prints positional arguments as such once the rho is gone"-        , "⟦ a ↦ ξ.b(ρ ↦ ξ, α0 ↦ ξ.c, α1 ↦ ξ.d) ⟧"-        , ["rewrite", "--flat", "--sweet", "--hide-rho"]-        , ["b( c, d ):a"]-        )-      ,-        ( "drops the rho from the LaTeX output too"-        , "[[ n -> [[ ^ -> ?, k -> $ ]] ]]"-        , ["rewrite", "--flat", "--hide-rho", "--output=latex"]-        , ["[[ |n| -> [[ |k| -> \\phiTerminal{\\xi} ]] ]]"]-        )-      ,-        ( "drops the rho argument of a number literal from the LaTeX output"-        , "42(ρ ↦ ξ)"-        , ["rewrite", "--flat", "--hide-rho", "--output=latex"]-        , ["Q . |number| ( @ -> Q . |bytes| ( @ -> [[ D> |40-45-00-00-00-00-00-00| ]] ) ){.}"]-        )-      ,-        ( "drops only the rho argument of a string literal from the LaTeX output"-        , "\"s\"(ρ ↦ ⊥, b ↦ Φ)"-        , ["rewrite", "--flat", "--hide-rho", "--output=latex"]-        , ["Q . |string| ( @ -> Q . |bytes| ( @ -> [[ D> |73-| ]] ) ) ( |b| -> Q ){.}"]-        )-      ,-        ( "drops the rho argument of a non-finite literal from the LaTeX output"-        , "Φ.nan(ρ ↦ ξ)"-        , ["rewrite", "--flat", "--hide-rho", "--output=latex"]-        , ["Q . |number| ( @ -> Q . |bytes| ( @ -> [[ D> |7F-F8-00-00-00-00-00-00| ]] ) ){.}"]-        )-      ]-      (\(desc, input, args, expected) -> it desc (withStdin input (testCLISucceeded args expected)))--  it "keeps a data literal sugared when it is applied to more arguments" $-    withStdin "⟦ i ↦ 42(z ↦ ξ.f), s ↦ \"Hello\"(z ↦ ξ.f) ⟧" $-      testCLISucceeded ["rewrite", "--sweet", "--flat"] ["⟦ i ↦ 42.0( z ↦ f ), s ↦ \"Hello\"( z ↦ f ) ⟧"]--  it "prints the one-binding sugar after inline voids with --sweet" $-    withStdin "[[ x(y) -> [[ a -> 42 ]] ]]" $-      testCLISucceeded ["rewrite", "--sweet"] ["⟦ x(y) ↦ 42.0:a ⟧"]--  it "prints debug info with --log-level=DEBUG" $-    withStdin "[[]]" $-      testCLISucceeded ["rewrite", "--log-level=DEBUG"] ["[DEBUG]:"]--  describe "--log-level accepts every named level" $-    forM_-      ["INFO", "info", "ERROR", "ERR", "error", "NONE", "none"]-      ( \flagValue ->-          it ("--log-level=" ++ flagValue) $-            withStdin "[[]]" $-              testCLISucceeded ["rewrite", "--log-level=" ++ flagValue] ["⟧"]-      )--  describe "--log-level prints nothing below its level" $-    forM_-      [("NONE", ["[DEBUG]", "[INFO]"]), ("ERROR", ["[DEBUG]", "[INFO]"]), ("INFO", ["[DEBUG]"])]-      ( \(level, hidden) ->-          it ("--log-level=" ++ level) $-            withStdin "[[]]" $ do-              (out, _) <- withStdout (try (runCLI ["rewrite", "--log-level=" ++ level]) :: IO (Either ExitCode ()))-              forM_ hidden (out `shouldNotContain`)-      )--  it "fails on an unrecognized --log-level value" $-    withStdin "[[]]" $-      testCLIFailed ["rewrite", "--log-level=verbose"] ["unknown log-level: verbose"]--  describe "rewriting" $ do-    let xmir =-          unlines-            [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-            , "<object>"-            , "  <o name=\"bar\">"-            , "    <o base=\"∅\" name=\"x\"/>"-            , "  </o>"-            , "</object>"-            ]-    describe "fails" $ do-      forM_-        [ ("with --input=latex", "", ["rewrite", "--input=latex"], ["The value 'latex' can't be used for '--input' option"])-        , ("with negative --log-lines", "", ["rewrite", "--log-lines=-2"], ["--log-lines must be >= -1"])-        , ("with negative --max-depth", "", ["rewrite", "--max-depth=-1"], ["--max-depth must be positive"])-        , ("with zero --max-cycles", "", ["rewrite", "--max-cycles=0"], ["--max-cycles must be positive"])-        , ("with zero --meet-length", "", ["rewrite", "--output=latex", "--meet-length=0"], ["--meet-length must be positive"])-        , ("with a --max-cycles value above maxBound Int", "", ["rewrite", "--max-cycles=18446744073709551617"], ["value must be between", "9223372036854775807"])-        ,-          ( "with --normalize and --must=1"-          , "[[ x -> [[ y -> 5 ]].y ]].x"-          , ["rewrite", "--max-cycles=2", "--max-depth=1", "--normalize", "--must=1"]-          , ["it's expected rewriting cycles to be in range [1], but rewriting has already reached 2"]-          )-        , ("when --in-place is used without input file", "[[ ]]", ["rewrite", "--in-place"], ["--in-place requires an input file"])-        ]-        (\(desc, input, args, expected) -> it desc (withStdin input (testCLIFailed args expected)))--      it "when --in-place is used with --target" $-        withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do-          hPutStr h "[[ ]]"-          hClose h-          testCLIFailed-            ["rewrite", "--in-place", "--target=output.phi", path]-            ["--in-place and --target cannot be used together"]--      it "fails when --in-place is used with a non-phi output format" $-        withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do-          hPutStr h "[[ ]]"-          hClose h-          testCLIFailed-            ["rewrite", "--in-place", "--output=latex", path]-            ["The option --in-place requires the output format to match the input format"]--      it "requires an XMIR input to be written back as XMIR" $-        withTempFileContent "inplaceXXXXXX.xmir" xmir $ \path ->-          testCLIFailed-            ["rewrite", "--input=xmir", "--in-place", path]-            ["The option --in-place requires the output format to match the input format"]--      it "does not leak a HasCallStack backtrace into errors" $ do-        (out, _) <- withStdout (try (runCLI ["rewrite", "--in-place"]) :: IO (Either ExitCode ()))-        out `shouldNotContain` "HasCallStack backtrace"-        out `shouldNotContain` "ExitFailure 1"-        out `shouldContain` "[ERROR]:"--      it "prints optparse errors once, without a backtrace" $ do-        (out, _) <- withStdout (try (runCLI ["rewrite", "--badopt"]) :: IO (Either ExitCode ()))-        out `shouldNotContain` "HasCallStack backtrace"-        out `shouldNotContain` "ExitFailure 1"-        out `shouldContain` "[ERROR]:"--      forM_-        [ ("when --update is used without --target", "[[ ]]", ["rewrite", "--update"], ["--update requires --target"])-        ,-          ( "when --update is used without an input file"-          , "[[ ]]"-          , ["rewrite", "--update", "--target=output.phi"]-          , ["--update requires an input file"]-          )-        ,-          ( "when --sequence is used with --in-place"-          , "[[ ]]"-          , ["rewrite", "--sequence", "--in-place", "input.phi"]-          , ["--in-place and --sequence cannot be used together"]-          )-        ,-          ( "when --focus is used with --in-place"-          , "[[ ]]"-          , ["rewrite", "--focus=Q.y", "--in-place", "input.phi"]-          , ["--in-place and --focus cannot be used together"]-          )-        ,-          ( "when --show is used with --in-place"-          , "[[ ]]"-          , ["rewrite", "--show=Q.y", "--in-place", "input.phi"]-          , ["--in-place and --show cannot be used together"]-          )-        ,-          ( "when --update is used with --in-place"-          , "[[ ]]"-          , ["rewrite", "--update", "--in-place", "input.phi"]-          , ["--update and --in-place cannot be used together"]-          )-        ,-          ( "when --hide is used with --in-place"-          , "[[ ]]"-          , ["rewrite", "--hide=Q.y", "--in-place", "input.phi"]-          , ["--in-place and --hide cannot be used together"]-          )-        ,-          ( "when --hide-rho is used with --in-place"-          , "[[ ]]"-          , ["rewrite", "--hide-rho", "--in-place", "input.phi"]-          , ["--in-place and --hide-rho cannot be used together"]-          )-        ,-          ( "with --depth-sensitive"-          , "[[ x -> \"x\"]]"-          , ["rewrite", "--depth-sensitive", "--max-depth=1", "--max-cycles=1", rule "infinite.yaml"]-          , ["[ERROR]: With option --depth-sensitive it's expected rewriting iterations amount does not reach the limit: --max-depth=1"]-          )-        ,-          ( "with looping rules"-          , "[[ x -> \"0\" ]]"-          , ["rewrite", rule "first.yaml", rule "second.yaml", "--max-depth=1", "--max-cycles=3"]-          , ["it seems rewriting is looping"]-          )-        ]-        (\(desc, input, args, expected) -> it desc (withStdin input (testCLIFailed args expected)))--      it "with wrong attribute and valid error message" $-        testCLIFailed-          ["rewrite", resource "with-$this-attribute.phi"]-          [ "[ERROR]: Couldn't parse given phi expression, cause:"-          , "unexpected"-          ]--      forM_-        [-          ( "with --output != latex and --nonumber"-          , ["rewrite", "--nonumber", "--output=xmir"]-          , ["The --nonumber option can stay together with --output=latex only"]-          )-        , ("with --omit-listing and --output != xmir", ["rewrite", "--omit-listing", "--output=phi"], ["--omit-listing"])-        , ("with --omit-comments and --output != xmir", ["rewrite", "--omit-comments", "--output=phi"], ["--omit-comments"])-        ,-          ( "with --expression and --output != latex"-          , ["rewrite", "--expression=foo", "--output=phi"]-          , ["--expression option can stay together with --output=latex only"]-          )-        ,-          ( "with --label and --output != latex"-          , ["rewrite", "--label=foo", "--output=phi"]-          , ["--label option can stay together with --output=latex only"]-          )-        ,-          ( "with a '%' in --meet-prefix and --output=latex"-          , ["rewrite", "--meet-prefix=a%b", "--output=latex"]-          , ["The --meet-prefix option must contain only letters, numbers, colons, periods, underscores, and hyphens"]-          )-        ,-          ( "with a '}' in --meet-prefix and --output=latex"-          , ["rewrite", "--meet-prefix=a}b", "--output=latex"]-          , ["The --meet-prefix option must contain only letters, numbers, colons, periods, underscores, and hyphens"]-          )-        ,-          ( "with an unsafe --label and --output=latex"-          , ["rewrite", "--label=eq:bad%tag", "--output=latex"]-          , ["The --label option must contain only letters, numbers, colons, periods, underscores, and hyphens"]-          )-        ,-          ( "with --compress and --output != latex"-          , ["rewrite", "--compress", "--output=phi"]-          , ["--compress option can stay together with --output=latex only"]-          )-        ,-          ( "with --meet-prefix and --output != latex"-          , ["rewrite", "--meet-prefix=foo", "--output=phi"]-          , ["--meet-prefix option can stay together with --output=latex only"]-          )-        ,-          ( "with wrong --hide option"-          , ["rewrite", "--hide=Q.x(Q.y)"]-          , ["[ERROR]: Invalid set of arguments: Only dispatch expression", "but given: Φ.x( Φ.y )"]-          )-        , ("with many --show options", ["rewrite", "--show=Q.x.y", "--show=hello"], ["The option --show can be used only once"])-        ,-          ( "with wrong --show option"-          , ["rewrite", "--show=Q.x(Q.y)"]-          , ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --show"]-          )-        , ("with --show overlapping --hide", ["rewrite", "--show=Q.x", "--hide=Q.x"], ["[ERROR]:", "The --show locator 'Φ.x' is also listed in --hide"])-        , ("with --hide of an ancestor of --show", ["rewrite", "--show=Q.y.z", "--hide=Q.y"], ["[ERROR]:", "The --show locator 'Φ.y.z' lies inside the --hide locator 'Φ.y'"])-        , ("with --meet-popularity < 0", ["rewrite", "--meet-popularity=-1"], ["[ERROR]:", "--meet-popularity must be positive"])-        , ("with --meet-popularity > 100", ["rewrite", "--meet-popularity=102"], ["[ERROR]:", "--meet-popularity must be <= 100"])-        ,-          ( "with --meet-popularity and output != latex"-          , ["rewrite", "--meet-popularity=51", "--output=phi"]-          , ["[ERROR]:", "--meet-popularity option can stay together with --output=latex only"]-          )-        ,-          ( "with --meet-length and output != latex"-          , ["rewrite", "--meet-length=4", "--output=phi"]-          , ["[ERROR]:", "--meet-length option can stay together with --output=latex only"]-          )-        ,-          ( "with non-dispatch --focus"-          , ["rewrite", "--focus=Q.x(Q.y)"]-          , ["Invalid set of arguments: Only dispatch expression started with Φ (or Q) can be used in --focus, but given: Φ.x( Φ.y )"]-          )-        , ("with --focus!=Q and --output=XMIR", ["rewrite", "--focus=Q.x", "--output=xmir"], ["Only --focus=Q is allowed to be used with --output=xmir"])-        , ("with --margin < 0", ["rewrite", "--margin=-1"], ["--margin must be positive"])-        ,-          ( "with --breakpoint which does not exist across the rules"-          , ["rewrite", "--breakpoint=hello", "--normalize"]-          , ["The rule 'hello' provided in '--breakpoint' option is absent across given rewriting rules: alpha"]-          )-        ]-        (\(desc, args, expected) -> it desc (withStdin "[[ x -> 5 ]]" (testCLIFailed args expected)))--    it "prints help" $-      testCLISucceeded-        ["rewrite", "--help"]-        ["Rewrite the 𝜑-expression", "--seed SEED"]--    it "accepts --seed flag" $-      withStdin "[[ x -> 5 ]]" $-        testCLISucceeded-          ["rewrite", "--seed=42", "--sweet"]-          ["5.0:x"]--    it "defaults --seed to 0 in help" $-      testCLISucceeded-        ["rewrite", "--help"]-        ["default: 0"]--    it "describes --must as counting rewriting cycles, not rules applied" $-      testCLISucceeded-        ["rewrite", "--help"]-        ["Stops execution if number of rewriting cycles is not"]--    it "reproduces the same shuffle order for the same --seed" $ do-      let args =-            [ "rewrite"-            , "--shuffle"-            , "--seed=42"-            , "--sweet"-            , "--sequence"-            , "--max-depth=1"-            , "--max-cycles=1"-            , rule "swap-a.yaml"-            , rule "swap-b.yaml"-            ]-      (firstRun, _) <- withStdin "[[ x -> 5 ]]" $ withStdout (runCLI args)-      (secondRun, _) <- withStdin "[[ x -> 5 ]]" $ withStdout (runCLI args)-      firstRun `shouldBe` secondRun--    it "shuffles the rules away from their file order" $ do-      let base =-            [ "--sweet"-            , "--sequence"-            , "--max-depth=1"-            , "--max-cycles=1"-            , rule "swap-a.yaml"-            , rule "swap-b.yaml"-            ]-      (plain, _) <- withStdin "[[ x -> 5 ]]" $ withStdout (runCLI ("rewrite" : base))-      (mixed, _) <- withStdin "[[ x -> 5 ]]" $ withStdout (runCLI ("rewrite" : "--shuffle" : "--seed=1" : base))-      mixed `shouldNotBe` plain--    it "fails with a non-integer --seed" $-      withStdin "[[ ]]" $-        testCLIFailed-          ["rewrite", "--seed=abc"]-          ["[ERROR]"]--    it "refuses a --seed outside the Int range" $-      withStdin "[[ ]]" $-        testCLIFailed-          ["rewrite", "--seed=18446744073709551616"]-          ["value must be between"]--    it "refuses a non-positive --abridged width" $-      withStdin "[[ t -> 01- ]]" $-        testCLIFailed-          ["dataize", "--locator=Q.t", "--protocol=p.txt", "--abridged=0"]-          ["--abridged must be positive"]--    it "saves steps to dir with --steps-dir" $-      withTempDirectory "phino-steps" $ \dir ->-        withStdin "[[ x -> \"hello\"]]" $ do-          testCLISucceeded-            ["rewrite", rule "infinite.yaml", "--max-cycles=2", "--max-depth=2", "--steps-dir=" ++ dir, "--sweet"]-            ["hello_hi_hi"]-          doesDirectoryExist dir `shouldReturn` True-          files <- listDirectory dir-          length files `shouldBe` 4-          doesFileExist (dir ++ "/00001.phi") `shouldReturn` True-          doesFileExist (dir ++ "/00003.phi") `shouldReturn` True--    it "clears step files left from an earlier, longer run with --steps-dir" $-      withTempDirectory "phino-steps-stale" $ \dir -> do-        withStdin "[[ x -> \"hello\"]]" $-          testCLISucceeded-            ["rewrite", rule "infinite.yaml", "--max-cycles=2", "--max-depth=2", "--steps-dir=" ++ dir, "--sweet"]-            ["hello_hi_hi"]-        files <- listDirectory dir-        length files `shouldBe` 4-        withStdin "[[ x -> \"hello\"]]" $-          testCLISucceeded-            ["rewrite", rule "infinite.yaml", "--max-cycles=1", "--max-depth=2", "--steps-dir=" ++ dir, "--sweet"]-            ["hello_hi"]-        files2 <- listDirectory dir-        sort files2 `shouldBe` ["00001.phi", "00002.phi"]--    it "gives the saved steps the --canonize and --hide of the printed ones" $-      withTempDirectory "phino-steps-filtered" $ \dir ->-        withStdin "[[ m -> [[ x -> [[ L> Plus ]], y -> $.x ]].y, k -> [[ L> Minus ]] ]]" $ do-          testCLISucceeded-            ["rewrite", "--normalize", "--hide=Q.k", "--canonize", "--steps-dir=" ++ dir, "--flat"]-            ["Fn1"]-          files <- listDirectory dir-          null files `shouldBe` False-          saved <- mapM (\file -> readFile (dir ++ "/" ++ file)) files-          concat saved `shouldNotContain` "Minus"-          concat saved `shouldNotContain` "Plus"--    it "keeps the name a function has under --sequence in every --steps-dir file under --canonize" $-      withTempDirectory "phino-steps-canonized" $ \dir ->-        withStdin "[[ a -> [[ x -> [[ L> Fa ]] ]].q, b -> [[ y -> [[ L> Fb ]] ]].y ]]" $ do-          testCLISucceeded-            ["rewrite", "--normalize", "--sequence", "--canonize", "--flat", "--steps-dir=" ++ dir]-            ["⟦ a ↦ ⊥, b ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧"]-          saved <- traverse (readUtf8 . (dir </>)) ["00001.phi", "00002.phi", "00003.phi"]-          map (filter (/= '\n')) saved-            `shouldBe` [ "⟦ a ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧ ⟧.q, b ↦ ⟦ λ ⤍ Fn2 ⟧( ρ ↦ ⟦ y ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧ ) ⟧"-                       , "⟦ a ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧ ⟧.q, b ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧"-                       , "⟦ a ↦ ⊥, b ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧"-                       ]--    it "saves the --canonize steps when --show names an object only the steps hold" $-      withTempDirectory "phino-steps-shown" $ \dir ->-        withStdin "[[ app -> [[ x -> [[ L> Fx ]] ]](^ -> [[ ]]) ]]" $ do-          testCLISucceeded-            ["rewrite", "--normalize", "--canonize", "--flat", "--show=Q.app.x", "--steps-dir=" ++ dir]-            ["⟦ app ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧ ⟧ ⟧"]-          saved <- readUtf8 (dir </> "00001.phi")-          filter (/= '\n') saved `shouldBe` "⟦ app ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧ ⟧ ⟧"--    it "gives the saved steps the --focus of the printed ones" $-      withTempDirectory "phino-steps-focused" $ \dir ->-        withStdin "⟦ x ↦ ⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧ ⟧.k, y ↦ ⟦ z ↦ ⟦⟧ ⟧ ⟧" $ do-          testCLISucceeded-            ["rewrite", "--normalize", "--sweet", "--flat", "--focus=Q.y", "--sequence", "--steps-dir=" ++ dir]-            ["⟦⟧:z"]-          files <- listDirectory dir-          null files `shouldBe` False-          saved <- mapM (\file -> readFile (dir ++ "/" ++ file)) (sort files)-          map (filter (/= '\n')) saved `shouldSatisfy` all (== "⟦⟧:z")--    it "saves dataize steps to dir with --steps-dir" $-      withTempDirectory "phino-steps-dataize" $ \dir ->-        withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6).plus(7) ]]" $ do-          testCLISucceeded-            ["dataize", symbolic, "--steps-dir=" ++ dir, "--sweet"]-            ["40-45"]-          doesDirectoryExist dir `shouldReturn` True-          files <- listDirectory dir-          let steps = sort files-          steps `shouldBe` map (\n -> printf "%05d.phi" (n :: Int)) [1 .. length steps]-          length steps `shouldSatisfy` (> 18)--    it "saves steps with a .tex extension when --output=latex is used with --steps-dir" $-      withTempDirectory "phino-steps-latex" $ \dir ->-        withStdin "[[ x -> \"hello\"]]" $ do-          testCLISucceeded-            ["rewrite", rule "infinite.yaml", "--max-cycles=2", "--max-depth=2", "--steps-dir=" ++ dir, "--output=latex", "--sweet"]-            ["\\begin{phiquation}"]-          doesDirectoryExist dir `shouldReturn` True-          files <- listDirectory dir-          length files `shouldBe` 4-          doesFileExist (dir ++ "/00001.tex") `shouldReturn` True-          doesFileExist (dir ++ "/00003.tex") `shouldReturn` True--    it "desugares without any rules flag from file" $-      testCLISucceeded-        ["rewrite", resource "desugar.phi"]-        ["⟦ foo ↦ ξ.x ⟧"]--    it "desugares with without any rules flag from stdin" $-      withStdin "[[foo ↦ x]]" $-        testCLISucceeded ["rewrite"] ["⟦ foo ↦ ξ.x ⟧"]--    it "keeps the bytes of a string intact while desugaring it" $-      withStdin "⟦ φ ↦ Φ.string(as-bytes ↦ Φ.bytes(data ↦ ⟦ Δ ⤍ 65-0A-65, ρ ↦ ∅ ⟧)), ρ ↦ ∅ ⟧" $-        testCLISucceeded ["rewrite", "--flat"] ["Δ ⤍ 65-0A-65"]--    it "rewrites with single rule" $-      withStdin "T(x -> Q.y)" $-        testCLISucceeded ["rewrite", "--rule=resources/normalize/dc.yaml"] ["⊥"]--    it "fails when a rewriting rule uses a dataization-only function" $-      withStdin "⟦⟧" $-        testCLIFailed-          ["rewrite", rule "evaluate-in-rewrite.yaml"]-          ["Function 'evaluate' in rule 'uses-evaluate' is available only for dataization and morphing, not for rewriting"]--    forM_-      [ ("kind-tau-to-expression.yaml", "Function 'random-tau' in rule 'tau-to-expression' returns an attribute, but its meta '𝑒2' is an expression")-      , ("kind-size-to-attribute.yaml", "Function 'size' in rule 'size-to-attribute' returns an expression, but its meta '𝜏2' is an attribute")-      , ("kind-dataize-to-expression.yaml", "Function 'dataize' in rule 'dataize-to-expression' returns bytes, but its meta '𝑒2' is an expression")-      ]-      ( \(file, message) ->-          it ("refuses " ++ file ++ " at load time, before the pattern matches") $-            withStdin "⟦ bar ↦ ⟦⟧ ⟧" (testCLIFailed ["rewrite", rule file] [message])-      )--    it "accepts a where step whose function returns the kind of its meta" $-      withStdin "⟦ bar ↦ ⟦⟧ ⟧" (testCLISucceeded ["rewrite", rule "kind-tau-to-attribute.yaml"] ["bar ↦ ⟦⟧"])--    it "names the join function in the error message" $-      withStdin "⟦⟧" $-        testCLIFailed-          ["rewrite", rule "join-broken.yaml"]-          ["Function join() can work with bindings only"]--    it "reports a broken rule file in plain text with its path" $-      withStdin "⟦⟧" $-        testCLIFailed-          ["rewrite", rule "malformed-pattern.yaml"]-          [ "Could not load rule from 'test-resources/cli/rules/malformed-pattern.yaml'"-          , "unexpected '⟧'"-          ]--    it "counts the position of a YAML error from one" $-      withTempFileContent "badruleXXXXXX.yaml" "name: a\npattern: x: y\n" $ \path ->-        withStdin "⟦⟧" $-          testCLIFailed-            ["rewrite", "--rule=" ++ path]-            ["YAML parse exception at line 2, column 11"]--    it "normalizes with --normalize flag" $-      testCLISucceeded-        ["rewrite", "--normalize", resource "normalize.phi", "--margin=25"]-        [ unlines-            [ "⟦"-            , "  x ↦ ⟦"-            , "    ρ ↦ ⟦ y ↦ ⟦ ρ ↦ ∅ ⟧ ⟧"-            , "  ⟧"-            , "⟧"-            ]-        ]--    it "normalizes and applies --rule at the same time" $-      withStdin "⟦ k ↦ ⟦ m ↦ ⟦ Δ ⤍ 01- ⟧ ⟧.m, j ↦ ⟦ λ ⤍ Marker ⟧ ⟧" $-        testCLISucceeded-          ["rewrite", "--normalize", rule "marker.yaml", "--sweet"]-          ["⟦ k ↦ 01-:Δ, j ↦ FF-:Δ ⟧"]--    it "normalizes from stdin" $-      withStdin "⟦ a ↦ ⟦ b ↦ ∅ ⟧ (b ↦ [[ ]]) ⟧" $-        testCLISucceeded-          ["rewrite", "--normalize", "--margin=20"]-          ["⟦ a ↦ ⟦ b ↦ ⟦⟧ ⟧ ⟧"]--    it "rewrites with --sweet flag" $-      withStdin "[[ x -> 5]]" $-        testCLISucceeded-          ["rewrite", "--sweet"]-          ["5.0:x"]--    it "rewrites as XMIR" $-      withStdin "[[ x -> Q.y ]]" $-        testCLISucceeded-          ["rewrite", "--output=xmir"]-          ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<object", "  <o base=\"Φ.y\" name=\"x\"/>"]--    it "accepts --focus=Φ together with --output=xmir, since Φ and Q are the same locator" $-      withStdin "[[ x -> Q.y ]]" $-        testCLISucceeded-          ["rewrite", "--focus=Φ", "--output=xmir"]-          ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<object", "  <o base=\"Φ.y\" name=\"x\"/>"]--    it "rewrites a formation of several bindings at the root as XMIR" $-      withStdin "⟦ x ↦ 1, ρ ↦ 2 ⟧" $-        testCLISucceeded-          ["rewrite", "--output=xmir"]-          ["<o base=\"Φ.number\" name=\"x\">", "<o base=\"Φ.number\" name=\"ρ\">"]--    it "emits a real revision and ms in XMIR" $ do-      (output, _) <- withStdin "[[ x -> Q.y ]]" $ withStdout (runCLI ["rewrite", "--output=xmir"])-      let attrValue :: String -> String -> String-          attrValue name text =-            let needle = name ++ "=\""-                breakOn :: String -> Maybe String-                breakOn haystack-                  | needle `isPrefixOf` haystack = Just (drop (length needle) haystack)-                  | null haystack = Nothing-                  | otherwise = breakOn (drop 1 haystack)-             in case breakOn text of-                  Just afterNeedle -> takeWhile (/= '"') afterNeedle-                  Nothing -> ""-          revision = attrValue "revision" output-          ms = attrValue "ms" output-      revision `shouldSatisfy` (\sha -> length sha == 7 && all (`elem` "0123456789abcdef") sha)-      revision `shouldNotBe` "1234567"-      ms `shouldSatisfy` (all isDigit)--    it "rewrites as LaTeX" $-      withStdin "[[ x_o -> Q.z(y -> 5), q$ -> T, w -> $, ^ -> Q, @ -> 1, y -> \"H$@^M\", L> Fu_nc ]]" $-        testCLISucceeded-          ["rewrite", "--output=latex", "--sweet"]-          [ unlines-              [ "\\begin{phiquation}"-              , "[["-              , "  |x\\char95{}o| -> Q . |z| ( |y| -> |5.0| ),"-              , "  |q\\char36{}| -> T,"-              , "  |w| -> \\phiTerminal{\\xi},"-              , "  \\phiTerminal{\\rho} -> Q,"-              , "  @ -> |1.0|,"-              , "  |y| -> \"H\\char36{}\\char64{}\\char94{}M\","-              , "  L> |Fu\\char95{}nc|"-              , "]]{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "rewrites as LaTeX without numeration" $-      withStdin "[[ x -> 5 ]]" $-        testCLISucceeded-          ["rewrite", "--output=latex", "--sweet", "--nonumber", "--flat"]-          [ unlines-              [ "\\begin{phiquation*}"-              , "|5.0| : |x|{.}"-              , "\\end{phiquation*}"-              ]-          ]--    it "rewrites an alpha-index argument as \\alpha subscript in LaTeX" $-      withStdin "Q.foo(~1 -> Q.y)" $-        testCLISucceeded-          ["rewrite", "--output=latex", "--flat", "--nonumber"]-          [ unlines-              [ "\\begin{phiquation*}"-              , "Q . |foo| ( \\phiTerminal{\\alpha_{1}} -> Q . |y| ){.}"-              , "\\end{phiquation*}"-              ]-          ]--    it "rewrite as LaTeX with expression name" $-      withStdin "[[ x -> 5 ]]" $-        testCLISucceeded-          ["rewrite", "--output=latex", "--sweet", "--flat", "--expression=foo"]-          [ unlines-              [ "\\begin{phiquation}"-              , "\\phiExpression{foo} |5.0| : |x|{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "escapes special characters in the LaTeX expression name" $-      withStdin "[[ x -> 5 ]]" $-        testCLISucceeded-          ["rewrite", "--output=latex", "--sweet", "--flat", "--expression=bad%tag"]-          [ unlines-              [ "\\begin{phiquation}"-              , "\\phiExpression{bad\\char37{}tag} |5.0| : |x|{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "rewrite as LaTeX with label name" $-      withStdin "[[ x -> 5 ]]" $-        testCLISucceeded-          ["rewrite", "--output=latex", "--sweet", "--flat", "--label=foo"]-          [ unlines-              [ "\\begin{phiquation}\n\\label{foo}"-              , "|5.0| : |x|{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "rewrites with XMIR as input" $-      withStdin "<object><o name=\"app\"><o name=\"x\" base=\"Φ.number\"/></o></object>" $-        testCLISucceeded-          ["rewrite", "--input=xmir", "--sweet"]-          ["Φ.number:x:app"]--    it "rewrites and prints with XMIR as input and output" $-      withStdin-        ( intercalate-            ""-            [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-            , "<object><o name=\"app\"><o name=\"x\" base=\"Φ.number\"/></o></object>"-            ]-        )-        ( testCLISucceeded-            ["rewrite", "--input=xmir", "--output=xmir", "--sweet", "--flat"]-            [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-            , "<listing>Φ.number:x:app</listing>"-            ]-        )--    it "rewrites as XMIR with omit-listing flag" $-      withStdin "[[ x -> Q.y ]]" $-        testCLISucceeded-          ["rewrite", "--output=xmir", "--omit-listing"]-          ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<object", "<listing>1 line(s)</listing>", "  <o base=\"Φ.y\" name=\"x\"/>"]--    it "does not fail on exactly 1 rewriting" $-      withStdin "⟦ t ↦ ⟦ x ↦ \"foo\" ⟧ ⟧" $-        testCLISucceeded-          ["rewrite", rule "simple.yaml", "--must=1", "--sweet"]-          ["\"bar\":x"]--    it "prints many expressions with --sequence" $-      withStdin "[[ x -> \"0\" ]]" $-        testCLISucceeded-          [ "rewrite"-          , rule "first.yaml"-          , rule "second.yaml"-          , "--max-depth=1"-          , "--max-cycles=1"-          , "--sequence"-          , "--sweet"-          , "--flat"-          ]-          [ unlines-              [ "\"0\":x"-              , "Φ.x( y ↦ \"1\" )"-              , "\"1\":x"-              ]-          ]--    it "prefixes every step with a header when --headers is on" $-      withStdin "[[ x -> \"0\" ]]" $-        testCLISucceeded-          [ "rewrite"-          , rule "first.yaml"-          , rule "second.yaml"-          , "--max-depth=1"-          , "--max-cycles=1"-          , "--sequence"-          , "--headers"-          , "--sweet"-          , "--flat"-          ]-          [ intercalate-              "\n"-              [ ""-              , "=== Step #1"-              , "\"0\":x"-              , ""-              , "=== Step #2, Rule 'first', 23t -> 26t"-              , "Φ.x( y ↦ \"1\" )"-              , ""-              , "=== Step #3, Rule 'second', 26t -> 23t"-              , "\"1\":x"-              ]-          ]--    it "ignores --headers without --sequence" $-      withStdin "[[ x -> \"foo\" ]]" $-        testCLISucceeded-          ["rewrite", rule "simple.yaml", "--headers", "--sweet", "--flat"]-          ["\"bar\":x"]--    it "emits step headers as LaTeX comments with --headers" $-      withStdin "[[ x -> \"0\" ]]" $-        testCLISucceeded-          [ "rewrite"-          , rule "first.yaml"-          , rule "second.yaml"-          , "--max-depth=1"-          , "--max-cycles=1"-          , "--sequence"-          , "--headers"-          , "--sweet"-          , "--flat"-          , "--output=latex"-          ]-          [ unlines-              [ "\\begin{phiquation}"-              , "% === Step #1"-              , "\"0\" : |x| \\phiNormalize[\\nameref{r:first}]"-              , "% === Step #2, Rule 'first', 23t -> 26t"-              , "  \\phiNormalize Q . |x| ( |y| -> \"1\" ) \\phiNormalize[\\nameref{r:second}]"-              , "% === Step #3, Rule 'second', 26t -> 23t"-              , "  \\phiNormalize \"1\" : |x| \\phiNormalize"-              , "  \\phiNormalize \\dots"-              , "\\end{phiquation}"-              ]-          ]--    it "prints only one latex preamble with --sequence" $-      withStdin "[[ x -> \"0\" ]]" $-        testCLISucceeded-          [ "rewrite"-          , rule "first.yaml"-          , rule "second.yaml"-          , "--max-depth=1"-          , "--max-cycles=1"-          , "--sequence"-          , "--sweet"-          , "--flat"-          , "--output=latex"-          ]-          [ unlines-              [ "\\begin{phiquation}"-              , "\"0\" : |x| \\phiNormalize[\\nameref{r:first}]"-              , "  \\phiNormalize Q . |x| ( |y| -> \"1\" ) \\phiNormalize[\\nameref{r:second}]"-              , "  \\phiNormalize \"1\" : |x| \\phiNormalize"-              , "  \\phiNormalize \\dots"-              , "\\end{phiquation}"-              ]-          ]--    it "prints meet prefix with --meet-prefix=foo in LaTeX" $-      withStdin "[[ x -> ?, y -> $.x ]](x -> [[ D> 42- ]]).y" $-        testCLISucceeded-          ["rewrite", "--normalize", "--sweet", "--sequence", "--output=latex", "--flat", "--compress", "--meet-prefix=foo"]-          [ unlines-              [ "\\begin{phiquation}"-              , "[[ |x| -> ?, |y| -> |x| ]] ( |x| -> |42-| : D ) . |y| \\phiNormalize[\\nameref{r:copy}]"-              , "  \\phiNormalize \\phinoMeet{foo:1}{ [[ |x| -> |42-| : D, |y| -> |x| ]] } . |y| \\phiNormalize[\\nameref{r:dot}]"-              , "  \\phiNormalize |42-| : D : |x| . |x| ( \\phiTerminal{\\rho} -> \\phinoAgain{foo:1} ) \\phiNormalize[\\nameref{r:dot}]"-              , "  \\phiNormalize |42-| : D ( \\phiTerminal{\\rho} -> |42-| : D : |x|, \\phiTerminal{\\rho} -> \\phinoAgain{foo:1} ) \\phiNormalize[\\nameref{r:skip}]"-              , "  \\phiNormalize |42-| : D ( \\phiTerminal{\\rho} -> \\phinoAgain{foo:1} ) \\phiNormalize[\\nameref{r:skip}]"-              , "  \\phiNormalize |42-| : D{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "prints with compressed expressions in LaTeX" $-      withStdin "[[ x -> ?, y -> $.x ]](x -> [[ D> 42- ]]).y" $-        testCLISucceeded-          ["rewrite", "--normalize", "--sweet", "--sequence", "--output=latex", "--flat", "--compress"]-          [ unlines-              [ "\\begin{phiquation}"-              , "[[ |x| -> ?, |y| -> |x| ]] ( |x| -> |42-| : D ) . |y| \\phiNormalize[\\nameref{r:copy}]"-              , "  \\phiNormalize \\phinoMeet{1}{ [[ |x| -> |42-| : D, |y| -> |x| ]] } . |y| \\phiNormalize[\\nameref{r:dot}]"-              , "  \\phiNormalize |42-| : D : |x| . |x| ( \\phiTerminal{\\rho} -> \\phinoAgain{1} ) \\phiNormalize[\\nameref{r:dot}]"-              , "  \\phiNormalize |42-| : D ( \\phiTerminal{\\rho} -> |42-| : D : |x|, \\phiTerminal{\\rho} -> \\phinoAgain{1} ) \\phiNormalize[\\nameref{r:skip}]"-              , "  \\phiNormalize |42-| : D ( \\phiTerminal{\\rho} -> \\phinoAgain{1} ) \\phiNormalize[\\nameref{r:skip}]"-              , "  \\phiNormalize |42-| : D{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "should not print \\phinoMeet{} twice" $-      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $-        testCLISucceeded-          ["rewrite", "--normalize", "--sequence", "--flat", "--compress", "--output=latex", "--sweet"]-          [ unlines-              [ "\\begin{phiquation}"-              , "[[ |y| -> ?, |k| -> \\phinoMeet{1}{ |42.0| : |t| } ]] ( |y| -> \\phinoAgain{1} ) : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:copy}]"-              , "  \\phiNormalize [[ |y| -> \\phinoAgain{1}, |k| -> \\phinoAgain{1} ]] : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:stop}]"-              , "  \\phiNormalize T : |ex|{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "should not meet expression with high --meet-popularity" $-      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $-        testCLISucceeded-          ["rewrite", "--normalize", "--sequence", "--flat", "--compress", "--output=latex", "--sweet", "--meet-popularity=70"]-          [ unlines-              [ "\\begin{phiquation}"-              , "[[ |y| -> ?, |k| -> |42.0| : |t| ]] ( |y| -> |42.0| : |t| ) : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:copy}]"-              , "  \\phiNormalize [[ |y| -> |42.0| : |t|, |k| -> |42.0| : |t| ]] : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:stop}]"-              , "  \\phiNormalize T : |ex|{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "meets with --meet-length=32" $-      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $-        testCLISucceeded-          ["rewrite", "--normalize", "--sequence", "--flat", "--compress", "--output=latex", "--sweet", "--meet-length=32"]-          [ unlines-              [ "\\begin{phiquation}"-              , "[[ |y| -> ?, |k| -> |42.0| : |t| ]] ( |y| -> |42.0| : |t| ) : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:copy}]"-              , "  \\phiNormalize [[ |y| -> |42.0| : |t|, |k| -> |42.0| : |t| ]] : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:stop}]"-              , "  \\phiNormalize T : |ex|{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "focuses expression in latex with sequence" $-      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $-        testCLISucceeded-          ["rewrite", "--normalize", "--sequence", "--flat", "--output=latex", "--sweet", "--focus=Q.ex"]-          [ unlines-              [ "\\begin{phiquation}"-              , "[[ |y| -> ?, |k| -> |42.0| : |t| ]] ( |y| -> |42.0| : |t| ) : |x| . |i| \\phiNormalize[\\nameref{r:copy}]"-              , "  \\phiNormalize [[ |y| -> |42.0| : |t|, |k| -> |42.0| : |t| ]] : |x| . |i| \\phiNormalize[\\nameref{r:stop}]"-              , "  \\phiNormalize T{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "focuses expression in latex without sequence" $-      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $-        testCLISucceeded-          ["rewrite", "--normalize", "--flat", "--output=latex", "--sweet", "--focus=Q.ex"]-          [ unlines-              [ "\\begin{phiquation}"-              , "T{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "shows exceeding of limits in latex" $-      withStdin "[[ x -> $.y, y -> $.x ]].x" $-        testCLISucceeded-          ["rewrite", "--normalize", "--flat", "--sequence", "--output=latex", "--sweet", "--max-depth=1", "--max-cycles=1"]-          [ unlines-              [ "\\begin{phiquation}"-              , "[[ |x| -> |y|, |y| -> |x| ]] . |x| \\phiNormalize[\\nameref{r:dot}]"-              , "  \\phiNormalize |x| : |y| . |y| ( \\phiTerminal{\\rho} -> [[ |x| -> |y|, |y| -> |x| ]] ) \\phiNormalize"-              , "  \\phiNormalize \\dots"-              , "\\end{phiquation}"-              ]-          ]--    it "ends the last step with a period when --max-cycles lands on the normal form" $-      withStdin "⟦ a ↦ ⟦ x ↦ ∅ ⟧( x ↦ ⟦⟧ ).x ⟧" $-        testCLISucceeded-          ["rewrite", "--normalize", "--max-cycles=1", "--sequence", "--output=latex"]-          ["  \\phiNormalize [[ |a| -> [[]] ]]{.}"]--    it "focuses expression in phi without sequence" $-      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $-        testCLISucceeded-          ["rewrite", "--normalize", "--flat", "--output=phi", "--sweet", "--focus=Q.ex"]-          ["⊥"]--    it "focuses expression in phi with sequence" $-      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $-        testCLISucceeded-          ["rewrite", "--normalize", "--sequence", "--flat", "--output=phi", "--sweet", "--focus=Q.ex"]-          [ unlines-              [ "⟦ y ↦ ∅, k ↦ 42.0:t ⟧( y ↦ 42.0:t ):x.i"-              , "⟦ y ↦ 42.0:t, k ↦ 42.0:t ⟧:x.i"-              , "⊥"-              ]-          ]--    it "prints input as listing in XMIR" $-      withStdin "[[ app -> [[]] ]]" $-        testCLISucceeded-          ["rewrite", "--output=xmir", "--omit-comments", "--sweet", "--flat"]-          ["  <listing>[[ app -&gt; [[]] ]]</listing>"]--    it "print expression in listing in XMIRs with --sequence" $-      withStdin "[[ x -> \"foo\" ]]" $-        testCLISucceeded-          ["rewrite", "--output=xmir", "--omit-comments", "--sweet", "--flat", "--sequence", rule "simple.yaml"]-          ["  <listing>\"foo\":x</listing>", "  <listing>\"bar\":x</listing>"]--    describe "must range tests" $ do-      describe "fails" $ do-        it "when cycles exceed range ..1" $-          withStdin "[[ x -> [[ y -> 5 ]].y ]].x" $-            testCLIFailed-              ["rewrite", "--max-depth=1", "--max-cycles=2", "--normalize", "--must=..1"]-              ["it's expected rewriting cycles to be in range [..1], but rewriting has already reached 2"]--        it "when cycles below range 2.." $-          withStdin "⟦ t ↦ ⟦ x ↦ \"foo\" ⟧ ⟧" $-            testCLIFailed-              ["rewrite", rule "simple.yaml", "--must=2.."]-              ["it's expected rewriting cycles to be in range [2..], but rewriting stopped after 1"]--        it "with invalid range 5..3" $-          withStdin "[[ ]]" $-            testCLIFailed-              ["rewrite", "--must=5..3"]-              ["cannot parse value `5..3'"]--        it "with negative in range -1..5" $-          withStdin "[[ ]]" $-            testCLIFailed-              ["rewrite", "--must=-1..5"]-              ["cannot parse value `-1..5'"]--        it "with malformed range syntax" $-          withStdin "[[ ]]" $-            testCLIFailed-              ["rewrite", "--must=3...5"]-              ["cannot parse value `3...5'"]--      it "accepts range ..5 (0 to 5 cycles)" $-        withStdin "[[ ]]" $-          testCLISucceeded ["rewrite", "--must=..5", "--sweet"] ["⟦⟧"]--      it "accepts range 0..0 (exactly 0 cycles)" $-        withStdin "[[ ]]" $-          testCLISucceeded ["rewrite", "--must=0..0", "--sweet"] ["⟦⟧"]--      it "accepts range 1..1 (exactly 1 cycle)" $-        withStdin "⟦ t ↦ ⟦ x ↦ \"foo\" ⟧ ⟧" $-          testCLISucceeded-            ["rewrite", rule "simple.yaml", "--must=1..1", "--sweet"]-            ["\"bar\":x"]--      it "accepts range 1..3 when 1 cycle happens" $-        withStdin "⟦ t ↦ ⟦ x ↦ \"foo\" ⟧ ⟧" $-          testCLISucceeded-            ["rewrite", rule "simple.yaml", "--must=1..3", "--sweet"]-            ["\"bar\":x"]--      it "accepts range 0.. (0 or more)" $-        withStdin "[[ ]]" $-          testCLISucceeded ["rewrite", "--must=0..", "--sweet"] ["⟦⟧"]--    it "prints to target file" $-      withStdin "[[ ]]" $-        withTempFile "targetXXXXXX.tmp" $ \(path, h) -> do-          hClose h-          testCLISucceeded ["rewrite", "--sweet", printf "--target=%s" path] []-          content <- readFile path-          content `shouldBe` "⟦⟧\n"--    it "modifies file in-place" $-      withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do-        hPutStr h "[[ x -> \"foo\" ]]"-        hClose h-        testCLISucceeded ["rewrite", rule "simple.yaml", "--in-place", "--sweet", path] []-        content <- readFile path-        content `shouldBe` "\"bar\":x\n"--    it "writes the same bytes to --target as it prints to the console" $-      withTempFile "targetXXXXXX.tmp" $ \(path, h) -> do-        hClose h-        (console, _) <- withStdout (withStdin "[[ ]]" (runCLI ["rewrite", "--sweet"]))-        withStdin "[[ ]]" (testCLISucceeded ["rewrite", "--sweet", printf "--target=%s" path] [])-        content <- readFile path-        content `shouldBe` console--    it "keeps the trailing newline of the source file when nothing is rewritten by --in-place" $-      withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do-        hPutStr h "⟦⟧\n"-        hClose h-        testCLISucceeded ["rewrite", "--in-place", "--sweet", path] []-        content <- readFile path-        content `shouldBe` "⟦⟧\n"--    it "modifies file in-place with --focus=Φ, since Φ and Q are the same locator" $-      withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do-        hPutStr h "[[ x -> \"foo\" ]]"-        hClose h-        testCLISucceeded ["rewrite", rule "simple.yaml", "--focus=Φ", "--in-place", "--sweet", path] []-        content <- readFile path-        content `shouldBe` "\"bar\":x\n"--    it "keeps the XMIR format when rewriting an XMIR file in-place" $-      withTempFileContent "inplaceXXXXXX.xmir" xmir $ \path -> do-        testCLISucceeded ["rewrite", "--input=xmir", "--output=xmir", "--in-place", path] []-        content <- readFile path-        _ <- evaluate (length content)-        content `shouldContain` "<object"--    it "skips rewriting with --update when target is newer than source" $-      withTempFileContent "src-XXXXXX.phi" "[[ x -> \"foo\" ]]" $ \src ->-        withTempFileContent "tgt-XXXXXX.phi" "ORIGINAL" $ \tgt -> do-          now <- getCurrentTime-          setModificationTime src (addUTCTime (-60) now)-          setModificationTime tgt now-          testCLISucceeded-            ["rewrite", rule "simple.yaml", "--update", "--sweet", "--target=" ++ tgt, src]-            []-          content <- readFile tgt-          content `shouldBe` "ORIGINAL"--    it "logs the skip reason at debug level when --update finds a newer target" $-      withTempFileContent "src-XXXXXX.phi" "[[ x -> \"foo\" ]]" $ \src ->-        withTempFileContent "tgt-XXXXXX.phi" "ORIGINAL" $ \tgt -> do-          now <- getCurrentTime-          setModificationTime src (addUTCTime (-60) now)-          setModificationTime tgt now-          testCLISucceeded-            ["rewrite", rule "simple.yaml", "--update", "--sweet", "--log-level=DEBUG", "--target=" ++ tgt, src]-            ["is newer than source", "skipping rewriting (--update)"]--    it "logs progress at debug level when printing to --target" $-      withStdin "[[ ]]" $-        withTempFile "targetXXXXXX.tmp" $ \(path, h) -> do-          hClose h-          testCLISucceeded-            ["rewrite", "--sweet", "--log-level=DEBUG", printf "--target=%s" path]-            ["The option '--target' is specified, printing to", "The command result was saved in"]--    it "logs progress at debug level when modifying a file in-place" $-      withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do-        hPutStr h "[[ x -> \"foo\" ]]"-        hClose h-        testCLISucceeded-          ["rewrite", rule "simple.yaml", "--in-place", "--sweet", "--log-level=DEBUG", path]-          ["The option '--in-place' is specified, writing back to", "was modified in-place"]--    it "rewrites with --update when source is newer than target" $-      withTempFileContent "src-XXXXXX.phi" "[[ x -> \"foo\" ]]" $ \src ->-        withTempFileContent "tgt-XXXXXX.phi" "ORIGINAL" $ \tgt -> do-          now <- getCurrentTime-          setModificationTime tgt (addUTCTime (-60) now)-          setModificationTime src now-          testCLISucceeded-            ["rewrite", rule "simple.yaml", "--update", "--sweet", "--target=" ++ tgt, src]-            []-          content <- readFile tgt-          content `shouldBe` "\"bar\":x\n"--    it "rewrites with cycles" $-      withStdin "[[ x -> \"x\" ]]" $-        testCLISucceeded-          ["rewrite", "--sweet", rule "infinite.yaml", "--max-depth=1", "--max-cycles=2"]-          ["\"x_hi_hi\":x"]--    it "hides default package" $-      withStdin "[[ org -> [[ eolang -> [[ number -> [[]] ]]]], x -> 42 ]]" $-        testCLISucceeded-          ["rewrite", "--sweet", "--flat", "--hide=Q.org"]-          ["42.0:x"]--    it "hides several FQNs" $-      withStdin "[[ org -> [[ eolang -> Q.x, yegor256 -> Q.y ]], x -> 42 ]]" $-        testCLISucceeded-          ["rewrite", "--sweet", "--flat", "--hide=Q.org.eolang", "--hide=Q.org.yegor256"]-          ["⟦ org ↦ ⟦⟧, x ↦ 42.0 ⟧"]--    it "shows and hides" $-      withStdin "[[ org -> [[ eolang -> Q.x, yegor256 -> Q.y ]], x -> 42 ]]" $-        testCLISucceeded-          ["rewrite", "--sweet", "--flat", "--show=Q.org", "--hide=Q.org.eolang"]-          ["Φ.y:yegor256:org"]--    it "hides an object outside the --show locator" $-      withStdin "[[ org -> [[ eolang -> Q.x ]], x -> 42 ]]" $-        testCLISucceeded-          ["rewrite", "--sweet", "--flat", "--show=Q.x", "--hide=Q.org.eolang"]-          ["42.0:x"]--    it "hides an object inside an earlier --hide locator" $-      withStdin "[[ org -> [[ eolang -> [[ number -> [[]] ]] ]], x -> 42 ]]" $-        testCLISucceeded-          ["rewrite", "--sweet", "--flat", "--hide=Q.org.eolang", "--hide=Q.org.eolang.number"]-          ["⟦ org ↦ ⟦⟧, x ↦ 42.0 ⟧"]--    it "fails on a --show locator that matches nothing" $-      withStdin "[[ a -> [[ b -> Q, c -> Q ]], d -> Q ]]" $-        testCLIFailed-          ["rewrite", "--flat", "--show=Q.zzz"]-          ["[ERROR]:", "Can't find object by locator: 'Φ.zzz'"]--    it "shows the whole program with --show=Q" $-      withStdin "[[ a -> [[ b -> Q, c -> Q ]], d -> Q ]]" $-        testCLISucceeded-          ["rewrite", "--flat", "--show=Q"]-          ["⟦ a ↦ ⟦ b ↦ Φ, c ↦ Φ ⟧, d ↦ Φ ⟧"]--    it "prints in line with --flat" $-      withStdin "[[ x -> 5, y -> \"hey\", z -> [[ w -> [[ ]] ]] ]]" $-        testCLISucceeded-          ["rewrite", "--sweet", "--flat"]-          ["⟦ x ↦ 5.0, y ↦ \"hey\", z ↦ ⟦⟧:w ⟧"]--    it "removes unnecessary rho bindings in primitive applications" $-      withStdin-        ( unlines-            [ "[["-            , "  z -> [[ x -> [[ t -> 42 ]].t ]].x,"-            , "  org -> [[ eolang -> [[ bytes -> [[ data -> ? ]], number -> [[ as-bytes -> ? ]] ]] ]]"-            , "]]"-            ]-        )-        ( testCLISucceeded-            ["rewrite", "--sweet", "--normalize", "--flat"]-            ["⟦ z ↦ 42.0, org ↦ ⟦ bytes(data) ↦ ⟦⟧, number(as-bytes) ↦ ⟦⟧ ⟧:eolang ⟧"]-        )--    it "reduces log message" $-      withStdin "[[ x -> [[ y -> ? ]](y -> 5) ]]" $-        testCLISucceeded-          ["rewrite", "--log-level=debug", "--log-lines=1", "--normalize"]-          [ intercalate-              "\n"-              [ "[DEBUG]: Applied 'copy' (32 nodes -> 27 nodes)"-              , "---| log is limited by --log-lines=1 option |---"-              ]-          ]--    it "reports a condition that raised while being evaluated" $-      withStdin "[[ x -> [[ y -> ∅ ]] ]]" $-        testCLISucceeded-          ["rewrite", rule "raising-condition.yaml", "--log-level=debug", "--flat"]-          [ "raised and was treated as not met: user error (Only data objects and bytes are supported"-          , "⟦ x ↦ ⟦ y ↦ ∅ ⟧ ⟧"-          ]--    it "canonizes expression" $-      withStdin "[[ x -> [[ y -> [[ L> Func ]].q, z -> Q.x(a -> [[ w -> [[ L> Atom ]], L> Hello ]]) ]], L> Package ]]" $-        testCLISucceeded-          ["rewrite", "--canonize", "--sweet", "--flat"]-          ["⟦ x ↦ ⟦ y ↦ Fn1:λ.q, z ↦ Φ.x( a ↦ ⟦ w ↦ Fn2:λ, λ ⤍ Fn3 ⟧ ) ⟧, λ ⤍ Package ⟧"]--    it "keeps the name of a function across the steps of --sequence under --canonize" $-      withStdin "[[ a -> [[ x -> [[ L> Fa ]], y -> [[ L> Fb ]] ]] ]]" $-        testCLISucceeded-          ["rewrite", rule "drop-x.yaml", "--sequence", "--canonize", "--flat"]-          [ "⟦ a ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧, y ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧ ⟧"-          , "⟦ a ↦ ⟦ y ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧ ⟧"-          ]--    it "rewrites by locator" $-      withStdin "[[ ex -> [[ x -> [[ y -> 5 ]].y ]], abc -> [[ x -> ? ]](x -> 5) ]]" $-        testCLISucceeded-          ["rewrite", "--sweet", "--flat", "--locator=Q.ex", "--normalize"]-          ["⟦ ex ↦ 5.0:x, abc ↦ ∅:x( x ↦ 5.0 ) ⟧"]--    it "returns original expression on --breakpoint" $-      withStdin "[[ x -> ?, y -> $.x ]](x -> [[ D> 42- ]]).y" $-        testCLISucceeded-          ["rewrite", "--sweet", "--flat", "--normalize", "--breakpoint=stop", "--log-level=debug"]-          [ "Applied 'copy' (22 nodes -> 17 nodes)"-          , "Rule 'stop' is a breakpoint, dropping down all the previous rewritings..."-          , "⟦ x ↦ ∅, y ↦ x ⟧( x ↦ 42-:Δ ).y"-          ]--    it "leaves no step files of the rewritings --breakpoint dropped" $-      withTempDirectory "phino-steps-breakpoint" $ \dir ->-        withStdin "[[ x -> ?, y -> $.x ]](x -> [[ D> 42- ]]).y" $ do-          testCLISucceeded-            ["rewrite", "--sweet", "--flat", "--normalize", "--breakpoint=stop", "--steps-dir=" ++ dir]-            ["⟦ x ↦ ∅, y ↦ x ⟧( x ↦ 42-:Δ ).y"]-          listDirectory dir `shouldReturn` []--    it "finishes under --depth-sensitive when the only match left would not change the term" $-      withTempFileContent "phino-fixpoint.yaml" "name: fix\npattern: '[[ x -> !e1, !B1 ]]'\nresult: '[[ x -> Q, !B1 ]]'\n" $ \fix ->-        withStdin "[[ x -> $ ]]" $-          testCLISucceeded ["rewrite", "--rule=" ++ fix, "--max-depth=1", "--depth-sensitive", "--flat"] ["⟦ x ↦ Φ ⟧"]--    it "keeps the rewritten expression when the --breakpoint rule fired" $-      withStdin "⟦ a ↦ ⟦ b ↦ Φ ⟧.b ⟧" $-        testCLISucceeded-          ["rewrite", "--flat", "--normalize", "--breakpoint=dot"]-          ["⟦ a ↦ Φ( ρ ↦ ⟦ b ↦ Φ ⟧ ) ⟧"]--    it "reads back an application of ξ as it is" $-      withStdin "[[ a -> [[ x -> ∅ ]], b -> $(x -> [[ ]]) ]]" $-        testCLISucceeded ["rewrite", "--flat"] ["⟦ a ↦ ⟦ x ↦ ∅ ⟧, b ↦ ξ( x ↦ ⟦⟧ ) ⟧"]--    it "keeps the ρ that dot applies to Φ, and reads it back" $ do-      withStdin "[[ x -> [[ y -> Q ]].y ]]" $-        testCLISucceeded ["rewrite", "--normalize", "--flat"] ["⟦ x ↦ Φ( ρ ↦ ⟦ y ↦ Φ ⟧ ) ⟧"]-      withStdin "⟦ x ↦ Φ( ρ ↦ ⟦ y ↦ Φ ⟧ ) ⟧" $-        testCLISucceeded ["rewrite", "--flat"] ["⟦ x ↦ Φ( ρ ↦ ⟦ y ↦ Φ ⟧ ) ⟧"]--  describe "morph --focus under --locator" $ do-    it "finds the same object for the steps and for the answer" $-      withStdin "⟦ t ↦ ⟦ a ↦ ⟦ Δ ⤍ 01- ⟧ ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $ do-        (out, _) <- withStdout (runCLI ["morph", "--locator=Q.t", "--focus=Q.a", "--flat", "--sequence"])-        filter (not . null) (lines out) `shouldSatisfy` all (== "⟦ Δ ⤍ 02- ⟧")-    it "prints the answer when --focus names the object at --locator" $-      withStdin "⟦ t ↦ ⟦ a ↦ ⟦ Δ ⤍ 01- ⟧ ⟧ ⟧" $-        testCLISucceeded ["morph", "--locator=Q.t", "--focus=Q.t", "--flat", "--sequence"] ["⟦ a ↦ ⟦ Δ ⤍ 01- ⟧ ⟧"]-    it "fails on a --focus it cannot find before it prints any step" $-      withStdin "⟦ t ↦ ⟦ a ↦ ⟦ Δ ⤍ 01- ⟧ ⟧ ⟧" $ do-        (out, _) <- withStdout (try (runCLI ["morph", "--locator=Q.t", "--focus=Q.nope", "--flat", "--sequence"]) :: IO (Either ExitCode ()))-        out `shouldNotContain` "⟦ t ↦"--  it "fails on a --hide locator that matches nothing, as --show does" $-    withStdin "[[ x -> Q.y ]]" $-      testCLIFailed ["rewrite", "--hide=Q.nope"] ["Can't find object by locator: 'Φ.nope'"]--  it "names the term dataization cannot take, and says a normal form is expected" $-    withStdin "⟦ x ↦ ⟦ b ↦ ⟦ Δ ⤍ 01- ⟧ ⟧.b ⟧" $-      testCLIFailed ["dataize", "--locator=Q.x"] ["Dataization expects a normal form, but the term at the locator is not one: 01-:Δ:b.b"]--  describe "--partial parks a universe that --max-cycles stops" $ do-    let heavy = "⟦ simple ↦ ⟦ Δ ⤍ 01- ⟧, heavy ↦ ⟦ a ↦ ⟦ b ↦ ⟦ c ↦ ⟦ Δ ⤍ 02- ⟧ ⟧ ⟧ ⟧.a.b.c ⟧"-    it "in dataize" $-      withStdin heavy $-        testCLISucceeded ["dataize", "--locator=Q.simple", "--max-cycles=1", "--partial", "--flat"] ["⟦ Δ ⤍ 01- ⟧"]-    it "in morph" $-      withStdin heavy $-        testCLISucceeded ["morph", "--locator=Q.simple", "--max-cycles=1", "--partial", "--flat"] ["⟦ Δ ⤍ 01- ⟧"]--  describe "dataize" $ do-    it "prints help" $-      testCLISucceeded ["dataize", "--help"] ["Dataize the 𝜑-expression"]--    it "names every block of a --symbolic entry in its help" $-      testCLISucceeded ["dataize", "--help"] ["\"dataize\"", "\"morph\"", "\"evaluate\"", "\"defer\"", "\"stay\"", "\"rewrite\"", "\"symbolize\"", "\"cast\"", "\"join\""]--    it "dataizes simple expression" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded ["dataize"] ["01-"]--    it "accepts --seed flag" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded ["dataize", "--seed=7"] ["01-"]--    it "fails to dataize an empty object, which dataizes the terminator ⊥" $-      withStdin "[[ ]]" $-        testCLIFailed ["dataize"] ["terminator ⊥"]--    it "fails with negative --max-steps" $-      withStdin "[[ D> 01- ]]" $-        testCLIFailed ["dataize", "--max-steps=-1"] ["--max-steps must be positive"]--    it "fails on --max-steps instead of dataizing forever" $-      loopingLambdas $ \endless ->-        withStdin "⟦ @ ↦ ⟦ λ ⤍ L_loop ⟧ ⟧" $-          testCLIFailed-            ["dataize", "--symbolic=" ++ endless, "--max-steps=40"]-            ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=40"]--    it "parks --max-steps on a residual with --partial" $-      loopingLambdas $ \endless ->-        withStdin "⟦ @ ↦ ⟦ λ ⤍ L_loop ⟧ ⟧" $-          testCLISucceeded-            ["dataize", "--symbolic=" ++ endless, "--max-steps=40", "--partial", "--flat", "--hide-rho"]-            ["⟦ λ ⤍ L_loop ⟧"]--    it "fails on --max-firings before --max-steps is spent" $-      loopingLambdas $ \endless ->-        withStdin "⟦ @ ↦ ⟦ λ ⤍ L_loop ⟧ ⟧" $-          testCLIFailed-            ["dataize", "--symbolic=" ++ endless, "--max-steps=400", "--max-firings=5"]-            ["[ERROR]: Evaluation did not finish before reaching the limit of firings: --max-firings=5"]--    describe "--acyclic=proven" $ do-      let circling = "⟦ cyc ↦ ⟦ x ↦ ∅, φ ↦ Φ.cyc( ξ.x ) ⟧, t ↦ Φ.cyc( ⟦⟧ ) ⟧"-      it "spends the whole budget and fails on the limit without the flag" $-        withStdin circling $-          testCLIFailed-            ["dataize", "--locator=Q.t", "--max-steps=40"]-            ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=40"]--      it "answers the copy it came back to with a symbol with the flag" $-        withStdin circling $-          testCLISucceeded-            ["dataize", "--locator=Q.t", "--acyclic=proven", "--max-steps=4000"]-            ["40-45-00-00-00-00-00-00"]--      it "answers the same with --partial" $-        withStdin circling $-          testCLISucceeded-            ["dataize", "--locator=Q.t", "--acyclic=proven", "--partial", "--max-steps=4000", "--flat", "--hide-rho"]-            ["40-45-00-00-00-00-00-00"]--      it "writes the cut to the protocol where the formation would have opened" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin circling $-            testCLISucceeded-              ["dataize", "--locator=Q.t", "--acyclic=proven", "--partial", "--minutes=" ++ path, "--sweet", "--hide-rho", "--flat", "--quiet"]-              []-          records <- readProtocol path-          lines records-            `shouldBe` [ "𝔻(Φ.t):"-                       , "  𝕄(Φ.t):"-                       , "    remembered 𝑛·0·1 ≡ Φ.cyc  # ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ) ⟧"-                       , "    𝑛·0·2 := Φ.cyc( x ↦ ⟦⟧ )"-                       , "    𝑛·0·3 := ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ) ⟧"-                       , "    remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ ⟦⟧ )"-                       , "    morphed 𝑛·0·4 := 𝑛·0·3"-                       , "  boxed 𝑛·0·5 := 𝑛·0·4.φ"-                       , "  normalized 𝑛·0·6 := Φ.cyc( ⟦⟧ )  # 𝑛·0·5"-                       , "  𝕄(𝑛·0·5):"-                       , "    𝑛·0·7 := Φ.cyc( x ↦ ⟦⟧ )"-                       , "    𝑛·0·8 := ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ) ⟧"-                       , "    morphed 𝑛·0·9 := 𝑛·0·8"-                       , "  recalled 𝑛·0·3 ⇒ 𝑛·0·1( x ↦ ⟦⟧ )"-                       , "  recalled 𝑛·0·1 ⇒ Φ.cyc"-                       , "  𝕄(𝑛·0·9.x):"-                       , "    morphed 𝑛·0·10 := ⟦⟧"-                       , "  looped 𝜎1 := Φ.cyc( x ↦ 𝑛·0·10 )  # 𝔻(𝑛·0·5), proven, repeats 𝑛·0·9"-                       , "  𝛿·0·1 := 𝔻(𝜎1:λ)"-                       ]--      it "writes the cut to the XML protocol with the formation in an element of its own" $-        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withStdin circling $-            testCLISucceeded-              ["dataize", "--locator=Q.t", "--acyclic=proven", "--partial", "--protocol=" ++ path, "--sweet", "--hide-rho", "--flat", "--quiet"]-              []-          records <- readProtocol path-          lines records-            `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                       , "<dataize at=\"Φ.t\">"-                       , "  <morph at=\"Φ.t\">"-                       , "    <remembered meta=\"𝑛·0·1\" as=\"Φ.cyc\"/>"-                       , "    <formed meta=\"𝑒·0·1\"/>"-                       , "    <applied meta=\"𝑛·0·2\" by=\"morph\" at=\"Φ.t\" of=\"Φ.cyc\"><meta attr=\"x\">𝑒·0·1</meta></applied>"-                       , "    <formed meta=\"𝑛·0·3\" of=\"Φ.cyc\"><meta attr=\"x\">𝑒·0·1</meta></formed>"-                       , "    <applied meta=\"𝑒·0·2\" of=\"𝑛·0·1\"><meta attr=\"x\">𝑒·0·1</meta></applied>"-                       , "    <remembered of=\"𝑛·0·3\" as=\"𝑒·0·2\"/>"-                       , "    <morphed meta=\"𝑛·0·4\">𝑛·0·3</morphed>"-                       , "  </morph>"-                       , "  <boxed meta=\"𝑛·0·5\">𝑛·0·4.φ</boxed>"-                       , "  <applied meta=\"𝑒·0·3\" of=\"Φ.cyc\"><meta attr=\"α0\">𝑒·0·1</meta><meta attr=\"ρ\">𝑛·0·2</meta></applied>"-                       , "  <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5\">𝑒·0·3</normalized>"-                       , "  <morph at=\"𝑛·0·5\">"-                       , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·5\" of=\"Φ.cyc\"><meta attr=\"x\">𝑒·0·1</meta></applied>"-                       , "    <formed meta=\"𝑛·0·8\" of=\"Φ.cyc\"><meta attr=\"x\">𝑒·0·1</meta></formed>"-                       , "    <morphed meta=\"𝑛·0·9\">𝑛·0·8</morphed>"-                       , "  </morph>"-                       , "  <recalled of=\"𝑛·0·3\" as=\"𝑒·0·2\"/>"-                       , "  <recalled of=\"𝑛·0·1\" as=\"Φ.cyc\"/>"-                       , "  <morph at=\"𝑛·0·9.x\">"-                       , "    <morphed meta=\"𝑛·0·10\">𝑒·0·1</morphed>"-                       , "  </morph>"-                       , "  <looped symbol=\"𝜎1\" by=\"dataize\" match=\"proven\" at=\"𝑛·0·5\" of=\"𝑛·0·9\" object=\"Φ.cyc\"><with><meta attr=\"x\">𝑛·0·10</meta></with></looped>"-                       , "  <manufactured meta=\"𝛿·0·1\">𝜎1</manufactured>"-                       , "</dataize>"-                       ]--      it "writes a plausible cut to the protocol as plausible" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin circling $-            testCLISucceeded-              ["dataize", "--locator=Q.t", "--acyclic=plausible", "--partial", "--minutes=" ++ path, "--sweet", "--hide-rho", "--flat", "--quiet"]-              []-          records <- readProtocol path-          lines records `shouldContain` ["  looped 𝜎1 := Φ.cyc( x ↦ 𝑛·0·10 )  # 𝔻(𝑛·0·5), plausible, repeats 𝑛·0·9"]--      it "refuses the flag without a mode" $-        withStdin "⟦ t ↦ ⟦ Δ ⤍ 01-02 ⟧ ⟧" $-          testCLIFailed ["dataize", "--locator=Q.t", "--acyclic"] ["The option `--acyclic` expects an argument"]--      it "refuses a mode it does not know" $-        withStdin "⟦ t ↦ ⟦ Δ ⤍ 01-02 ⟧ ⟧" $-          testCLIFailed ["dataize", "--locator=Q.t", "--acyclic=sure"] ["The value 'sure' can't be used for '--acyclic' option"]--      it "answers a terminating program the same way with the flag" $-        withStdin "⟦ t ↦ ⟦ Δ ⤍ 01-02 ⟧ ⟧" $-          testCLISucceeded ["dataize", "--locator=Q.t", "--acyclic=proven"] ["01-02"]--    describe "--max-loops" $ do-      let once = "⟦ f ↦ ⟦ x ↦ ∅, φ ↦ ξ.x.again ⟧, start ↦ ⟦ again ↦ Φ.f( x ↦ Φ.stop( v ↦ Φ.start ) ) ⟧, stop ↦ ⟦ v ↦ ∅, again ↦ ⟦ Δ ⤍ 01- ⟧ ⟧, t ↦ Φ.f( x ↦ Φ.start ) ⟧"-      it "cuts a recursion that stops after one round without the flag" $-        withStdin once $-          testCLISucceeded-            ["dataize", "--locator=Q.t", "--acyclic=plausible"]-            ["40-45-00-00-00-00-00-00"]--      it "dataizes a recursion that stops after one round with --max-loops=1" $-        withStdin once $-          testCLISucceeded ["dataize", "--locator=Q.t", "--acyclic=plausible", "--max-loops=1"] ["01-"]--      it "cuts a recursion that never stops with --max-loops=1" $-        withStdin "⟦ cyc ↦ ⟦ x ↦ ∅, φ ↦ Φ.cyc( ξ.x ) ⟧, t ↦ Φ.cyc( ⟦⟧ ) ⟧" $-          testCLISucceeded-            ["dataize", "--locator=Q.t", "--acyclic=proven", "--max-loops=1", "--max-steps=4000"]-            ["40-45-00-00-00-00-00-00"]--      describe "over a recursion that takes an attribute off its own call" $ do-        let world = "⟦ num(φ) ↦ ⟦ gt(ρ, b) ↦ L_gt:λ, plus(ρ, b) ↦ L_plus:λ ⟧, seq(i) ↦ ⟦ φ ↦ Φ.num( φ ↦ 𝜎1:λ ).gt( i ).if( Φ.seq( i.plus( Φ.num( φ ↦ 01-:Δ ) ) ).plus( Φ.num( φ ↦ 01-:Δ ) ), i ) ⟧, app ↦ Φ.seq( Φ.num( φ ↦ 00-:Δ ) ) ⟧"-            atoms = T.pack "- λ: L_gt\n  dataize: {𝛿1: $.b}\n  𝑛: ⟦ if ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ⟧\n- λ: L_fork\n  morph: {𝑛1: $.left🌵, 𝑛2: $.right🌵}\n  evaluate: {𝑛3: 𝑛1, 𝑛4: 𝑛2}\n  symbolize: {𝑛5: 𝑛3, 𝑛6: 𝑛4}\n  cast: {𝑛7: 𝑛5, 𝑛8: 𝑛6}\n  join: {'on': $.on🌵, left: 𝑛7, right: 𝑛8, otherwise: L_fork}\n- λ: L_plus\n  dataize: {𝛿1: $.ρ}\n  𝑛: Φ.num( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )\n"-        it "cuts the recursion by --max-loops, not by --max-steps" $-          withLambdasOf atoms $ \file ->-            withStdin world $-              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--partial", "--cheat", "--max-steps=1000", "--max-firings=50"] ["40-45-00-00-00-00-00-00"]-        it "writes the cut of the dispatch off the copy that repeats one above" $-          withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-            hClose stream-            withLambdasOf atoms $ \file ->-              withStdin world $-                testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--partial", "--cheat", "--quiet", "--sweet", "--hide-rho", "--minutes=" ++ path] []-            records <- map (dropWhile (== ' ')) . lines <$> readProtocol path-            records `shouldContain` ["looped 𝜎5 := 𝑛·5·1.plus  # plausible, repeats 𝑛·0·4"]--      describe "over a world whose levels share the value below them twice" $ do-        let level :: String -> String-            level inner = "⟦ ρ ↦ ∅, x ↦ ∅, l ↦ ⟦ ρ ↦ ∅, x ↦ ∅, y ↦ ∅, m ↦ ⟦ ρ ↦ ∅, f ↦ ⟦ λ ⤍ L_f, ρ ↦ ∅ ⟧ ⟧ ⟧( x ↦ ξ.x, y ↦ ξ.x ).m ⟧( x ↦ " ++ inner ++ " ).l"-            world = "⟦ mk ↦ " ++ iterate level "⟦ ρ ↦ ∅ ⟧" !! 24 ++ ", app ↦ Φ.mk.f ⟧"-            atoms = T.pack "- λ: L_f\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-            triple :: String -> String-            triple target = "⟦ dataized(target, big) ↦ L_dataized:λ, peek(target) ↦ L_peek:λ, p ↦ ⟦ a ↦ Φ.dataized( target ↦ Φ.u, big ↦ Φ.mk.f ), b ↦ Φ.peek( target ↦ Φ.v ), c ↦ Φ.dataized( target ↦ Φ." ++ target ++ ", big ↦ Φ.mk.f ), λ ⤍ L_triple ⟧.φ, u ↦ ⟦ λ ⤍ 𝜎1 ⟧, v ↦ ⟦ λ ⤍ 𝜎2 ⟧, w ↦ ⟦ λ ⤍ 𝜎1 ⟧, mk ↦ " ++ iterate level "⟦ ρ ↦ ∅ ⟧" !! 30 ++ " ⟧"-            firings = T.pack "- λ: L_dataized\n  dataize: {𝛿1: $.target}\n  morph: {𝑛1: $.big}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_peek\n  dataize: {𝛿1: $.target}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_triple\n  morph: {𝑛1: $.a, 𝑛2: $.b, 𝑛3: $.c}\n  evaluate: {𝑛4: 𝑛1, 𝑛5: 𝑛2, 𝑛6: 𝑛3}\n  𝑛: ⟦ φ ↦ ⟦ a ↦ 𝑛4, b ↦ 𝑛5, c ↦ 𝑛6 ⟧ ⟧\n"-            recorded :: String -> IO (Maybe [String])-            recorded target =-              timeout 60000000 $-                withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-                  hClose stream-                  withLambdasOf firings $ \file ->-                    withStdin (triple target) $-                      testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.p", "--acyclic=plausible", "--max-loops=1", "--partial", "--cheat", "--sweet", "--hide-rho", "--max-cycles=1000", "--minutes=" ++ path] ["⊥"]-                  map (dropWhile (== ' ')) . lines <$> readProtocol path-        it "fires the atom without walking the shared values as a tree" $-          timeout-            60000000-            ( withLambdasOf atoms $ \file ->-                withStdin world $-                  testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--max-cycles=1000"] ["40-45-00-00-00-00-00-00"]-            )-            >>= (`shouldBe` Just ())-        it "takes the answer of a kindred firing without walking the shared values as a tree" $-          recorded "v" >>= (`shouldSatisfy` maybe False (elem "renamed 𝑛·1·14 ⇛ 𝜎5:λ  # from 𝑛·1·5, 𝜎1 as 𝜎2, 𝜎3 as 𝜎5"))-        it "takes the answer of a firing of the same operands without walking the shared values as a tree" $-          recorded "w" >>= (`shouldSatisfy` maybe False (elem "recalled 𝑛·1·5 ⇒ 𝜎3:λ"))--      describe "over a recursion that hands its own growing call to an atom" $ do-        let world = "⟦ go(x) ↦ ⟦ λ ⤍ L_go ⟧, seq(i) ↦ ⟦ ok ↦ Φ.go( Φ.seq( i.next ).ok ) ⟧, app ↦ Φ.seq( 𝜎1:λ ).ok ⟧"-            atoms = T.pack "- λ: L_go\n  morph: {𝑛1: $.x}\n  𝑛: 𝑛1\n"-        it "cuts the recursion by --max-loops, not by --max-steps" $-          withLambdasOf atoms $ \file ->-            withStdin world $-              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--max-steps=200"] ["40-45-00-00-00-00-00-00"]--      it "refuses a negative count" $-        withStdin once $-          testCLIFailed ["dataize", "--locator=Q.t", "--acyclic=plausible", "--max-loops=-1"] ["--max-loops must be >= 0"]--      it "refuses the flag without --acyclic" $-        withStdin once $-          testCLIFailed ["dataize", "--locator=Q.t", "--max-loops=1"] ["The option --max-loops requires --acyclic, since only --acyclic cuts a loop"]--    describe "--acyclic=plausible over a mutual recursion of four objects" $ do-      let world = "⟦ bit(fork) ↦ ⟦ if ↦ ξ.fork, φ ↦ ξ.fork( FF-:Δ, 00-:Δ ) ⟧, eq(a, b) ↦ ⟦ λ ⤍ L_eq ⟧, byte(data, i) ↦ ⟦ λ ⤍ L_byte ⟧, plus(i) ↦ ⟦ λ ⤍ L_plus ⟧, read(p) ↦ ⟦ at ↦ ξ.p ⟧, f1(i) ↦ ⟦ φ ↦ Φ.eq( Φ.byte( 𝜎1:λ, ξ.i ), 28-:Δ ).if( Φ.read( Φ.f4( Φ.plus( ξ.i ) ).at ), Φ.read( Φ.plus( ξ.i ) ) ) ⟧, " ++ intercalate ", " [printf "f%d(i) ↦ ⟦ φ ↦ Φ.eq( Φ.byte( 𝜎1:λ, ξ.i ), %02X-:Δ ).if( Φ.read( ξ.i ), Φ.f%d( Φ.f%d( ξ.i ).at ) ) ⟧" level (0x28 + level :: Int) level (level - 1) | level <- [2 .. 4 :: Int]] ++ ", t ↦ Φ.f4( 00-:Δ ).at ⟧"-          atoms = T.pack "- λ: L_fork\n  dataize: {𝛿1: $.on🌵}\n  morph: {𝑛1: $.left🌵, 𝑛2: $.right🌵}\n  stay: {𝑛3: 𝑛1, 𝑛4: 𝑛2}\n  evaluate: {𝑛5: 𝑛3, 𝑛6: 𝑛4}\n  undress: {𝑛15: 𝑛5, 𝑛16: 𝑛6}\n  symbolize: {𝑛11: 𝑛15, 𝑛12: 𝑛16}\n  defer: {𝑛13: 𝑛11, 𝑛14: 𝑛12}\n  cast: {𝑛19: 𝑛13, 𝑛20: 𝑛14}\n  join: {'on': 𝛿1, left: 𝑛19, right: 𝑛20, otherwise: L_fork}\n- λ: L_eq\n  dataize: {𝛿1: $.a, 𝛿2: $.b}\n  𝑛: Φ.bit( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ )\n- λ: L_byte\n  dataize: {𝛿1: $.data, 𝛿2: $.i}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_plus\n  dataize: {𝛿1: $.i}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-      it "answers the rounds alike an earlier one from memory, within a cap of firings the work of every round runs over" $-        withLambdasOf atoms $ \file ->-          withStdin world $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-loops=1", "--max-firings=400"] ["40-45-00-00-00-00-00-00"]--    describe "--acyclic=plausible over an accumulator that grows every round" $ do-      let world = "⟦ bit(fork) ↦ ⟦ if ↦ ξ.fork, φ ↦ ξ.fork( FF-:Δ, 00-:Δ ) ⟧, eq(a, b) ↦ ⟦ λ ⤍ L_eq ⟧, byte(data, i) ↦ ⟦ λ ⤍ L_byte ⟧, plus(x) ↦ ⟦ λ ⤍ L_plus ⟧, state(at, groups) ↦ ⟦ φ ↦ ξ.at ⟧, more(acc) ↦ ⟦ φ ↦ Φ.eq( Φ.byte( 𝜎1:λ, ξ.acc.at ), 29-:Δ ).if( ξ.acc, Φ.more( Φ.more( Φ.state( Φ.plus( ξ.acc.at ), ξ.acc.groups ) ) ) ) ⟧, e1 ↦ Φ.byte( 𝜎1:λ, Φ.more( Φ.state( 00-:Δ, 00-:Δ ) ).at ) ⟧"-          atoms = T.pack "- λ: L_fork\n  dataize: {𝛿1: $.on🌵}\n  morph: {𝑛1: $.left🌵, 𝑛2: $.right🌵}\n  stay: {𝑛3: 𝑛1, 𝑛4: 𝑛2}\n  evaluate: {𝑛5: 𝑛3, 𝑛6: 𝑛4}\n  undress: {𝑛15: 𝑛5, 𝑛16: 𝑛6}\n  symbolize: {𝑛11: 𝑛15, 𝑛12: 𝑛16}\n  defer: {𝑛13: 𝑛11, 𝑛14: 𝑛12}\n  cast: {𝑛19: 𝑛13, 𝑛20: 𝑛14}\n  join: {'on': 𝛿1, left: 𝑛19, right: 𝑛20, otherwise: L_fork}\n- λ: L_eq\n  dataize: {𝛿1: $.a, 𝛿2: $.b}\n  𝑛: Φ.bit( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ )\n- λ: L_byte\n  dataize: {𝛿1: $.data, 𝛿2: $.i}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_plus\n  dataize: {𝛿1: $.x}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-      it "shares the accumulator by a name, so no line of the minutes grows with the rounds" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withLambdasOf atoms $ \file ->-            withStdin world $-              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.e1", "--acyclic=plausible", "--max-loops=2", "--max-seconds=60", "--minutes=" ++ path, "--sweet", "--hide-rho"] ["40-45-00-00-00-00-00-00"]-          records <- lines <$> readProtocol path-          (any (isPrefixOf "shared " . dropWhile (== ' ')) records, maximum (map length records) < 1000) `shouldBe` (True, True)--      it "gives an argument read off a copy one name, so a chain of recursions stays within a cap of firings" $-        withLambdasOf atoms $ \file ->-          withStdin "⟦ bit(fork) ↦ ⟦ if ↦ ξ.fork, φ ↦ ξ.fork( FF-:Δ, 00-:Δ ) ⟧, eq(a, b) ↦ ⟦ λ ⤍ L_eq ⟧, byte(data, i) ↦ ⟦ λ ⤍ L_byte ⟧, num(v) ↦ ⟦ φ ↦ ξ.v, next ↦ Φ.num( ξ.v ) ⟧, r1(i) ↦ ⟦ φ ↦ Φ.eq( Φ.byte( 𝜎1:λ, ξ.i ), 0A-:Δ ).if( ξ.i, Φ.r1( ξ.i.next ) ) ⟧, r2(i) ↦ ⟦ φ ↦ Φ.eq( Φ.byte( 𝜎1:λ, ξ.i ), 22-:Δ ).if( Φ.r2( Φ.r1( ξ.i.next ) ), ξ.i ) ⟧, r3(i) ↦ ⟦ φ ↦ Φ.eq( Φ.byte( 𝜎1:λ, ξ.i ), 23-:Δ ).if( Φ.r3( Φ.r2( ξ.i.next ) ), ξ.i ) ⟧, r4(i) ↦ ⟦ φ ↦ Φ.eq( Φ.byte( 𝜎1:λ, ξ.i ), 24-:Δ ).if( Φ.r4( Φ.r3( ξ.i.next ) ), ξ.i ) ⟧, e1 ↦ Φ.byte( 𝜎1:λ, Φ.r4( Φ.num( 00-:Δ ) ) ) ⟧" $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.e1", "--acyclic=plausible", "--max-loops=1", "--max-firings=600"] ["40-45-00-00-00-00-00-00"]--    describe "--acyclic at a recursive call" $ do-      let recursive = "⟦ call(a) ↦ ⟦ λ ⤍ L_call ⟧, wrap(v) ↦ ⟦⟧, down(i) ↦ ⟦ φ ↦ Φ.call( a ↦ Φ.down( i ↦ Φ.wrap( v ↦ i ) ) ) ⟧, t ↦ Φ.down( i ↦ ⟦ Δ ⤍ 01- ⟧ ) ⟧"-          calling = T.pack "- λ: L_call\n  morph:\n    𝑛1: $.a\n  evaluate:\n    𝑛2: 𝑛1\n  𝑛: 𝑛2\n"-          recorded :: String -> IO [String]-          recorded name =-            withTempFile name $ \(path, stream) -> do-              hClose stream-              withLambdasOf calling $ \file ->-                withStdin recursive $-                  testCLISucceeded-                    ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", recording path, "--quiet", "--sweet", "--hide-rho"]-                    []-              lines <$> readProtocol path-      it "answers the recursive call it cuts with a fresh symbol and goes on" $-        withLambdasOf calling $ \file ->-          withStdin recursive $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible"] ["40-45-00-00-00-00-00-00"]--      it "writes the recursive call an operand comes to to the protocol as passed, as a call of the object" $-        recorded "protocolXXXXXX.txt" >>= (`shouldContain` ["      passed 𝑛·1·4 := Φ.down( i ↦ Φ.wrap( v ↦ 01-:Δ ) )  # plausible, repeats 𝑛·0·4"])--      it "writes the recursive call an operand comes to to the XML protocol as passed, with the object and the metas of its arguments" $-        recorded "protocolXXXXXX.xml" >>= (`shouldContain` ["      <passed meta=\"𝑛·1·4\" by=\"morph\" match=\"plausible\" at=\"ξ.a\" of=\"𝑛·0·4\" object=\"Φ.down\"><with><meta attr=\"i\">𝑒·0·2</meta></with></passed>"])--      it "cuts the recursive call after the firing that handed it back" $-        recorded "protocolXXXXXX.txt" >>= (`shouldContain` ["  looped 𝜎1 := Φ.down( i ↦ Φ.wrap( v ↦ 01-:Δ ) )  # 𝔼(𝑛·0·13.a), plausible, repeats 𝑛·0·13"])--    describe "--acyclic at a recursive call through a fork" $ do-      let recursive = "⟦ if(c, a, b) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ξ.c, left🌵 ↦ ξ.a, right🌵 ↦ ξ.b ⟧, wrap(v) ↦ ⟦⟧, down(i) ↦ ⟦ φ ↦ Φ.if( c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ Φ.down( i ↦ Φ.wrap( v ↦ i ) ), b ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧ ) ⟧, t ↦ Φ.down( i ↦ ⟦ Δ ⤍ 01- ⟧ ) ⟧"-          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  cast:\n    𝑛5: 𝑛3\n    𝑛6: 𝑛4\n  join:\n    on: 𝛿1\n    left: 𝑛5\n    right: 𝑛6\n    otherwise: L_fork\n"-          recorded :: String -> String -> IO [String]-          recorded loops name =-            withTempFile name $ \(path, stream) -> do-              hClose stream-              withLambdasOf forking $ \file ->-                withStdin recursive $-                  testCLISucceeded-                    ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-loops=" ++ loops, recording path, "--quiet", "--sweet", "--hide-rho"]-                    []-              lines <$> readProtocol path-      it "answers the copy a side of a fork makes again with a fresh symbol and joins" $-        withLambdasOf forking $ \file ->-          withStdin recursive $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-loops=1"] ["40-45-00-00-00-00-00-00"]--      it "writes the copy a side of a fork comes to again to the protocol as passed, as a call of the object" $-        recorded "1" "protocolXXXXXX.txt" >>= (`shouldContain` ["        passed 𝑛·3·4 := Φ.down( i ↦ Φ.wrap( v ↦ Φ.wrap( v ↦ 01-:Δ ) ) )  # plausible, repeats 𝑛·0·4"])--      it "writes the copy a side of a fork comes to again to the XML protocol as passed, with the object and the metas of its arguments" $-        recorded "1" "protocolXXXXXX.xml" >>= (`shouldContain` ["        <passed meta=\"𝑛·3·4\" by=\"morph\" match=\"plausible\" at=\"ξ.left🌵\" of=\"𝑛·0·4\" object=\"Φ.down\"><with><meta attr=\"i\">𝑒·2·3</meta></with></passed>"])--      it "counts the copies the sides of earlier rounds of a fork made under --max-loops=2" $-        recorded "2" "protocolXXXXXX.txt" >>= (`shouldContain` ["          passed 𝑛·6·4 := Φ.down( i ↦ Φ.wrap( v ↦ Φ.wrap( v ↦ Φ.wrap( v ↦ 01-:Δ ) ) ) )  # plausible, repeats 𝑛·0·4"])--    describe "--acyclic at an object an atom only hands back" $ do-      let world = "⟦ call(a) ↦ ⟦ λ ⤍ L_call ⟧, down ↦ ⟦ φ ↦ Φ.call( Φ.down ).at, at ↦ 2A-:Δ ⟧, t ↦ Φ.down ⟧"-          calling = T.pack "- λ: L_call\n  morph:\n    𝑛1: $.a\n  𝑛: 𝑛1\n"-          recorded :: String -> IO [String]-          recorded name =-            withTempFile name $ \(path, stream) -> do-              hClose stream-              withLambdasOf calling $ \file ->-                withStdin world $-                  testCLISucceeded-                    ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", recording path, "--quiet", "--sweet", "--hide-rho"]-                    []-              lines <$> readProtocol path-      forM_ ["plausible", "proven"] $ \mode ->-        it ("hands the object back as it is and takes the attribute off it under --acyclic=" ++ mode) $-          withLambdasOf calling $ \file ->-            withStdin world $-              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=" ++ mode] ["2A-"]--      it "writes the object it hands back to the protocol as passed" $-        recorded "protocolXXXXXX.txt" >>= (`shouldContain` ["        passed 𝑛·1·2 := Φ.down  # plausible, repeats 𝑛·1·1"])--      it "writes the object it hands back to the XML protocol as passed" $-        recorded "protocolXXXXXX.xml" >>= (`shouldContain` ["        <passed meta=\"𝑛·1·2\" by=\"morph\" match=\"plausible\" at=\"ξ.a\" of=\"𝑛·1·1\" object=\"Φ.down\"/>"])--    describe "--acyclic at a copy holding a λ" $ do-      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, fork(left, right) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧, x ↦ Φ.dataized( Φ.fork( Φ.dataized( Φ.x ), ⟦ λ ⤍ 𝜎3 ⟧ ) ) ⟧"-          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-          recorded :: String -> IO [String]-          recorded name =-            withTempFile name $ \(path, stream) -> do-              hClose stream-              withLambdasOf forking $ \file ->-                withStdin recursive $-                  testCLISucceeded-                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", recording path, "--quiet", "--sweet", "--hide-rho"]-                    []-              lines <$> readProtocol path-      it "answers the copy holding a λ it cuts with a fresh symbol and goes on" $-        withLambdasOf forking $ \file ->-          withStdin recursive $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]--      it "writes the copy holding a λ it cuts to the protocol as a call of the object" $-        recorded "protocolXXXXXX.txt" >>= (`shouldContain` ["                                looped 𝜎6 := Φ.dataized( target ↦ 𝜎5:λ )  # plausible, repeats 𝑛·9·3"])--    describe "--acyclic at a copy holding a λ that evaluate fires" $ do-      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, fork(left, right) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧, num(φ) ↦ ⟦⟧, x ↦ ⟦ φ ↦ Φ.fork( Φ.num( ⟦ λ ⤍ 𝜎3 ⟧ ), Φ.num( Φ.dataized( Φ.x ) ) ) ⟧ ⟧"-          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-      it "answers the copy holding a λ that evaluate cuts with a fresh symbol and goes on" $-        withLambdasOf forking $ \file ->-          withStdin recursive $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]--    describe "--acyclic at a copy whose call ends with an attribute" $ do-      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, fork(left, right) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧, num(φ) ↦ ⟦⟧, x ↦ Φ.fork( Φ.num( ⟦ λ ⤍ 𝜎5 ⟧ ), Φ.fork( Φ.num( ⟦ λ ⤍ 𝜎3 ⟧ ), Φ.num( Φ.dataized( Φ.x.φ ) ) ) ) ⟧"-          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-          recorded :: String -> IO [String]-          recorded name =-            withTempFile name $ \(path, stream) -> do-              hClose stream-              withLambdasOf forking $ \file ->-                withStdin recursive $-                  testCLISucceeded-                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", recording path, "--quiet", "--sweet", "--hide-rho"]-                    []-              lines <$> readProtocol path-      it "writes the copy it cuts to the protocol as a call of the object with the attribute it ends with" $-        recorded "protocolXXXXXX.txt" >>= (`shouldSatisfy` any (isInfixOf "looped 𝜎6 := Φ.fork( left ↦ 𝑛·9·9, right ↦ 𝑛·11·2 ).right🌵.φ  # plausible"))--      it "writes the copy it cuts to the XML protocol with the object, the metas of its arguments and the attribute it ends with" $-        recorded "protocolXXXXXX.xml" >>= (`shouldSatisfy` any (isInfixOf "object=\"Φ.fork\" dispatch=\"right🌵.φ\"><with><meta attr=\"left\">𝑛·9·9</meta><meta attr=\"right\">𝑛·11·2</meta></with></looped>"))--    describe "--acyclic at a copy whose argument repeats the same loop" $ do-      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, times(b) ↦ ⟦ λ ⤍ L_times ⟧, x ↦ Φ.times( Φ.dataized( Φ.x ) ) ⟧"-          atoms = T.pack "- λ: L_times\n  dataize:\n    𝛿1: $.b\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-      it "ends the run with an answer once it cuts the loop" $-        withLambdasOf atoms $ \file ->-          withStdin recursive $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--max-seconds=30"] ["40-45-00-00-00-00-00-00"]--      it "writes the cut of the argument inside the cut of the call to the protocol" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withLambdasOf atoms $ \file ->-            withStdin recursive $-              testCLISucceeded-                ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--max-seconds=30", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]-                []-          records <- readProtocol path-          filter (isInfixOf "looped") (lines records) `shouldBe` ["                          looped 𝜎1 := Φ.dataized( target ↦ Φ.x )  # 𝔼(𝑛·6·3.b), plausible, repeats 𝑛·6·6", "                          looped 𝜎2 := Φ.times( b ↦ 𝜎1:λ )  # plausible, repeats 𝑛·6·3"]--    describe "--acyclic at a copy whose argument raises" $-      it "writes the copy of the terminator into the call it cuts by its name, never firing it" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withLambdasOf (T.pack "- λ: L_times\n  terminators: [L_throw]\n  dataize:\n    𝛿1: $.b\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_dataized\n  terminators: [L_throw]\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \file ->-            withStdin "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, throw(message) ↦ ⟦ λ ⤍ L_throw ⟧, times(b, c) ↦ ⟦ λ ⤍ L_times ⟧, x ↦ Φ.times( Φ.dataized( Φ.x ), Φ.throw( 𝜎1:λ ) ) ⟧" $-              testCLISucceeded-                ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--max-seconds=30", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]-                []-          records <- readProtocol path-          filter (isInfixOf "looped 𝜎3") (lines records) `shouldBe` ["                          looped 𝜎3 := Φ.times( b ↦ 𝜎2:λ, c ↦ 𝑛·6·12 )  # plausible, repeats 𝑛·6·5"]--    describe "--acyclic at a fork the memo fabricated" $ do-      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, bool(fork) ↦ ⟦ if ↦ ξ.fork ⟧, num(φ) ↦ ⟦⟧, p ↦ ⟦ φ ↦ Φ.bool( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( Φ.num( ⟦ λ ⤍ 𝜎3 ⟧ ), Φ.num( Φ.dataized( Φ.p ) ) ) ⟧, q ↦ ⟦ φ ↦ Φ.num( ⟦ λ ⤍ 𝜎5 ⟧ ) ⟧, x ↦ Φ.bool( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( Φ.p, Φ.q ) ⟧"-          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-          recorded :: IO [String]-          recorded =-            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-              hClose stream-              withLambdasOf forking $ \file ->-                withStdin recursive $-                  testCLISucceeded-                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]-                    []-              lines <$> readProtocol path-      it "answers the fork it cuts inside a formation the memo fabricated with a fresh symbol and goes on" $-        withLambdasOf forking $ \file ->-          withStdin recursive $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]--      it "writes the fork it cuts inside a fabricated formation by its symbol alone, since no fact names it" $-        recorded >>= (`shouldSatisfy` any (isInfixOf "looped 𝜎6  # 𝔻("))--      it "answers the fork it cuts inside a formation fabricated from a fork of the world with a fresh symbol and goes on" $-        withLambdasOf forking $ \file ->-          withStdin "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, fork(left, right) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧, num(φ) ↦ ⟦⟧, p ↦ ⟦ φ ↦ Φ.fork( Φ.num( ⟦ λ ⤍ 𝜎3 ⟧ ), Φ.num( Φ.dataized( Φ.p ) ) ) ⟧, q ↦ ⟦ φ ↦ Φ.num( ⟦ λ ⤍ 𝜎5 ⟧ ) ⟧, x ↦ Φ.fork( Φ.p, Φ.q ) ⟧" $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]--    describe "--acyclic at a fork written in place" $ do-      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, bool(fork) ↦ ⟦ if ↦ ξ.fork ⟧, num(φ) ↦ ⟦⟧, p ↦ ⟦ φ ↦ Φ.bool( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( Φ.num( ⟦ λ ⤍ 𝜎3 ⟧ ), Φ.num( Φ.dataized( Φ.p ) ) ) ⟧, x ↦ Φ.p ⟧"-          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-          recorded :: IO [String]-          recorded =-            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-              hClose stream-              withLambdasOf forking $ \file ->-                withStdin recursive $-                  testCLISucceeded-                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]-                    []-              lines <$> readProtocol path-      it "answers the fork it cuts with a fresh symbol and goes on" $-        withLambdasOf forking $ \file ->-          withStdin recursive $-            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]--      it "writes the loop it cuts as a call of the object whose bindings the copy repeats exactly" $-        recorded >>= (`shouldSatisfy` any (isInfixOf "looped 𝜎5 := Φ.p  #"))--      it "dont get stuck above the fork it cuts" $-        recorded >>= (`shouldNotSatisfy` any (isInfixOf "stuck L_dataized"))--    describe "--acyclic at a fork nested in a side of another fork" $ do-      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, bool(fork) ↦ ⟦ if ↦ ξ.fork ⟧, num(φ) ↦ ⟦⟧, p ↦ ⟦ φ ↦ Φ.bool( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( Φ.num( ⟦ λ ⤍ 𝜎5 ⟧ ), Φ.bool( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎6 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( Φ.num( ⟦ λ ⤍ 𝜎3 ⟧ ), Φ.num( Φ.dataized( Φ.p ) ) ) ) ⟧, x ↦ Φ.p ⟧"-          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"-          recorded :: IO [String]-          recorded =-            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-              hClose stream-              withLambdasOf forking $ \file ->-                withStdin recursive $-                  testCLISucceeded-                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]-                    []-              lines <$> readProtocol path-      it "writes the loop it cuts at the fabricated fork by its symbol alone, since no fact names it" $-        recorded >>= (`shouldSatisfy` any (isInfixOf "looped 𝜎7  # 𝔻(𝑛·9·12), plausible"))--      it "dont get stuck above the nested fork it cuts" $-        recorded >>= (`shouldNotSatisfy` any (isInfixOf "stuck L_dataized"))--    describe "--acyclic at copies of one atom called from different places" $-      it "dont cut a copy of an atom that only resembles the copies open above it" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withLambdasOf (T.pack "- λ: L_d\n  dataize:\n    𝛿1: $.t\n  𝑛: Φ.w( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )\n") $ \file ->-            withStdin "⟦ w ↦ ⟦ φ ↦ ∅, me ↦ ξ, you ↦ ξ, x ↦ Φ.d( t ↦ ξ ).me.you ⟧, d(t) ↦ ⟦ λ ⤍ L_d ⟧, e ↦ Φ.d( t ↦ Φ.d( t ↦ Φ.d( t ↦ ⟦ φ ↦ Φ.d( t ↦ ⟦ Δ ⤍ 01- ⟧ ).x ⟧ ) ) ) ⟧" $-              testCLISucceeded-                ["dataize", "--symbolic=" ++ file, "--locator=Q.e", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]-                []-          records <- readProtocol path-          lines records `shouldNotSatisfy` any (isInfixOf "looped")--    describe "--acyclic at a fork whose side grows the argument of a copy" $-      it "cuts the recursion that the side of the fork runs" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withLambdasOf (T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  stay:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  evaluate:\n    𝑛5: 𝑛3\n    𝑛6: 𝑛4\n  undress:\n    𝑛15: 𝑛5\n    𝑛16: 𝑛6\n  symbolize:\n    𝑛11: 𝑛15\n    𝑛12: 𝑛16\n  defer:\n    𝑛13: 𝑛11\n    𝑛14: 𝑛12\n  cast:\n    𝑛19: 𝑛13\n    𝑛20: 𝑛14\n  join:\n    on: 𝛿1\n    left: 𝑛19\n    right: 𝑛20\n    otherwise: L_fork\n") $ \file ->-            withStdin "⟦ bit(fork) ↦ ⟦ if ↦ ξ.fork, φ ↦ ξ.fork( FF-:Δ, 00-:Δ ) ⟧, no ↦ Φ.bit( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ 00-:Δ, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ), maybe ↦ Φ.bit( ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ), next(x) ↦ ⟦ φ ↦ ξ.x ⟧, down(i) ↦ ⟦ φ ↦ Φ.maybe.if( Φ.no, Φ.down( Φ.next( ξ.i ) ) ) ⟧, l🌵 ↦ ⟦ e1 ↦ Φ.down( i ↦ 𝜎3:λ ).if( FF-:Δ, 00-:Δ ) ⟧ ⟧" $-              testCLISucceeded-                ["dataize", "--symbolic=" ++ file, "--locator=Q.l🌵.e1", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho", "--max-steps=1000", "--max-seconds=10"]-                []-          records <- readProtocol path-          lines records `shouldSatisfy` any (isInfixOf "looped")--    it "dataizes with --sequence" $-      withStdin "[[ @ -> $.f(y -> [[ ]]), f -> [[ D> 00-, y -> ? ]] ]]" $-        testCLISucceeded-          ["dataize", "--sequence", "--output=latex", "--flat", "--sweet"]-          [ intercalate-              "\n"-              [ "\\begin{phiquation}"-              , "[[ @ -> |f| ( |y| -> [[]] ), |f|(|y|) -> |00-| : D ]] \\phiDataize[\\nameref{r:box}]"-              , "  \\phiDataize [[ @ -> |f| ( |y| -> [[]] ), |f|(|y|) -> |00-| : D ]] . @ \\phiNormalize[\\nameref{r:dot}]"-              , "  \\phiNormalize [[ |f|(|y|) -> |00-| : D ]] . |f| ( |y| -> [[]], \\phiTerminal{\\rho} -> Q ) \\phiNormalize[\\nameref{r:dot}]"-              , "  \\phiNormalize [[ D> |00-|, |y| -> ? ]] ( \\phiTerminal{\\rho} -> [[ |f|(|y|) -> |00-| : D ]], |y| -> [[]], \\phiTerminal{\\rho} -> Q ) \\phiNormalize[\\nameref{r:skip}]"-              , "  \\phiNormalize [[ D> |00-|, |y| -> ? ]] ( |y| -> [[]], \\phiTerminal{\\rho} -> Q ) \\phiNormalize[\\nameref{r:copy}]"-              , "  \\phiNormalize [[ D> |00-|, |y| -> [[]] ]] ( \\phiTerminal{\\rho} -> Q ) \\phiNormalize[\\nameref{r:skip}]"-              , "  \\phiNormalize [[ D> |00-|, |y| -> [[]] ]] \\phiDataize[\\nameref{r:delta}]"-              , "  \\phiDataize |00-|{.}"-              , "\\end{phiquation}"-              , "00-"-              ]-          ]--    it "keeps the delta step in --sequence under --quiet" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded-          ["dataize", "--sequence", "--quiet", "--output=latex", "--flat", "--sweet"]-          [ intercalate-              "\n"-              [ "|01-| : D \\phiDataize[\\nameref{r:delta}]"-              , "  \\phiDataize |01-|{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "ends the phi --sequence at the bare data" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded-          ["dataize", "--sequence", "--quiet", "--flat", "--sweet"]-          ["01-:Δ\n01-"]--    it "focuses a compressed sequence whose meet replaces a step root" $-      withStdin "[[ @ -> [[ @ -> $.c.plus( 32.0 ), c -> 25.0 ]], bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus -> [[ ^ -> ?, x -> ?, L> L_number_plus ]] ]] ]]" $-        testCLISucceeded-          ["dataize", symbolic, "--output=latex", "--sweet", "--nonumber", "--compress", "--canonize", "--meet-prefix=dataization", "--sequence", "--flat", "--quiet", "--hide=Q.bytes", "--hide=Q.number", "--locator=Q.@", "--focus=Q.@", "--meet-length=5", "--meet-popularity=1"]-          ["\\phinoMeet{dataization:1}{ [[ @ -> |c| . |plus| ( |32.0| ), |c| -> |25.0| ]] } \\phiDataize[\\nameref{r:box}]"]--    it "compresses a canonized whole-expression sequence into a meet" $-      withStdin "[[ @ -> [[ @ -> $.c.plus( 32.0 ), c -> 25.0 ]], bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus -> [[ ^ -> ?, x -> ?, L> L_number_plus ]] ]] ]]" $-        testCLISucceeded-          ["dataize", symbolic, "--output=latex", "--sweet", "--nonumber", "--compress", "--canonize", "--meet-prefix=dataization", "--sequence", "--flat", "--quiet", "--meet-length=5", "--meet-popularity=1"]-          ["\\phinoMeet{dataization:1}"]--    it "canonizes the residue it prints with --partial" $-      withStdin "[[ @ -> [[ L> Foo ]] ]]" $-        testCLISucceeded ["dataize", "--partial", "--canonize", "--flat", "--sweet"] ["Fn1:λ"]--    it "hides an object outside the residue --locator aims at with --partial" $-      withStdin "[[ t -> [[ @ -> [[ L> Foo ]] ]], o -> [[ D> 03- ]] ]]" $-        testCLISucceeded ["dataize", "--partial", "--locator=Q.t", "--hide=Q.o", "--flat", "--sweet"] ["Foo:λ"]--    it "dataizes with --locator" $-      withStdin "[[ ex -> [[ @ -> Q.x ]], x -> [[ D> 42- ]] ]]" $-        testCLISucceeded ["dataize", "--locator=Q.ex"] ["42-"]--    it "does not print bytes with --quiet" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded ["dataize", "--quiet"] []--    describe "--abridged" $ do-      let wide = "⟦ t ↦ ⟦ φ ↦ ⟦ Δ ⤍ 01-02 ⟧, anfang ↦ ξ.schluss, mitte ↦ ξ.anfang, schluss ↦ ξ.mitte, rand ↦ ξ.schluss ⟧ ⟧"-          stuck = "⟦ t ↦ ⟦ λ ⤍ L_weit, anfang ↦ ξ.schluss, mitte ↦ ξ.anfang, schluss ↦ ξ.mitte, rand ↦ ξ.schluss ⟧ ⟧"-      it "folds a long formation in the text protocol" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin stuck $-            testCLISucceeded ["dataize", "--locator=Q.t", "--partial", "--minutes=" ++ path, "--abridged", "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          lines records `shouldContain` ["  unanswered L_weit  # 𝔻(⟦ λ ⤍ L_weit, +4 ⟧)"]-      it "names a long formation in the XML protocol by its path rather than folding it" $-        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withStdin stuck $-            testCLISucceeded ["dataize", "--locator=Q.t", "--partial", "--protocol=" ++ path, "--abridged", "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          lines records `shouldContain` ["  <unanswered λ=\"L_weit\" by=\"dataize\">Φ.t</unanswered>"]-      forM_-        [ ("textXXXXXX.txt", "      𝛿·1·1 := 01-02-..(8b)..-0B-0C")-        , ("XMLXXXXXX.xml", "      <dataized meta=\"𝛿·1·1\">01-02-..(8b)..-0B-0C</dataized>")-        ]-        ( \(template, line) ->-            it ("cuts a long datum a firing came down to under --abridged-data, as " ++ line) $-              withTempFile template $ \(path, stream) -> do-                hClose stream-                withLambdasOf (T.pack "- λ: L_outer\n  dataize:\n    𝛿1: ξ.arg\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \outer ->-                  withStdin "⟦ x ↦ ⟦ arg ↦ ⟦ Δ ⤍ 01-02-03-04-05-06-07-08-09-0A-0B-0C ⟧, λ ⤍ L_outer ⟧ ⟧" $-                    testCLISucceeded ["dataize", "--symbolic=" ++ outer, "--locator=Q.x", "--partial", recording path, "--abridged", "--abridged-data", "--sweet", "--hide-rho", "--quiet"] []-                records <- readProtocol path-                lines records `shouldContain` [line]-        )-      forM_-        [ ("textXXXXXX.txt", "      𝛿·1·1 := 30-31-32-33-34-35-36-37-38-39-41-42-43-44-45-46")-        , ("XMLXXXXXX.xml", "      <dataized meta=\"𝛿·1·1\">30-31-32-33-34-35-36-37-38-39-41-42-43-44-45-46</dataized>")-        ]-        ( \(template, line) ->-            it ("keeps a long datum a firing came down to whole without --abridged-data, as " ++ line) $-              withTempFile template $ \(path, stream) -> do-                hClose stream-                withLambdasOf (T.pack "- λ: L_hex\n  dataize:\n    𝛿1: ξ.arg\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \hex ->-                  withStdin "⟦ x ↦ ⟦ arg ↦ ⟦ Δ ⤍ 30-31-32-33-34-35-36-37-38-39-41-42-43-44-45-46 ⟧, λ ⤍ L_hex ⟧ ⟧" $-                    testCLISucceeded ["dataize", "--symbolic=" ++ hex, "--locator=Q.x", "--partial", recording path, "--abridged", "--sweet", "--hide-rho", "--quiet"] []-                records <- readProtocol path-                lines records `shouldContain` [line]-        )-      it "folds a long formation under the width given as the value" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin stuck $-            testCLISucceeded ["dataize", "--locator=Q.t", "--partial", "--minutes=" ++ path, "--abridged=64", "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          lines records `shouldContain` ["  unanswered L_weit  # 𝔻(⟦ λ ⤍ L_weit, +4 ⟧)"]-      it "keeps a formation whole under a width it fits in" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin stuck $-            testCLISucceeded ["dataize", "--locator=Q.t", "--partial", "--minutes=" ++ path, "--abridged=200", "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          lines records `shouldContain` ["  unanswered L_weit  # 𝔻(⟦ λ ⤍ L_weit, anfang ↦ schluss, mitte ↦ anfang, schluss ↦ mitte, rand ↦ schluss ⟧)"]-      it "refuses a width that is not a number" $-        withStdin wide $-          testCLIFailed ["dataize", "--locator=Q.t", "--protocol=breit.txt", "--abridged=breit"] ["cannot parse value `breit'"]-      it "leaves the printed result whole" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin wide $-            testCLISucceeded ["morph", "--locator=Q.t", "--minutes=" ++ path, "--abridged", "--sweet", "--hide-rho", "--flat"] ["anfang ↦ schluss, mitte ↦ anfang"]-      it "refuses the flag without a protocol" $-        withStdin wide $-          testCLIFailed ["dataize", "--locator=Q.t", "--abridged"] ["The option --abridged requires --protocol"]-      it "refuses to cut the data in dataize without --abridged" $-        withStdin wide $-          testCLIFailed ["dataize", "--locator=Q.t", "--protocol=daten.txt", "--abridged-data"] ["The option --abridged-data requires --abridged"]-      it "refuses to cut the data in morph without --abridged" $-        withStdin wide $-          testCLIFailed ["morph", "--locator=Q.t", "--protocol=daten.xml", "--abridged-data"] ["The option --abridged-data requires --abridged"]--    describe "--protocol" $ do-      let sum' = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6) ]]"-          chained = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6).plus(7) ]]"-          nested = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6.plus(7)) ]]"-          mixed = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]], times(^, x) -> [[ L> L_number_times ]] ]], @ -> 5.plus(6).times(7) ]]"-      it "opens the protocol with the run it is the protocol of" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []-          records <- readProtocol path-          records `shouldBe` "𝔻(Φ):\n  𝛿·0·1 := 01-\n"--      it "adds the time, the depth, the firings and the memory to every line under --profile" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--minutes=" ++ path, "--profile", "--quiet"] []-          records <- readProtocol path-          lines records `shouldSatisfy` all (\line -> all (`isInfixOf` line) [" ms, at ", ", depth ", ", firings ", ", heap ", ", peak "])--      it "refuses --profile without --minutes" $-        withStdin "[[ D> 01- ]]" $-          testCLIFailed ["dataize", "--profile", "--quiet"] ["The option --profile requires --minutes"]--      it "opens the protocol with a header naming the phino that wrote it" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          records `shouldSatisfy` isPrefixOf ("# Written by phino " ++ showVersion version ++ " ")--      it "writes the command line of the run into the header" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--minutes=" ++ takeFileName path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` ["# Command: phino dataize --minutes=" ++ takeFileName path ++ " --quiet"]--      it "writes the world read from the standard input into the header" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $-            testCLISucceeded ["dataize", "--locator=Q.t", "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` ["# World: stdin, 1 line, 32 bytes, 1 object at the top, 2 bindings"]--      it "writes the world read from a file into the header" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withTempFileContent "worldXXXXXX.phi" "[[\n  t -> [[ D> 01- ]]\n]]\n" $ \world -> do-            testCLISucceeded ["dataize", "--locator=Q.t", "--minutes=" ++ path, "--quiet", world] []-            records <- readUtf8 path-            lines records `shouldContain` [printf "# World: %s, 3 lines, 26 bytes, 1 object at the top, 2 bindings" world]--      it "writes the λ functions of the run into the header" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin sum' $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` [printf "# Symbolic: %s, 5 entries" lambdasFile]--      it "writes the locator of the run into the header" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $-            testCLISucceeded ["dataize", "--locator=Q.t", "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` ["# Locator: Φ.t"]--      it "writes the expression the locator points at into the header" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $-            testCLISucceeded ["dataize", "--locator=Q.t", "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` ["# Expression: ⟦ Δ ⤍ 01- ⟧"]--      it "writes the expression given to --inside into the header" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $-            testCLISucceeded ["morph", "--inside=Φ.t", "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` ["# Expression: Φ.t"]--      it "writes the header into the XML protocol" $-        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $-            testCLISucceeded ["dataize", "--locator=Q.t", "--protocol=" ++ path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` ["  <locator>Φ.t</locator>"]--      it "closes the protocol with its msec on the third line from the end" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin sum' $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          (lines records !! (length (lines records) - 3)) `shouldSatisfy` isPrefixOf "msec "--      it "closes the protocol with the firings it counted" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin sum' $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` ["firings 1"]--      it "closes the protocol with its fps on the last line" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin sum' $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          last (lines records) `shouldSatisfy` isPrefixOf "fps "--      it "closes the protocol with zero firings when the run fires nothing" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []-          records <- readUtf8 path-          lines records `shouldContain` ["firings 0"]--      it "writes one line per operand and one per answer of a firing" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin sum' $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          lines records-            `shouldBe` [ "𝔻(Φ):"-                       , "  boxed 𝑛·0·1 := Φ.φ"-                       , "  normalized 𝑛·0·2 := 5.0.plus( 6.0 )  # Φ.φ"-                       , "  𝕄(𝑛·0·1):"-                       , "    normalized 𝑛·0·3 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"-                       , "    𝑛·0·4 := 5.0"-                       , "    𝑛·0·5 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "    normalized 𝑛·0·6 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"-                       , "    𝑛·0·7 := 𝑛·0·4.plus( x ↦ 6.0 )"-                       , "    𝑛·0·8 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"-                       , "    morphed 𝑛·0·9 := 𝑛·0·8"-                       , "  𝔼(L_number_plus):  # 𝔻(𝑛·0·1)"-                       , "    𝔻(ξ.ρ):"-                       , "      𝕄(ξ.ρ):"-                       , "        𝑛·1·1 := 5.0"-                       , "        𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "        morphed 𝑛·1·3 := 𝑛·1·2"-                       , "      boxed 𝑛·1·4 := 𝑛·1·3.φ"-                       , "      normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"-                       , "      𝕄(𝑛·1·4):"-                       , "        normalized 𝑛·1·6 := ∅:φ  # Φ.bytes"-                       , "        𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"-                       , "        𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ"-                       , "        morphed 𝑛·1·9 := 𝑛·1·8"-                       , "      boxed 𝑛·1·10 := 𝑛·1·9.φ"-                       , "      normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"-                       , "      𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0"-                       , "    𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)"-                       , "    𝔻(ξ.x):"-                       , "      𝕄(ξ.x):"-                       , "        𝑛·1·12 := 6.0"-                       , "        𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "        morphed 𝑛·1·14 := 𝑛·1·13"-                       , "      boxed 𝑛·1·15 := 𝑛·1·14.φ"-                       , "      normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"-                       , "      𝕄(𝑛·1·15):"-                       , "        𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"-                       , "        𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ"-                       , "        morphed 𝑛·1·19 := 𝑛·1·18"-                       , "      boxed 𝑛·1·20 := 𝑛·1·19.φ"-                       , "      normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"-                       , "      𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0"-                       , "    𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)"-                       , "    𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"-                       , "    𝕄(𝑛·1·22):"-                       , "      𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )"-                       , "      𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"-                       , "      morphed 𝑛·1·25 := 𝑛·1·24"-                       , "    𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)"-                       , "    evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·8"-                       , "  boxed 𝑛·0·10 := 𝑛·1·27.φ"-                       , "  normalized 𝑛·0·11 := 𝜎1:λ  # 𝑛·0·10"-                       , "  𝛿·0·1 := 𝔻(𝜎1:λ)"-                       ]--      it "writes what every morphing a dataization ran came to" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withLambdasOf (T.pack "- λ: L_make\n  𝑛: ⟦ φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ ) ⟧\n") $ \makes ->-            withStdin "⟦ bytes ↦ ⟦ φ ↦ ∅ ⟧, make ↦ ⟦ λ ⤍ L_make ⟧, foo ↦ ⟦ φ ↦ Φ.make ⟧, e ↦ Φ.foo ⟧" $-              testCLISucceeded ["dataize", "--symbolic=" ++ makes, "--locator=Q.e", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          lines records-            `shouldBe` [ "𝔻(Φ.e):"-                       , "  𝕄(Φ.e):"-                       , "    remembered 𝑛·0·1 ≡ Φ.foo  # Φ.make:φ"-                       , "    morphed 𝑛·0·2 := 𝑛·0·1"-                       , "  boxed 𝑛·0·3 := 𝑛·0·2.φ"-                       , "  normalized 𝑛·0·4 := Φ.make  # 𝑛·0·3"-                       , "  𝕄(𝑛·0·3):"-                       , "    remembered 𝑛·0·5 ≡ Φ.make  # L_make:λ"-                       , "    morphed 𝑛·0·6 := 𝑛·0·5"-                       , "  𝔼(L_make):  # 𝔻(𝑛·0·3)"-                       , "    𝑛·1·1 := Φ.bytes( φ ↦ 𝜎1:λ ):φ  # 𝑛 of L_make"-                       , "    𝕄(𝑛·1·1):"-                       , "      morphed 𝑛·1·2 := Φ.bytes( φ ↦ 𝜎1:λ ):φ"-                       , "    𝑛·1·3 := 𝑛·1·2  # 𝕄(𝑛·1·1)"-                       , "    remembered 𝑛·1·3 ≡ 𝑛·0·5"-                       , "    evaluated 𝑛·1·4 := 𝑛·1·3  # 𝑛·0·5"-                       , "  boxed 𝑛·0·7 := 𝑛·1·4.φ"-                       , "  normalized 𝑛·0·8 := Φ.bytes( φ ↦ 𝜎1:λ )  # 𝑛·0·7"-                       , "  𝕄(𝑛·0·7):"-                       , "    normalized 𝑛·0·9 := ∅:φ  # Φ.bytes"-                       , "    𝑛·0·10 := Φ.bytes( φ ↦ 𝜎1:λ )"-                       , "    𝑛·0·11 := 𝜎1:λ:φ"-                       , "    morphed 𝑛·0·12 := 𝑛·0·11"-                       , "  boxed 𝑛·0·13 := 𝑛·0·12.φ"-                       , "  normalized 𝑛·0·14 := 𝜎1:λ  # 𝑛·0·13"-                       , "  𝛿·0·1 := 𝔻(𝜎1:λ)"-                       ]--      it "numbers the firings of one entry apart and names the symbol between them" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin chained $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          lines records-            `shouldBe` [ "𝔻(Φ):"-                       , "  boxed 𝑛·0·1 := Φ.φ"-                       , "  normalized 𝑛·0·2 := 5.0.plus( 6.0 ).plus( 7.0 )  # Φ.φ"-                       , "  𝕄(𝑛·0·1):"-                       , "    normalized 𝑛·0·3 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"-                       , "    𝑛·0·4 := 5.0"-                       , "    𝑛·0·5 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "    normalized 𝑛·0·6 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"-                       , "    𝑛·0·7 := 𝑛·0·4.plus( x ↦ 6.0 )"-                       , "    𝑛·0·8 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"-                       , "    𝔼(L_number_plus):"-                       , "      𝔻(ξ.ρ):"-                       , "        𝕄(ξ.ρ):"-                       , "          𝑛·1·1 := 5.0"-                       , "          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "          morphed 𝑛·1·3 := 𝑛·1·2"-                       , "        boxed 𝑛·1·4 := 𝑛·1·3.φ"-                       , "        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"-                       , "        𝕄(𝑛·1·4):"-                       , "          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes"-                       , "          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"-                       , "          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ"-                       , "          morphed 𝑛·1·9 := 𝑛·1·8"-                       , "        boxed 𝑛·1·10 := 𝑛·1·9.φ"-                       , "        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"-                       , "        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0"-                       , "      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)"-                       , "      𝔻(ξ.x):"-                       , "        𝕄(ξ.x):"-                       , "          𝑛·1·12 := 6.0"-                       , "          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "          morphed 𝑛·1·14 := 𝑛·1·13"-                       , "        boxed 𝑛·1·15 := 𝑛·1·14.φ"-                       , "        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"-                       , "        𝕄(𝑛·1·15):"-                       , "          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"-                       , "          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ"-                       , "          morphed 𝑛·1·19 := 𝑛·1·18"-                       , "        boxed 𝑛·1·20 := 𝑛·1·19.φ"-                       , "        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"-                       , "        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0"-                       , "      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)"-                       , "      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"-                       , "      𝕄(𝑛·1·22):"-                       , "        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )"-                       , "        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"-                       , "        morphed 𝑛·1·25 := 𝑛·1·24"-                       , "      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)"-                       , "      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·8"-                       , "    normalized 𝑛·0·9 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·27.plus"-                       , "    𝑛·0·10 := 𝑛·1·23.plus( x ↦ 7.0 )"-                       , "    𝑛·0·11 := ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"-                       , "    morphed 𝑛·0·12 := 𝑛·0·11"-                       , "  𝔼(L_number_plus):  # 𝔻(𝑛·0·1)"-                       , "    𝔻(ξ.ρ):"-                       , "      𝕄(ξ.ρ):"-                       , "        𝑛·2·1 := Φ.number( φ ↦ 𝜎1:λ )"-                       , "        𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"-                       , "        morphed 𝑛·2·3 := 𝑛·1·26"-                       , "      boxed 𝑛·2·4 := 𝑛·2·3.φ"-                       , "      normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4"-                       , "      𝛿·2·1 := 𝔻(𝜎1:λ)"-                       , "    𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)"-                       , "    𝔻(ξ.x):"-                       , "      𝕄(ξ.x):"-                       , "        𝑛·2·6 := 7.0"-                       , "        𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "        morphed 𝑛·2·8 := 𝑛·2·7"-                       , "      boxed 𝑛·2·9 := 𝑛·2·8.φ"-                       , "      normalized 𝑛·2·10 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·9"-                       , "      𝕄(𝑛·2·9):"-                       , "        𝑛·2·11 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )"-                       , "        𝑛·2·12 := 40-1C-00-00-00-00-00-00:Δ:φ"-                       , "        morphed 𝑛·2·13 := 𝑛·2·12"-                       , "      boxed 𝑛·2·14 := 𝑛·2·13.φ"-                       , "      normalized 𝑛·2·15 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·14"-                       , "      𝛿·2·2 := 40-1C-00-00-00-00-00-00  # 7.0"-                       , "    𝛿2·2 := 𝛿·2·2  # 𝔻(ξ.x)"-                       , "    𝑛·2·16 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus"-                       , "    𝕄(𝑛·2·16):"-                       , "      𝑛·2·17 := Φ.number( φ ↦ 𝜎2:λ )"-                       , "      𝑛·2·18 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧"-                       , "      morphed 𝑛·2·19 := 𝑛·2·18"-                       , "    𝑛·2·20 := 𝑛·2·19  # 𝕄(𝑛·2·16)"-                       , "    evaluated 𝑛·2·21 := 𝑛·2·20  # 𝑛·0·11"-                       , "  boxed 𝑛·0·13 := 𝑛·2·21.φ"-                       , "  normalized 𝑛·0·14 := 𝜎2:λ  # 𝑛·0·13"-                       , "  𝛿·0·1 := 𝔻(𝜎2:λ)"-                       ]--      it "numbers the firings of different entries apart" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin mixed $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          lines records-            `shouldBe` [ "𝔻(Φ):"-                       , "  boxed 𝑛·0·1 := Φ.φ"-                       , "  normalized 𝑛·0·2 := 5.0.plus( 6.0 ).times( 7.0 )  # Φ.φ"-                       , "  𝕄(𝑛·0·1):"-                       , "    normalized 𝑛·0·3 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧  # Φ.number"-                       , "    𝑛·0·4 := 5.0"-                       , "    𝑛·0·5 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"-                       , "    normalized 𝑛·0·6 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"-                       , "    𝑛·0·7 := 𝑛·0·4.plus( x ↦ 6.0 )"-                       , "    𝑛·0·8 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"-                       , "    𝔼(L_number_plus):"-                       , "      𝔻(ξ.ρ):"-                       , "        𝕄(ξ.ρ):"-                       , "          𝑛·1·1 := 5.0"-                       , "          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"-                       , "          morphed 𝑛·1·3 := 𝑛·1·2"-                       , "        boxed 𝑛·1·4 := 𝑛·1·3.φ"-                       , "        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"-                       , "        𝕄(𝑛·1·4):"-                       , "          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes"-                       , "          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"-                       , "          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ"-                       , "          morphed 𝑛·1·9 := 𝑛·1·8"-                       , "        boxed 𝑛·1·10 := 𝑛·1·9.φ"-                       , "        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"-                       , "        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0"-                       , "      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)"-                       , "      𝔻(ξ.x):"-                       , "        𝕄(ξ.x):"-                       , "          𝑛·1·12 := 6.0"-                       , "          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"-                       , "          morphed 𝑛·1·14 := 𝑛·1·13"-                       , "        boxed 𝑛·1·15 := 𝑛·1·14.φ"-                       , "        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"-                       , "        𝕄(𝑛·1·15):"-                       , "          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"-                       , "          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ"-                       , "          morphed 𝑛·1·19 := 𝑛·1·18"-                       , "        boxed 𝑛·1·20 := 𝑛·1·19.φ"-                       , "        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"-                       , "        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0"-                       , "      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)"-                       , "      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"-                       , "      𝕄(𝑛·1·22):"-                       , "        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )"-                       , "        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"-                       , "        morphed 𝑛·1·25 := 𝑛·1·24"-                       , "      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)"-                       , "      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·8"-                       , "    normalized 𝑛·0·9 := ⟦ x ↦ ∅, λ ⤍ L_number_times ⟧  # 𝑛·1·27.times"-                       , "    𝑛·0·10 := 𝑛·1·23.times( x ↦ 7.0 )"-                       , "    𝑛·0·11 := ⟦ x ↦ 7.0, λ ⤍ L_number_times ⟧"-                       , "    morphed 𝑛·0·12 := 𝑛·0·11"-                       , "  𝔼(L_number_times):  # 𝔻(𝑛·0·1)"-                       , "    𝔻(ξ.ρ):"-                       , "      𝕄(ξ.ρ):"-                       , "        𝑛·2·1 := Φ.number( φ ↦ 𝜎1:λ )"-                       , "        𝑛·2·2 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"-                       , "        morphed 𝑛·2·3 := 𝑛·1·26"-                       , "      boxed 𝑛·2·4 := 𝑛·2·3.φ"-                       , "      normalized 𝑛·2·5 := 𝜎1:λ  # 𝑛·2·4"-                       , "      𝛿·2·1 := 𝔻(𝜎1:λ)"-                       , "    𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)"-                       , "    𝔻(ξ.x):"-                       , "      𝕄(ξ.x):"-                       , "        𝑛·2·6 := 7.0"-                       , "        𝑛·2·7 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"-                       , "        morphed 𝑛·2·8 := 𝑛·2·7"-                       , "      boxed 𝑛·2·9 := 𝑛·2·8.φ"-                       , "      normalized 𝑛·2·10 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·9"-                       , "      𝕄(𝑛·2·9):"-                       , "        𝑛·2·11 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )"-                       , "        𝑛·2·12 := 40-1C-00-00-00-00-00-00:Δ:φ"-                       , "        morphed 𝑛·2·13 := 𝑛·2·12"-                       , "      boxed 𝑛·2·14 := 𝑛·2·13.φ"-                       , "      normalized 𝑛·2·15 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·14"-                       , "      𝛿·2·2 := 40-1C-00-00-00-00-00-00  # 7.0"-                       , "    𝛿2·2 := 𝛿·2·2  # 𝔻(ξ.x)"-                       , "    𝑛·2·16 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_times"-                       , "    𝕄(𝑛·2·16):"-                       , "      𝑛·2·17 := Φ.number( φ ↦ 𝜎2:λ )"-                       , "      𝑛·2·18 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"-                       , "      morphed 𝑛·2·19 := 𝑛·2·18"-                       , "    𝑛·2·20 := 𝑛·2·19  # 𝕄(𝑛·2·16)"-                       , "    evaluated 𝑛·2·21 := 𝑛·2·20  # 𝑛·0·11"-                       , "  boxed 𝑛·0·13 := 𝑛·2·21.φ"-                       , "  normalized 𝑛·0·14 := 𝜎2:λ  # 𝑛·0·13"-                       , "  𝛿·0·1 := 𝔻(𝜎2:λ)"-                       ]--      it "nests the firing an operand of another firing brought down" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin nested $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          lines records-            `shouldBe` [ "𝔻(Φ):"-                       , "  boxed 𝑛·0·1 := Φ.φ"-                       , "  normalized 𝑛·0·2 := 5.0.plus( 6.0.plus( 7.0 ) )  # Φ.φ"-                       , "  𝕄(𝑛·0·1):"-                       , "    normalized 𝑛·0·3 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"-                       , "    𝑛·0·4 := 5.0"-                       , "    𝑛·0·5 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "    normalized 𝑛·0·6 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"-                       , "    shared 𝑛·1 := 6.0.plus( 7.0 )"-                       , "    𝑛·0·7 := 𝑛·0·4.plus( x ↦ 𝑛·1 )"-                       , "    𝑛·0·8 := ⟦ x ↦ 𝑛·1, λ ⤍ L_number_plus ⟧"-                       , "    morphed 𝑛·0·9 := 𝑛·0·8"-                       , "  𝔼(L_number_plus):  # 𝔻(𝑛·0·1)"-                       , "    𝔻(ξ.ρ):"-                       , "      𝕄(ξ.ρ):"-                       , "        𝑛·1·1 := 5.0"-                       , "        𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "        morphed 𝑛·1·3 := 𝑛·1·2"-                       , "      boxed 𝑛·1·4 := 𝑛·1·3.φ"-                       , "      normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"-                       , "      𝕄(𝑛·1·4):"-                       , "        normalized 𝑛·1·6 := ∅:φ  # Φ.bytes"-                       , "        𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"-                       , "        𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ"-                       , "        morphed 𝑛·1·9 := 𝑛·1·8"-                       , "      boxed 𝑛·1·10 := 𝑛·1·9.φ"-                       , "      normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"-                       , "      𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0"-                       , "    𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)"-                       , "    𝔻(ξ.x):"-                       , "      𝕄(ξ.x):"-                       , "        𝑛·1·12 := 6.0"-                       , "        𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "        normalized 𝑛·1·14 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·13.plus"-                       , "        𝑛·1·15 := 𝑛·1·12.plus( x ↦ 7.0 )"-                       , "        𝑛·1·16 := ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"-                       , "        morphed 𝑛·1·17 := 𝑛·1·16"-                       , "      𝔼(L_number_plus):"-                       , "        𝔻(ξ.ρ):"-                       , "          𝕄(ξ.ρ):"-                       , "            𝑛·2·1 := 6.0"-                       , "            𝑛·2·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "            morphed 𝑛·2·3 := 𝑛·2·2"-                       , "          boxed 𝑛·2·4 := 𝑛·2·3.φ"-                       , "          normalized 𝑛·2·5 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·2·4"-                       , "          𝕄(𝑛·2·4):"-                       , "            𝑛·2·6 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"-                       , "            𝑛·2·7 := 40-18-00-00-00-00-00-00:Δ:φ"-                       , "            morphed 𝑛·2·8 := 𝑛·2·7"-                       , "          boxed 𝑛·2·9 := 𝑛·2·8.φ"-                       , "          normalized 𝑛·2·10 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·2·9"-                       , "          𝛿·2·1 := 40-18-00-00-00-00-00-00  # 6.0"-                       , "        𝛿1·2 := 𝛿·2·1  # 𝔻(ξ.ρ)"-                       , "        𝔻(ξ.x):"-                       , "          𝕄(ξ.x):"-                       , "            𝑛·2·11 := 7.0"-                       , "            𝑛·2·12 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                       , "            morphed 𝑛·2·13 := 𝑛·2·12"-                       , "          boxed 𝑛·2·14 := 𝑛·2·13.φ"-                       , "          normalized 𝑛·2·15 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·14"-                       , "          𝕄(𝑛·2·14):"-                       , "            𝑛·2·16 := Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )"-                       , "            𝑛·2·17 := 40-1C-00-00-00-00-00-00:Δ:φ"-                       , "            morphed 𝑛·2·18 := 𝑛·2·17"-                       , "          boxed 𝑛·2·19 := 𝑛·2·18.φ"-                       , "          normalized 𝑛·2·20 := 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·19"-                       , "          𝛿·2·2 := 40-1C-00-00-00-00-00-00  # 7.0"-                       , "        𝛿2·2 := 𝛿·2·2  # 𝔻(ξ.x)"-                       , "        𝑛·2·21 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"-                       , "        𝕄(𝑛·2·21):"-                       , "          𝑛·2·22 := Φ.number( φ ↦ 𝜎1:λ )"-                       , "          𝑛·2·23 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"-                       , "          morphed 𝑛·2·24 := 𝑛·2·23"-                       , "        𝑛·2·25 := 𝑛·2·24  # 𝕄(𝑛·2·21)"-                       , "        evaluated 𝑛·2·26 := 𝑛·2·25  # 𝑛·1·16"-                       , "      boxed 𝑛·1·18 := 𝑛·2·26.φ"-                       , "      normalized 𝑛·1·19 := 𝜎1:λ  # 𝑛·1·18"-                       , "      𝛿·1·2 := 𝔻(𝜎1:λ)"-                       , "    𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)"-                       , "    𝑛·1·20 := Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus"-                       , "    𝕄(𝑛·1·20):"-                       , "      𝑛·1·21 := Φ.number( φ ↦ 𝜎2:λ )"-                       , "      𝑛·1·22 := ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧"-                       , "      morphed 𝑛·1·23 := 𝑛·1·22"-                       , "    𝑛·1·24 := 𝑛·1·23  # 𝕄(𝑛·1·20)"-                       , "    evaluated 𝑛·1·25 := 𝑛·1·24  # 𝑛·0·8"-                       , "  boxed 𝑛·0·10 := 𝑛·1·25.φ"-                       , "  normalized 𝑛·0·11 := 𝜎2:λ  # 𝑛·0·10"-                       , "  𝛿·0·1 := 𝔻(𝜎2:λ)"-                       ]--      it "writes a stuck firing to the XML protocol" $-        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withLambdasOf (T.pack "- λ: L_outer\n  dataize:\n    𝛿1: ξ.arg\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \outer ->-            withStdin "⟦ x ↦ ⟦ arg ↦ ⟦ λ ⤍ L_absent ⟧, λ ⤍ L_outer ⟧.φ ⟧" $-              testCLISucceeded ["morph", "--symbolic=" ++ outer, "--locator=Q.x", "--partial", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          lines records `shouldContain` ["    <stuck λ=\"L_absent\"/>"]--      it "writes a starved step budget to the XML protocol" $-        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withLambdasOf (T.pack "- λ: L_outer\n  dataize:\n    𝛿1: ξ.arg\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \outer ->-            withStdin "⟦ x ↦ ⟦ arg ↦ ⟦ φ ↦ ⟦ φ ↦ ⟦ Δ ⤍ 07- ⟧ ⟧ ⟧, λ ⤍ L_outer ⟧ ⟧" $-              testCLISucceeded ["dataize", "--symbolic=" ++ outer, "--locator=Q.x", "--partial", "--max-steps=3", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho", "--flat"] []-          records <- readProtocol path-          lines records `shouldContain` ["      <starved limit=\"3\" by=\"dataize\" at=\"𝑛·1·3\"/>"]--      forM_-        [("XMLXXXXXX.xml", "<exceeded limit=\"7\" by=\"dataize\" at="), ("textXXXXXX.txt", "exceeded 7  # 𝔻(")]-        $ \(template, record) ->-          it ("writes the reached --max-cycles to the protocol " ++ template) $-            withTempFile template $ \(path, stream) -> do-              hClose stream-              withStdin "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( 𝜎1:λ ) ⟧" $-                testCLISucceeded ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-cycles=7", "--partial", "--locator=Q.x", recording path, "--quiet", "--sweet", "--hide-rho"] []-              records <- readProtocol path-              any (isPrefixOf record . dropWhile (== ' ')) (lines records) `shouldBe` True--      forM_-        [("XMLXXXXXX.xml", "<oversized limit=\"60\" by=\"morph\" at="), ("textXXXXXX.txt", "oversized 60")]-        $ \(template, record) ->-          it ("writes the reached --max-nodes to the protocol " ++ template) $-            withTempFile template $ \(path, stream) -> do-              hClose stream-              withStdin "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( 𝜎1:λ ) ⟧" $-                testCLISucceeded ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-nodes=60", "--partial", "--locator=Q.x", recording path, "--quiet", "--sweet", "--hide-rho"] []-              records <- readProtocol path-              any (isPrefixOf record . dropWhile (== ' ')) (lines records) `shouldBe` True--      forM_-        [("XMLXXXXXX.xml", "<blown limit=\"1K\" by="), ("textXXXXXX.txt", "blown 1K")]-        $ \(template, record) ->-          it ("writes the reached --max-memory to the protocol " ++ template) $-            withTempFile template $ \(path, stream) -> do-              hClose stream-              withStdin "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( 𝜎1:λ ) ⟧" $-                testCLISucceeded ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-memory=1K", "--partial", "--locator=Q.x", recording path, "--quiet", "--sweet", "--hide-rho"] []-              records <- readProtocol path-              any (isPrefixOf record . dropWhile (== ' ')) (lines records) `shouldBe` True--      forM_-        [("XMLXXXXXX.xml", "<spent limit=\"5\" by="), ("textXXXXXX.txt", "  spent 5")]-        ( \(template, record) ->-            it ("writes a spent firing budget to the protocol as " ++ record) $-              withTempFile template $ \(path, stream) -> do-                hClose stream-                loopingLambdas $ \endless ->-                  withStdin "⟦ @ ↦ ⟦ λ ⤍ L_loop ⟧ ⟧" $-                    testCLIFailed ["dataize", "--symbolic=" ++ endless, "--max-steps=400", "--max-firings=5", recording path] ["--max-firings=5"]-                records <- readProtocol path-                any (record `isInfixOf`) (lines records) `shouldBe` True-        )--      it "keeps the lines of a run that fails" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]], nope -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> 5.plus(6).nope ]]" $-            testCLIFailed-              ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]-              ["No entry of --symbolic answers the λ function 'L_number_nope'"]-          records <- readProtocol path-          lines records-            `shouldBe` [ "𝔻(Φ):"-                       , "  boxed 𝑛·0·1 := Φ.φ"-                       , "  normalized 𝑛·0·2 := 5.0.plus( 6.0 ).nope  # Φ.φ"-                       , "  𝕄(𝑛·0·1):"-                       , "    normalized 𝑛·0·3 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧  # Φ.number"-                       , "    𝑛·0·4 := 5.0"-                       , "    𝑛·0·5 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧"-                       , "    normalized 𝑛·0·6 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"-                       , "    𝑛·0·7 := 𝑛·0·4.plus( x ↦ 6.0 )"-                       , "    𝑛·0·8 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"-                       , "    𝔼(L_number_plus):"-                       , "      𝔻(ξ.ρ):"-                       , "        𝕄(ξ.ρ):"-                       , "          𝑛·1·1 := 5.0"-                       , "          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧"-                       , "          morphed 𝑛·1·3 := 𝑛·1·2"-                       , "        boxed 𝑛·1·4 := 𝑛·1·3.φ"-                       , "        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"-                       , "        𝕄(𝑛·1·4):"-                       , "          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes"-                       , "          𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"-                       , "          𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ"-                       , "          morphed 𝑛·1·9 := 𝑛·1·8"-                       , "        boxed 𝑛·1·10 := 𝑛·1·9.φ"-                       , "        normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"-                       , "        𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0"-                       , "      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)"-                       , "      𝔻(ξ.x):"-                       , "        𝕄(ξ.x):"-                       , "          𝑛·1·12 := 6.0"-                       , "          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧"-                       , "          morphed 𝑛·1·14 := 𝑛·1·13"-                       , "        boxed 𝑛·1·15 := 𝑛·1·14.φ"-                       , "        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"-                       , "        𝕄(𝑛·1·15):"-                       , "          𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"-                       , "          𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ"-                       , "          morphed 𝑛·1·19 := 𝑛·1·18"-                       , "        boxed 𝑛·1·20 := 𝑛·1·19.φ"-                       , "        normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"-                       , "        𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0"-                       , "      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)"-                       , "      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"-                       , "      𝕄(𝑛·1·22):"-                       , "        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )"-                       , "        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧"-                       , "        morphed 𝑛·1·25 := 𝑛·1·24"-                       , "      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)"-                       , "      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·8"-                       , "    normalized 𝑛·0·9 := L_number_nope:λ  # 𝑛·1·27.nope"-                       , "    morphed 𝑛·0·10 := L_number_nope:λ"-                       , "  unanswered L_number_nope  # 𝔻(L_number_nope:λ)"-                       ]--      it "truncates the lines left over from the previous run" $-        withTempFileContent "protocolXXXXXX.txt" "𝔼(L_number_gt)\n" $ \path -> do-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []-          records <- readProtocol path-          records `shouldBe` "𝔻(Φ):\n  𝛿·0·1 := 01-\n"--      it "writes the lines in 𝜑 even with --output=xmir" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin sum' $-            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--output=xmir", "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          records `shouldEndWith` "    𝕄(𝑛·1·22):\n      𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )\n      𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧\n      morphed 𝑛·1·25 := 𝑛·1·24\n    𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)\n    evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·8\n  boxed 𝑛·0·10 := 𝑛·1·27.φ\n  normalized 𝑛·0·11 := 𝜎1:λ  # 𝑛·0·10\n  𝛿·0·1 := 𝔻(𝜎1:λ)\n"--      it "numbers every step in the text as the XML of the same run numbers it" $-        withTempFile "protocolXXXXXX.txt" $ \(text, one) ->-          withTempFile "protocolXXXXXX.xml" $ \(xml, two) -> do-            hClose one-            hClose two-            withStdin nested $-              testCLISucceeded ["dataize", symbolic, "--minutes=" ++ text, "--quiet", "--sweet", "--hide-rho"] []-            withStdin nested $-              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ xml, "--quiet", "--sweet", "--hide-rho"] []-            lined <- readProtocol text-            marked <- readProtocol xml-            [meta | meta : ":=" : _ <- map (dropWhile (`elem` ["boxed", "morphed", "normalized", "fabricated", "evaluated", "shared"]) . words) (lines lined), "𝑛·" `isPrefixOf` meta]-              `shouldBe` [takeWhile (/= '"') (drop 6 token) | token <- words marked, "meta=\"𝑛·" `isPrefixOf` token]--      describe "as XML" $ do-        it "writes the document when the file is named .xml" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin sum' $-              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<dataize at=\"Φ\">"-                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"-                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "  <applied meta=\"𝑒·0·5\" of=\"𝑒·0·2.plus\"><meta attr=\"α0\">𝑒·0·4</meta><ref attr=\"ρ\">Φ</ref></applied>"-                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·5</normalized>"-                         , "  <morph at=\"𝑛·0·1\">"-                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"-                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.plus\">𝑛·0·4.plus</normalized>"-                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑒·0·4</meta></applied>"-                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑒·0·4</meta></formed>"-                         , "    <morphed meta=\"𝑛·0·9\">𝑛·0·8</morphed>"-                         , "  </morph>"-                         , "  <evaluate λ=\"L_number_plus\" by=\"dataize\" at=\"𝑛·0·1\">"-                         , "    <dataize at=\"ξ.ρ\">"-                         , "      <morph at=\"ξ.ρ\">"-                         , "        <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "        <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "        <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"-                         , "      <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"-                         , "      <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"-                         , "      <morph at=\"𝑛·1·4\">"-                         , "        <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"-                         , "        <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"-                         , "        <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></formed>"-                         , "        <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"-                         , "      <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-14-00-00-00-00-00-00</normalized>"-                         , "      <dataized meta=\"𝛿·1·1\" number=\"5.0\">40-14-00-00-00-00-00-00</dataized>"-                         , "    </dataize>"-                         , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"-                         , "    <dataize at=\"ξ.x\">"-                         , "      <morph at=\"ξ.x\">"-                         , "        <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "        <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"-                         , "        <morphed meta=\"𝑛·1·14\">𝑛·1·13</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·1·15\">𝑛·1·14.φ</boxed>"-                         , "      <applied meta=\"𝑒·1·2\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·1·12</meta></applied>"-                         , "      <normalized meta=\"𝑛·1·16\" of=\"𝑛·1·15\">𝑒·1·2</normalized>"-                         , "      <morph at=\"𝑛·1·15\">"-                         , "        <applied meta=\"𝑛·1·17\" by=\"morph\" at=\"𝑛·1·15\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"-                         , "        <formed meta=\"𝑛·1·18\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></formed>"-                         , "        <morphed meta=\"𝑛·1·19\">𝑛·1·18</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·1·20\">𝑛·1·19.φ</boxed>"-                         , "      <normalized meta=\"𝑛·1·21\" of=\"𝑛·1·20\">40-18-00-00-00-00-00-00</normalized>"-                         , "      <dataized meta=\"𝛿·1·2\" number=\"6.0\">40-18-00-00-00-00-00-00</dataized>"-                         , "    </dataize>"-                         , "    <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"-                         , "    <minted symbol=\"𝜎1\">40-14-00-00-00-00-00-00 40-18-00-00-00-00-00-00</minted>"-                         , "    <applied meta=\"𝑒·1·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "    <built meta=\"𝑛·1·22\">𝑒·1·3</built>"-                         , "    <morph at=\"𝑛·1·22\">"-                         , "      <applied meta=\"𝑛·1·23\" by=\"morph\" at=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "      <formed meta=\"𝑛·1·24\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"-                         , "      <morphed meta=\"𝑛·1·25\">𝑛·1·24</morphed>"-                         , "    </morph>"-                         , "    <answered meta=\"𝑛·1·26\">𝑛·1·25</answered>"-                         , "    <evaluated meta=\"𝑛·1·27\" of=\"𝑛·0·8\">𝑛·1·26</evaluated>"-                         , "  </evaluate>"-                         , "  <boxed meta=\"𝑛·0·10\">𝑛·1·27.φ</boxed>"-                         , "  <normalized meta=\"𝑛·0·11\" of=\"𝑛·0·10\">𝜎1</normalized>"-                         , "  <manufactured meta=\"𝛿·0·1\">𝜎1</manufactured>"-                         , "</dataize>"-                         ]--        it "nests the judgment right inside the '<protocol>' root" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ D> 01- ]]" $-              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []-            records <- readUtf8 path-            take 2 (dropWhile (not . isPrefixOf "  <dataize ") (lines records))-              `shouldBe` [ "  <dataize at=\"Φ\">"-                         , "    <dataized meta=\"𝛿·0·1\">01-</dataized>"-                         ]--        it "opens the '<protocol>' root right under the declaration" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ D> 01- ]]" $-              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []-            records <- readUtf8 path-            take 2 (lines records) `shouldBe` ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<protocol>"]--        it "closes the '<protocol>' root with its msec" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ D> 01- ]]" $-              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []-            records <- readUtf8 path-            (reverse (lines records) !! 3) `shouldSatisfy` isPrefixOf "  <msec>"--        it "closes the '<protocol>' root with its firings" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ D> 01- ]]" $-              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []-            records <- readUtf8 path-            lines records `shouldContain` ["  <firings>0</firings>"]--        it "closes the '<protocol>' root with its fps, then '</protocol>' itself" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ D> 01- ]]" $-              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []-            records <- readUtf8 path-            reverse (take 2 (reverse (lines records))) `shouldBe` ["  <fps>0</fps>", "</protocol>"]--        it "nests what a φ body dataizes inside the element of the box rule that entered it" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin sum' $-              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-            records <- readProtocol path-            filter (\line -> not (any (`isInfixOf` line) ["<applied ", "<formed ", "<morph ", "<morphed ", "<normalized ", "</morph>"])) (lines records)-              `shouldContain` [ "    <dataize at=\"ξ.ρ\">"-                              , "      <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"-                              , "      <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"-                              , "      <dataized meta=\"𝛿·1·1\" number=\"5.0\">40-14-00-00-00-00-00-00</dataized>"-                              , "    </dataize>"-                              ]--        it "closes the document even when nothing fires" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ D> 01- ]]" $-              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<dataize at=\"Φ\">"-                         , "  <dataized meta=\"𝛿·0·1\">01-</dataized>"-                         , "</dataize>"-                         ]--        it "tells a manufactured datum from data by the name of the element" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin chained $-              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<dataize at=\"Φ\">"-                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"-                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "  <applied meta=\"𝑒·0·5\" of=\"𝑒·0·2.plus\"><meta attr=\"α0\">𝑒·0·4</meta></applied>"-                         , "  <applied meta=\"𝑒·0·6\" of=\"Φ.bytes\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·7\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·6</meta></applied>"-                         , "  <applied meta=\"𝑒·0·8\" of=\"𝑒·0·5.plus\"><meta attr=\"α0\">𝑒·0·7</meta><ref attr=\"ρ\">Φ</ref></applied>"-                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·8</normalized>"-                         , "  <morph at=\"𝑛·0·1\">"-                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"-                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.plus\">𝑛·0·4.plus</normalized>"-                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑒·0·4</meta></applied>"-                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑒·0·4</meta></formed>"-                         , "    <evaluate λ=\"L_number_plus\" by=\"morph\" at=\"𝑛·0·1\">"-                         , "      <dataize at=\"ξ.ρ\">"-                         , "        <morph at=\"ξ.ρ\">"-                         , "          <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "          <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "          <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"-                         , "        <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"-                         , "        <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"-                         , "        <morph at=\"𝑛·1·4\">"-                         , "          <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"-                         , "          <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"-                         , "          <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></formed>"-                         , "          <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"-                         , "        <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-14-00-00-00-00-00-00</normalized>"-                         , "        <dataized meta=\"𝛿·1·1\" number=\"5.0\">40-14-00-00-00-00-00-00</dataized>"-                         , "      </dataize>"-                         , "      <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"-                         , "      <dataize at=\"ξ.x\">"-                         , "        <morph at=\"ξ.x\">"-                         , "          <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "          <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"-                         , "          <morphed meta=\"𝑛·1·14\">𝑛·1·13</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·15\">𝑛·1·14.φ</boxed>"-                         , "        <applied meta=\"𝑒·1·2\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·1·12</meta></applied>"-                         , "        <normalized meta=\"𝑛·1·16\" of=\"𝑛·1·15\">𝑒·1·2</normalized>"-                         , "        <morph at=\"𝑛·1·15\">"-                         , "          <applied meta=\"𝑛·1·17\" by=\"morph\" at=\"𝑛·1·15\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"-                         , "          <formed meta=\"𝑛·1·18\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></formed>"-                         , "          <morphed meta=\"𝑛·1·19\">𝑛·1·18</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·20\">𝑛·1·19.φ</boxed>"-                         , "        <normalized meta=\"𝑛·1·21\" of=\"𝑛·1·20\">40-18-00-00-00-00-00-00</normalized>"-                         , "        <dataized meta=\"𝛿·1·2\" number=\"6.0\">40-18-00-00-00-00-00-00</dataized>"-                         , "      </dataize>"-                         , "      <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"-                         , "      <minted symbol=\"𝜎1\">40-14-00-00-00-00-00-00 40-18-00-00-00-00-00-00</minted>"-                         , "      <applied meta=\"𝑒·1·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "      <built meta=\"𝑛·1·22\">𝑒·1·3</built>"-                         , "      <morph at=\"𝑛·1·22\">"-                         , "        <applied meta=\"𝑛·1·23\" by=\"morph\" at=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "        <formed meta=\"𝑛·1·24\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"-                         , "        <morphed meta=\"𝑛·1·25\">𝑛·1·24</morphed>"-                         , "      </morph>"-                         , "      <answered meta=\"𝑛·1·26\">𝑛·1·25</answered>"-                         , "      <evaluated meta=\"𝑛·1·27\" of=\"𝑛·0·8\">𝑛·1·26</evaluated>"-                         , "    </evaluate>"-                         , "    <normalized meta=\"𝑛·0·9\" of=\"𝑛·1·27.plus\">𝑛·1·23.plus</normalized>"-                         , "    <applied meta=\"𝑛·0·10\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·1·23.plus\"><meta attr=\"x\">𝑒·0·7</meta></applied>"-                         , "    <formed meta=\"𝑛·0·11\" of=\"𝑛·1·23.plus\"><meta attr=\"x\">𝑒·0·7</meta></formed>"-                         , "    <morphed meta=\"𝑛·0·12\">𝑛·0·11</morphed>"-                         , "  </morph>"-                         , "  <evaluate λ=\"L_number_plus\" by=\"dataize\" at=\"𝑛·0·1\">"-                         , "    <dataize at=\"ξ.ρ\">"-                         , "      <morph at=\"ξ.ρ\">"-                         , "        <applied meta=\"𝑛·2·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "        <formed meta=\"𝑛·2·2\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"-                         , "        <morphed meta=\"𝑛·2·3\">𝑛·2·2</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·2·4\">𝑛·2·3.φ</boxed>"-                         , "      <normalized meta=\"𝑛·2·5\" of=\"𝑛·2·4\">𝜎1</normalized>"-                         , "      <manufactured meta=\"𝛿·2·1\">𝜎1</manufactured>"-                         , "    </dataize>"-                         , "    <bound meta=\"𝛿1·2\">𝛿·2·1</bound>"-                         , "    <dataize at=\"ξ.x\">"-                         , "      <morph at=\"ξ.x\">"-                         , "        <applied meta=\"𝑛·2·6\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·6</meta></applied>"-                         , "        <formed meta=\"𝑛·2·7\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·6</meta></formed>"-                         , "        <morphed meta=\"𝑛·2·8\">𝑛·2·7</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·2·9\">𝑛·2·8.φ</boxed>"-                         , "      <applied meta=\"𝑒·2·1\" of=\"𝑒·0·6\"><meta attr=\"ρ\">𝑛·2·6</meta></applied>"-                         , "      <normalized meta=\"𝑛·2·10\" of=\"𝑛·2·9\">𝑒·2·1</normalized>"-                         , "      <morph at=\"𝑛·2·9\">"-                         , "        <applied meta=\"𝑛·2·11\" by=\"morph\" at=\"𝑛·2·9\" of=\"Φ.bytes\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></applied>"-                         , "        <formed meta=\"𝑛·2·12\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></formed>"-                         , "        <morphed meta=\"𝑛·2·13\">𝑛·2·12</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·2·14\">𝑛·2·13.φ</boxed>"-                         , "      <normalized meta=\"𝑛·2·15\" of=\"𝑛·2·14\">40-1C-00-00-00-00-00-00</normalized>"-                         , "      <dataized meta=\"𝛿·2·2\" number=\"7.0\">40-1C-00-00-00-00-00-00</dataized>"-                         , "    </dataize>"-                         , "    <bound meta=\"𝛿2·2\">𝛿·2·2</bound>"-                         , "    <minted symbol=\"𝜎2\">𝜎1 40-1C-00-00-00-00-00-00</minted>"-                         , "    <applied meta=\"𝑒·2·2\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></applied>"-                         , "    <built meta=\"𝑛·2·16\">𝑒·2·2</built>"-                         , "    <morph at=\"𝑛·2·16\">"-                         , "      <applied meta=\"𝑛·2·17\" by=\"morph\" at=\"𝑛·2·16\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></applied>"-                         , "      <formed meta=\"𝑛·2·18\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></formed>"-                         , "      <morphed meta=\"𝑛·2·19\">𝑛·2·18</morphed>"-                         , "    </morph>"-                         , "    <answered meta=\"𝑛·2·20\">𝑛·2·19</answered>"-                         , "    <evaluated meta=\"𝑛·2·21\" of=\"𝑛·0·11\">𝑛·2·20</evaluated>"-                         , "  </evaluate>"-                         , "  <boxed meta=\"𝑛·0·13\">𝑛·2·21.φ</boxed>"-                         , "  <normalized meta=\"𝑛·0·14\" of=\"𝑛·0·13\">𝜎2</normalized>"-                         , "  <manufactured meta=\"𝛿·0·1\">𝜎2</manufactured>"-                         , "</dataize>"-                         ]--        it "writes a firing whose two sides do not join as diverged, naming both sides" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withLambdasOf (T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.c\n  join:\n    on: 𝛿1\n    left: $.a\n    right: $.b\n") $ \joins ->-              withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ ⟦ Δ ⤍ 01- ⟧ ⟧, b ↦ ⟦ φ ↦ ⟦ Δ ⤍ 02- ⟧ ⟧, λ ⤍ L_fork ⟧.φ ⟧" $-                testCLIFailed ["morph", "--symbolic=" ++ joins, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] ["No entry of --symbolic answers the λ function 'L_fork'"]-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<morph at=\"Φ.y\">"-                         , "  <evaluate λ=\"L_fork\" by=\"morph\" at=\"Φ.y\">"-                         , "    <dataize at=\"ξ.c\">"-                         , "      <manufactured meta=\"𝛿·1·1\">𝜎1</manufactured>"-                         , "    </dataize>"-                         , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"-                         , "    <morph at=\"ξ.a\">"-                         , "      <formed meta=\"𝑒·1·1\"><datum attr=\"φ\">01-</datum></formed>"-                         , "      <morphed meta=\"𝑛·1·1\">𝑒·1·1</morphed>"-                         , "    </morph>"-                         , "    <morph at=\"ξ.b\">"-                         , "      <formed meta=\"𝑒·1·2\"><datum attr=\"φ\">02-</datum></formed>"-                         , "      <morphed meta=\"𝑛·1·2\">𝑒·1·2</morphed>"-                         , "    </morph>"-                         , "    <diverged left=\"𝑛·1·1\" right=\"𝑛·1·2\" at=\".φ.Δ\" reason=\"the join names no otherwise\"><left Δ=\"01-\"/><right Δ=\"02-\"/></diverged>"-                         , "  </evaluate>"-                         , "</morph>"-                         ]--        it "writes the symbol a join minted for two sides that differ only in their symbols as an element of its own" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withLambdasOf (T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.c\n  join:\n    on: 𝛿1\n    left: $.a\n    right: $.b\n") $ \joins ->-              withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, b ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ⟧, λ ⤍ L_fork ⟧.φ ⟧" $-                testCLISucceeded ["morph", "--symbolic=" ++ joins, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<morph at=\"Φ.y\">"-                         , "  <evaluate λ=\"L_fork\" by=\"morph\" at=\"Φ.y\">"-                         , "    <dataize at=\"ξ.c\">"-                         , "      <manufactured meta=\"𝛿·1·1\">𝜎1</manufactured>"-                         , "    </dataize>"-                         , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"-                         , "    <morph at=\"ξ.a\">"-                         , "      <formed meta=\"𝑒·1·1\"><symbol attr=\"φ\">𝜎2</symbol></formed>"-                         , "      <morphed meta=\"𝑛·1·1\">𝑒·1·1</morphed>"-                         , "    </morph>"-                         , "    <morph at=\"ξ.b\">"-                         , "      <formed meta=\"𝑒·1·2\"><symbol attr=\"φ\">𝜎3</symbol></formed>"-                         , "      <morphed meta=\"𝑛·1·2\">𝑒·1·2</morphed>"-                         , "    </morph>"-                         , "    <joined symbol=\"𝜎4\" on=\"𝛿1·1\" left=\"𝜎2\" right=\"𝜎3\"/>"-                         , "    <formed meta=\"𝑒·1·3\"><symbol attr=\"φ\">𝜎4</symbol></formed>"-                         , "    <answered meta=\"𝑛·1·3\">𝑒·1·3</answered>"-                         , "    <formed meta=\"𝑒·1·4\" λ=\"L_fork\"><symbol attr=\"c\">𝜎1</symbol><meta attr=\"a\">𝑛·1·1</meta><meta attr=\"b\">𝑛·1·2</meta></formed>"-                         , "    <evaluated meta=\"𝑛·1·4\" of=\"𝑒·1·4\">𝑛·1·3</evaluated>"-                         , "  </evaluate>"-                         , "  <normalized meta=\"𝑛·0·1\" of=\"𝑛·1·4.φ\">𝜎4</normalized>"-                         , "  <morphed meta=\"𝑛·0·2\">𝜎4</morphed>"-                         , "</morph>"-                         ]--        it "writes one 'minted' element per symbol the answer asked for" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withLambdasOf (T.pack "- λ: L_pair\n  morph:\n    𝑛1: $.x\n  𝑛: ⟦ left ↦ ⟦ λ ⤍ 𝜎 ⟧, right ↦ ⟦ λ ⤍ 𝜎 ⟧ ⟧\n") $ \pairs ->-              withStdin "⟦ y ↦ ⟦ x ↦ ⟦ Δ ⤍ 01- ⟧, λ ⤍ L_pair ⟧.left ⟧" $-                testCLISucceeded ["morph", "--symbolic=" ++ pairs, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<morph at=\"Φ.y\">"-                         , "  <evaluate λ=\"L_pair\" by=\"morph\" at=\"Φ.y\">"-                         , "    <morph at=\"ξ.x\">"-                         , "      <morphed meta=\"𝑛·1·1\">01-</morphed>"-                         , "    </morph>"-                         , "    <bound meta=\"𝑛1·1\">01-</bound>"-                         , "    <minted symbol=\"𝜎1\"/>"-                         , "    <minted symbol=\"𝜎2\"/>"-                         , "    <formed meta=\"𝑒·1·1\"><symbol attr=\"left\">𝜎1</symbol><symbol attr=\"right\">𝜎2</symbol></formed>"-                         , "    <built meta=\"𝑛·1·2\">𝑒·1·1</built>"-                         , "    <morph at=\"𝑛·1·2\">"-                         , "      <morphed meta=\"𝑛·1·3\">𝑒·1·1</morphed>"-                         , "    </morph>"-                         , "    <answered meta=\"𝑛·1·4\">𝑛·1·3</answered>"-                         , "    <formed meta=\"𝑒·1·2\" λ=\"L_pair\"><datum attr=\"x\">01-</datum></formed>"-                         , "    <evaluated meta=\"𝑛·1·5\" of=\"𝑒·1·2\">𝑛·1·4</evaluated>"-                         , "  </evaluate>"-                         , "  <normalized meta=\"𝑛·0·1\" of=\"𝑛·1·5.left\">𝜎1</normalized>"-                         , "  <morphed meta=\"𝑛·0·2\">𝜎1</morphed>"-                         , "</morph>"-                         ]--        it "writes no 'minted' element for a firing minting nothing" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withLambdasOf (T.pack "- λ: L_keep\n  morph:\n    𝑛1: $.x\n  𝑛: ⟦ z ↦ 𝑛1 ⟧\n") $ \keeps ->-              withStdin "⟦ y ↦ ⟦ x ↦ ⟦ Δ ⤍ 01- ⟧, λ ⤍ L_keep ⟧.z ⟧" $-                testCLISucceeded ["morph", "--symbolic=" ++ keeps, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<morph at=\"Φ.y\">"-                         , "  <evaluate λ=\"L_keep\" by=\"morph\" at=\"Φ.y\">"-                         , "    <morph at=\"ξ.x\">"-                         , "      <morphed meta=\"𝑛·1·1\">01-</morphed>"-                         , "    </morph>"-                         , "    <bound meta=\"𝑛1·1\">01-</bound>"-                         , "    <formed meta=\"𝑒·1·1\"><datum attr=\"z\">01-</datum></formed>"-                         , "    <built meta=\"𝑛·1·2\">𝑒·1·1</built>"-                         , "    <morph at=\"𝑛·1·2\">"-                         , "      <morphed meta=\"𝑛·1·3\">𝑒·1·1</morphed>"-                         , "    </morph>"-                         , "    <answered meta=\"𝑛·1·4\">𝑛·1·3</answered>"-                         , "    <formed meta=\"𝑒·1·2\" λ=\"L_keep\"><datum attr=\"x\">01-</datum></formed>"-                         , "    <evaluated meta=\"𝑛·1·5\" of=\"𝑒·1·2\">𝑛·1·4</evaluated>"-                         , "  </evaluate>"-                         , "  <normalized meta=\"𝑛·0·1\" of=\"𝑛·1·5.z\">01-</normalized>"-                         , "  <morphed meta=\"𝑛·0·2\">01-</morphed>"-                         , "</morph>"-                         ]--        it "nests a firing an operand took inside the firing that asked" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin nested $-              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<dataize at=\"Φ\">"-                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"-                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "  <applied meta=\"𝑒·0·5\" of=\"Φ.bytes\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·6\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·5</meta></applied>"-                         , "  <applied meta=\"𝑒·0·7\" of=\"𝑒·0·4.plus\"><meta attr=\"α0\">𝑒·0·6</meta></applied>"-                         , "  <applied meta=\"𝑒·0·8\" of=\"𝑒·0·2.plus\"><meta attr=\"α0\">𝑒·0·7</meta><ref attr=\"ρ\">Φ</ref></applied>"-                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·8</normalized>"-                         , "  <morph at=\"𝑛·0·1\">"-                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"-                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.plus\">𝑛·0·4.plus</normalized>"-                         , "    <applied meta=\"𝑒·0·9\" of=\"𝑒·0·4.plus\"><meta attr=\"α0\">𝑒·0·6</meta></applied>"-                         , "    <shared meta=\"𝑛·1\">𝑒·0·9</shared>"-                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑛·1</meta></applied>"-                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑛·1</meta></formed>"-                         , "    <morphed meta=\"𝑛·0·9\">𝑛·0·8</morphed>"-                         , "  </morph>"-                         , "  <evaluate λ=\"L_number_plus\" by=\"dataize\" at=\"𝑛·0·1\">"-                         , "    <dataize at=\"ξ.ρ\">"-                         , "      <morph at=\"ξ.ρ\">"-                         , "        <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "        <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "        <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"-                         , "      <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"-                         , "      <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"-                         , "      <morph at=\"𝑛·1·4\">"-                         , "        <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"-                         , "        <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"-                         , "        <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></formed>"-                         , "        <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"-                         , "      </morph>"-                         , "      <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"-                         , "      <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-14-00-00-00-00-00-00</normalized>"-                         , "      <dataized meta=\"𝛿·1·1\" number=\"5.0\">40-14-00-00-00-00-00-00</dataized>"-                         , "    </dataize>"-                         , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"-                         , "    <dataize at=\"ξ.x\">"-                         , "      <morph at=\"ξ.x\">"-                         , "        <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "        <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"-                         , "        <normalized meta=\"𝑛·1·14\" of=\"𝑛·1·13.plus\">𝑛·1·12.plus</normalized>"-                         , "        <applied meta=\"𝑛·1·15\" by=\"morph\" at=\"ξ.x\" of=\"𝑛·1·12.plus\"><meta attr=\"x\">𝑒·0·6</meta></applied>"-                         , "        <formed meta=\"𝑛·1·16\" of=\"𝑛·1·12.plus\"><meta attr=\"x\">𝑒·0·6</meta></formed>"-                         , "        <morphed meta=\"𝑛·1·17\">𝑛·1·16</morphed>"-                         , "      </morph>"-                         , "      <evaluate λ=\"L_number_plus\" by=\"dataize\" at=\"ξ.x\">"-                         , "        <dataize at=\"ξ.ρ\">"-                         , "          <morph at=\"ξ.ρ\">"-                         , "            <applied meta=\"𝑛·2·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "            <formed meta=\"𝑛·2·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"-                         , "            <morphed meta=\"𝑛·2·3\">𝑛·2·2</morphed>"-                         , "          </morph>"-                         , "          <boxed meta=\"𝑛·2·4\">𝑛·2·3.φ</boxed>"-                         , "          <applied meta=\"𝑒·2·1\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·2·1</meta></applied>"-                         , "          <normalized meta=\"𝑛·2·5\" of=\"𝑛·2·4\">𝑒·2·1</normalized>"-                         , "          <morph at=\"𝑛·2·4\">"-                         , "            <applied meta=\"𝑛·2·6\" by=\"morph\" at=\"𝑛·2·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"-                         , "            <formed meta=\"𝑛·2·7\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></formed>"-                         , "            <morphed meta=\"𝑛·2·8\">𝑛·2·7</morphed>"-                         , "          </morph>"-                         , "          <boxed meta=\"𝑛·2·9\">𝑛·2·8.φ</boxed>"-                         , "          <normalized meta=\"𝑛·2·10\" of=\"𝑛·2·9\">40-18-00-00-00-00-00-00</normalized>"-                         , "          <dataized meta=\"𝛿·2·1\" number=\"6.0\">40-18-00-00-00-00-00-00</dataized>"-                         , "        </dataize>"-                         , "        <bound meta=\"𝛿1·2\">𝛿·2·1</bound>"-                         , "        <dataize at=\"ξ.x\">"-                         , "          <morph at=\"ξ.x\">"-                         , "            <applied meta=\"𝑛·2·11\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·5</meta></applied>"-                         , "            <formed meta=\"𝑛·2·12\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·5</meta></formed>"-                         , "            <morphed meta=\"𝑛·2·13\">𝑛·2·12</morphed>"-                         , "          </morph>"-                         , "          <boxed meta=\"𝑛·2·14\">𝑛·2·13.φ</boxed>"-                         , "          <applied meta=\"𝑒·2·2\" of=\"𝑒·0·5\"><meta attr=\"ρ\">𝑛·2·11</meta></applied>"-                         , "          <normalized meta=\"𝑛·2·15\" of=\"𝑛·2·14\">𝑒·2·2</normalized>"-                         , "          <morph at=\"𝑛·2·14\">"-                         , "            <applied meta=\"𝑛·2·16\" by=\"morph\" at=\"𝑛·2·14\" of=\"Φ.bytes\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></applied>"-                         , "            <formed meta=\"𝑛·2·17\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></formed>"-                         , "            <morphed meta=\"𝑛·2·18\">𝑛·2·17</morphed>"-                         , "          </morph>"-                         , "          <boxed meta=\"𝑛·2·19\">𝑛·2·18.φ</boxed>"-                         , "          <normalized meta=\"𝑛·2·20\" of=\"𝑛·2·19\">40-1C-00-00-00-00-00-00</normalized>"-                         , "          <dataized meta=\"𝛿·2·2\" number=\"7.0\">40-1C-00-00-00-00-00-00</dataized>"-                         , "        </dataize>"-                         , "        <bound meta=\"𝛿2·2\">𝛿·2·2</bound>"-                         , "        <minted symbol=\"𝜎1\">40-18-00-00-00-00-00-00 40-1C-00-00-00-00-00-00</minted>"-                         , "        <applied meta=\"𝑒·2·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "        <built meta=\"𝑛·2·21\">𝑒·2·3</built>"-                         , "        <morph at=\"𝑛·2·21\">"-                         , "          <applied meta=\"𝑛·2·22\" by=\"morph\" at=\"𝑛·2·21\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "          <formed meta=\"𝑛·2·23\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"-                         , "          <morphed meta=\"𝑛·2·24\">𝑛·2·23</morphed>"-                         , "        </morph>"-                         , "        <answered meta=\"𝑛·2·25\">𝑛·2·24</answered>"-                         , "        <evaluated meta=\"𝑛·2·26\" of=\"𝑛·1·16\">𝑛·2·25</evaluated>"-                         , "      </evaluate>"-                         , "      <boxed meta=\"𝑛·1·18\">𝑛·2·26.φ</boxed>"-                         , "      <normalized meta=\"𝑛·1·19\" of=\"𝑛·1·18\">𝜎1</normalized>"-                         , "      <manufactured meta=\"𝛿·1·2\">𝜎1</manufactured>"-                         , "    </dataize>"-                         , "    <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"-                         , "    <minted symbol=\"𝜎2\">40-14-00-00-00-00-00-00 𝜎1</minted>"-                         , "    <applied meta=\"𝑒·1·2\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></applied>"-                         , "    <built meta=\"𝑛·1·20\">𝑒·1·2</built>"-                         , "    <morph at=\"𝑛·1·20\">"-                         , "      <applied meta=\"𝑛·1·21\" by=\"morph\" at=\"𝑛·1·20\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></applied>"-                         , "      <formed meta=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></formed>"-                         , "      <morphed meta=\"𝑛·1·23\">𝑛·1·22</morphed>"-                         , "    </morph>"-                         , "    <answered meta=\"𝑛·1·24\">𝑛·1·23</answered>"-                         , "    <evaluated meta=\"𝑛·1·25\" of=\"𝑛·0·8\">𝑛·1·24</evaluated>"-                         , "  </evaluate>"-                         , "  <boxed meta=\"𝑛·0·10\">𝑛·1·25.φ</boxed>"-                         , "  <normalized meta=\"𝑛·0·11\" of=\"𝑛·0·10\">𝜎2</normalized>"-                         , "  <manufactured meta=\"𝛿·0·1\">𝜎2</manufactured>"-                         , "</dataize>"-                         ]--        it "records a λ function no entry answers as a childless element" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ times(^, x) -> [[ L> L_number_times ]], nope -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> 2.times(3).nope ]]" $-              testCLISucceeded ["dataize", symbolic, "--partial", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<dataize at=\"Φ\">"-                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"-                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "  <applied meta=\"𝑒·0·5\" of=\"𝑒·0·2.times\"><meta attr=\"α0\">𝑒·0·4</meta></applied>"-                         , "  <applied meta=\"𝑒·0·6\" of=\"𝑒·0·5.nope\"><ref attr=\"ρ\">Φ</ref></applied>"-                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·6</normalized>"-                         , "  <morph at=\"𝑛·0·1\">"-                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"-                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.times\">𝑛·0·4.times</normalized>"-                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.times\"><meta attr=\"x\">𝑒·0·4</meta></applied>"-                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.times\"><meta attr=\"x\">𝑒·0·4</meta></formed>"-                         , "    <evaluate λ=\"L_number_times\" by=\"morph\" at=\"𝑛·0·1\">"-                         , "      <dataize at=\"ξ.ρ\">"-                         , "        <morph at=\"ξ.ρ\">"-                         , "          <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "          <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "          <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"-                         , "        <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"-                         , "        <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"-                         , "        <morph at=\"𝑛·1·4\">"-                         , "          <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"-                         , "          <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></applied>"-                         , "          <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></formed>"-                         , "          <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"-                         , "        <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-00-00-00-00-00-00-00</normalized>"-                         , "        <dataized meta=\"𝛿·1·1\" number=\"2.0\">40-00-00-00-00-00-00-00</dataized>"-                         , "      </dataize>"-                         , "      <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"-                         , "      <dataize at=\"ξ.x\">"-                         , "        <morph at=\"ξ.x\">"-                         , "          <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "          <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"-                         , "          <morphed meta=\"𝑛·1·14\">𝑛·1·13</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·15\">𝑛·1·14.φ</boxed>"-                         , "        <applied meta=\"𝑒·1·2\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·1·12</meta></applied>"-                         , "        <normalized meta=\"𝑛·1·16\" of=\"𝑛·1·15\">𝑒·1·2</normalized>"-                         , "        <morph at=\"𝑛·1·15\">"-                         , "          <applied meta=\"𝑛·1·17\" by=\"morph\" at=\"𝑛·1·15\" of=\"Φ.bytes\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></applied>"-                         , "          <formed meta=\"𝑛·1·18\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></formed>"-                         , "          <morphed meta=\"𝑛·1·19\">𝑛·1·18</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·20\">𝑛·1·19.φ</boxed>"-                         , "        <normalized meta=\"𝑛·1·21\" of=\"𝑛·1·20\">40-08-00-00-00-00-00-00</normalized>"-                         , "        <dataized meta=\"𝛿·1·2\" number=\"3.0\">40-08-00-00-00-00-00-00</dataized>"-                         , "      </dataize>"-                         , "      <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"-                         , "      <minted symbol=\"𝜎1\">40-00-00-00-00-00-00-00 40-08-00-00-00-00-00-00</minted>"-                         , "      <applied meta=\"𝑒·1·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "      <built meta=\"𝑛·1·22\">𝑒·1·3</built>"-                         , "      <morph at=\"𝑛·1·22\">"-                         , "        <applied meta=\"𝑛·1·23\" by=\"morph\" at=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "        <formed meta=\"𝑛·1·24\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"-                         , "        <morphed meta=\"𝑛·1·25\">𝑛·1·24</morphed>"-                         , "      </morph>"-                         , "      <answered meta=\"𝑛·1·26\">𝑛·1·25</answered>"-                         , "      <evaluated meta=\"𝑛·1·27\" of=\"𝑛·0·8\">𝑛·1·26</evaluated>"-                         , "    </evaluate>"-                         , "    <normalized meta=\"𝑛·0·9\" of=\"𝑛·1·27.nope\">𝑛·1·23.nope</normalized>"-                         , "    <morphed meta=\"𝑛·0·10\">𝑛·1·23.nope</morphed>"-                         , "  </morph>"-                         , "  <unanswered λ=\"L_number_nope\" by=\"dataize\">𝑛·1·23.nope</unanswered>"-                         , "</dataize>"-                         ]--        it "names the root after the judgment a morphing ran" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ x -> [[ L> L_number_nope ]].foo ]]" $-              testCLISucceeded ["morph", "--locator=Q.x", "--partial", "--protocol=" ++ path, "--quiet"] []-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<morph at=\"Φ.x\">"-                         , "  <formed meta=\"𝑒·0·1\" λ=\"L_number_nope\"/>"-                         , "  <unanswered λ=\"L_number_nope\" by=\"morph\">𝑒·0·1.foo</unanswered>"-                         , "</morph>"-                         ]--        it "closes the document even when the run fails" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ times(^, x) -> [[ L> L_number_times ]], nope -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> 2.times(3).nope ]]" $-              testCLIFailed ["dataize", symbolic, "--protocol=" ++ path] ["No entry of --symbolic answers"]-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<dataize at=\"Φ\">"-                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"-                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></applied>"-                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "  <applied meta=\"𝑒·0·5\" of=\"𝑒·0·2.times\"><meta attr=\"α0\">𝑒·0·4</meta></applied>"-                         , "  <applied meta=\"𝑒·0·6\" of=\"𝑒·0·5.nope\"><ref attr=\"ρ\">Φ</ref></applied>"-                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·6</normalized>"-                         , "  <morph at=\"𝑛·0·1\">"-                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"-                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.times\">𝑛·0·4.times</normalized>"-                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.times\"><meta attr=\"x\">𝑒·0·4</meta></applied>"-                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.times\"><meta attr=\"x\">𝑒·0·4</meta></formed>"-                         , "    <evaluate λ=\"L_number_times\" by=\"morph\" at=\"𝑛·0·1\">"-                         , "      <dataize at=\"ξ.ρ\">"-                         , "        <morph at=\"ξ.ρ\">"-                         , "          <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"-                         , "          <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"-                         , "          <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"-                         , "        <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"-                         , "        <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"-                         , "        <morph at=\"𝑛·1·4\">"-                         , "          <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"-                         , "          <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></applied>"-                         , "          <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></formed>"-                         , "          <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"-                         , "        <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-00-00-00-00-00-00-00</normalized>"-                         , "        <dataized meta=\"𝛿·1·1\" number=\"2.0\">40-00-00-00-00-00-00-00</dataized>"-                         , "      </dataize>"-                         , "      <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"-                         , "      <dataize at=\"ξ.x\">"-                         , "        <morph at=\"ξ.x\">"-                         , "          <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"-                         , "          <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"-                         , "          <morphed meta=\"𝑛·1·14\">𝑛·1·13</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·15\">𝑛·1·14.φ</boxed>"-                         , "        <applied meta=\"𝑒·1·2\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·1·12</meta></applied>"-                         , "        <normalized meta=\"𝑛·1·16\" of=\"𝑛·1·15\">𝑒·1·2</normalized>"-                         , "        <morph at=\"𝑛·1·15\">"-                         , "          <applied meta=\"𝑛·1·17\" by=\"morph\" at=\"𝑛·1·15\" of=\"Φ.bytes\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></applied>"-                         , "          <formed meta=\"𝑛·1·18\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></formed>"-                         , "          <morphed meta=\"𝑛·1·19\">𝑛·1·18</morphed>"-                         , "        </morph>"-                         , "        <boxed meta=\"𝑛·1·20\">𝑛·1·19.φ</boxed>"-                         , "        <normalized meta=\"𝑛·1·21\" of=\"𝑛·1·20\">40-08-00-00-00-00-00-00</normalized>"-                         , "        <dataized meta=\"𝛿·1·2\" number=\"3.0\">40-08-00-00-00-00-00-00</dataized>"-                         , "      </dataize>"-                         , "      <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"-                         , "      <minted symbol=\"𝜎1\">40-00-00-00-00-00-00-00 40-08-00-00-00-00-00-00</minted>"-                         , "      <applied meta=\"𝑒·1·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "      <built meta=\"𝑛·1·22\">𝑒·1·3</built>"-                         , "      <morph at=\"𝑛·1·22\">"-                         , "        <applied meta=\"𝑛·1·23\" by=\"morph\" at=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"-                         , "        <formed meta=\"𝑛·1·24\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"-                         , "        <morphed meta=\"𝑛·1·25\">𝑛·1·24</morphed>"-                         , "      </morph>"-                         , "      <answered meta=\"𝑛·1·26\">𝑛·1·25</answered>"-                         , "      <evaluated meta=\"𝑛·1·27\" of=\"𝑛·0·8\">𝑛·1·26</evaluated>"-                         , "    </evaluate>"-                         , "    <normalized meta=\"𝑛·0·9\" of=\"𝑛·1·27.nope\">𝑛·1·23.nope</normalized>"-                         , "    <morphed meta=\"𝑛·0·10\">𝑛·1·23.nope</morphed>"-                         , "  </morph>"-                         , "  <unanswered λ=\"L_number_nope\" by=\"dataize\">𝑛·1·23.nope</unanswered>"-                         , "</dataize>"-                         ]--        it "writes the terminator as the term a meta was bound to" $-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            withLambdasOf (T.pack "- λ: L_pick\n  morph:\n    𝑛1: ξ.absent\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \picks ->-              withStdin "[[ x -> [[ here -> [[ ]], L> L_pick ]].foo ]]" $-                testCLIFailed ["morph", "--symbolic=" ++ picks, "--locator=Q.x", "--protocol=" ++ path, "--quiet", "--hide-rho"] ["No entry of --symbolic answers the λ function '𝜎1'"]-            records <- readProtocol path-            lines records-              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                         , "<morph at=\"Φ.x\">"-                         , "  <evaluate λ=\"L_pick\" by=\"morph\" at=\"Φ.x\">"-                         , "    <morph at=\"ξ.absent\">"-                         , "      <morphed meta=\"𝑛·1·1\">⊥</morphed>"-                         , "    </morph>"-                         , "    <bound meta=\"𝑛1·1\">⊥</bound>"-                         , "    <minted symbol=\"𝜎1\"/>"-                         , "    <built meta=\"𝑛·1·2\">𝜎1</built>"-                         , "    <morph at=\"𝑛·1·2\">"-                         , "      <morphed meta=\"𝑛·1·3\">𝜎1</morphed>"-                         , "    </morph>"-                         , "    <answered meta=\"𝑛·1·4\">𝜎1</answered>"-                         , "    <formed meta=\"𝑒·1·1\"/>"-                         , "    <formed meta=\"𝑒·1·2\" λ=\"L_pick\"><meta attr=\"here\">𝑒·1·1</meta></formed>"-                         , "    <evaluated meta=\"𝑛·1·5\" of=\"𝑒·1·2\">𝜎1</evaluated>"-                         , "  </evaluate>"-                         , "  <opaque symbol=\"𝜎1\" by=\"morph\">𝜎1.foo</opaque>"-                         , "</morph>"-                         ]--      it "writes XML into a file named .txt" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []-          records <- readUtf8 path-          records `shouldSatisfy` isPrefixOf "<?xml"--    describe "--minutes" $ do-      let sum' = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6) ]]"-      it "writes the indented text into a file named .xml" $-        withTempFile "minutesXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []-          records <- readProtocol path-          records `shouldBe` "𝔻(Φ):\n  𝛿·0·1 := 01-\n"--      it "writes the same text beside --protocol as alone" $-        withTempFile "minutesXXXXXX.txt" $ \(alone, one) ->-          withTempFile "minutesXXXXXX.txt" $ \(beside, two) ->-            withTempFile "protocolXXXXXX.xml" $ \(xml, three) -> do-              mapM_ hClose [one, two, three]-              withStdin sum' $-                testCLISucceeded ["dataize", symbolic, "--minutes=" ++ alone, "--quiet", "--sweet", "--hide-rho"] []-              withStdin sum' $-                testCLISucceeded ["dataize", symbolic, "--protocol=" ++ xml, "--minutes=" ++ beside, "--quiet", "--sweet", "--hide-rho"] []-              first <- readProtocol alone-              second <- readProtocol beside-              second `shouldBe` first--      it "writes the same XML beside --minutes as alone" $-        withTempFile "protocolXXXXXX.xml" $ \(alone, one) ->-          withTempFile "protocolXXXXXX.xml" $ \(beside, two) ->-            withTempFile "minutesXXXXXX.txt" $ \(text, three) -> do-              mapM_ hClose [one, two, three]-              withStdin sum' $-                testCLISucceeded ["dataize", symbolic, "--protocol=" ++ alone, "--quiet", "--sweet", "--hide-rho"] []-              withStdin sum' $-                testCLISucceeded ["dataize", symbolic, "--protocol=" ++ beside, "--minutes=" ++ text, "--quiet", "--sweet", "--hide-rho"] []-              first <- readProtocol alone-              second <- readProtocol beside-              second `shouldBe` first--      it "abridges the text without --protocol" $-        withTempFile "minutesXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "[[ D> 01- ]]" $-            testCLISucceeded ["dataize", "--minutes=" ++ path, "--abridged", "--quiet"] []-          records <- readProtocol path-          records `shouldBe` "𝔻(Φ):\n  𝛿·0·1 := 01-\n"--    describe "--partial" $ do-      let stuck = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ times(^, x) -> [[ L> L_number_times ]], nope -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> 2.times(3).nope ]]"-          dispatched = "[[ foo -> [[ bar -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> Q.foo.bar ]]"-          wrapped = "[[ app -> [[ foo -> [[ bar -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> Q.app.foo.bar ]] ]]"-      it "fails on a λ function that cannot fire without the flag" $-        withStdin stuck $-          testCLIFailed-            ["dataize", symbolic, "--sweet", "--hide-rho"]-            ["No entry of --symbolic answers the λ function 'L_number_nope'"]--      it "prints the residue with the stuck application intact and exits successfully" $-        withStdin stuck $-          testCLISucceeded-            ["dataize", symbolic, "--partial", "--sweet", "--hide-rho"]-            ["L_number_nope:λ"]--      it "keeps what was evaluated before the stuck site in the residue" $-        withStdin stuck $-          testCLISucceeded-            ["dataize", symbolic, "--partial", "--sweet"]-            ["φ ↦ 𝜎1:λ"]--      it "records every firing before the stuck site in --protocol" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin stuck $-            testCLISucceeded ["dataize", symbolic, "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          lines records-            `shouldBe` [ "𝔻(Φ):"-                       , "  boxed 𝑛·0·1 := Φ.φ"-                       , "  normalized 𝑛·0·2 := 2.0.times( 3.0 ).nope  # Φ.φ"-                       , "  𝕄(𝑛·0·1):"-                       , "    normalized 𝑛·0·3 := ⟦ φ ↦ ∅, times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧  # Φ.number"-                       , "    𝑛·0·4 := 2.0"-                       , "    𝑛·0·5 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧"-                       , "    normalized 𝑛·0·6 := ⟦ x ↦ ∅, λ ⤍ L_number_times ⟧  # 𝑛·0·5.times"-                       , "    𝑛·0·7 := 𝑛·0·4.times( x ↦ 3.0 )"-                       , "    𝑛·0·8 := ⟦ x ↦ 3.0, λ ⤍ L_number_times ⟧"-                       , "    𝔼(L_number_times):"-                       , "      𝔻(ξ.ρ):"-                       , "        𝕄(ξ.ρ):"-                       , "          𝑛·1·1 := 2.0"-                       , "          𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧"-                       , "          morphed 𝑛·1·3 := 𝑛·1·2"-                       , "        boxed 𝑛·1·4 := 𝑛·1·3.φ"-                       , "        normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·1·4"-                       , "        𝕄(𝑛·1·4):"-                       , "          normalized 𝑛·1·6 := ∅:φ  # Φ.bytes"-                       , "          𝑛·1·7 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )"-                       , "          𝑛·1·8 := 40-00-00-00-00-00-00-00:Δ:φ"-                       , "          morphed 𝑛·1·9 := 𝑛·1·8"-                       , "        boxed 𝑛·1·10 := 𝑛·1·9.φ"-                       , "        normalized 𝑛·1·11 := 40-00-00-00-00-00-00-00:Δ  # 𝑛·1·10"-                       , "        𝛿·1·1 := 40-00-00-00-00-00-00-00  # 2.0"-                       , "      𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)"-                       , "      𝔻(ξ.x):"-                       , "        𝕄(ξ.x):"-                       , "          𝑛·1·12 := 3.0"-                       , "          𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧"-                       , "          morphed 𝑛·1·14 := 𝑛·1·13"-                       , "        boxed 𝑛·1·15 := 𝑛·1·14.φ"-                       , "        normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )  # 𝑛·1·15"-                       , "        𝕄(𝑛·1·15):"-                       , "          𝑛·1·17 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )"-                       , "          𝑛·1·18 := 40-08-00-00-00-00-00-00:Δ:φ"-                       , "          morphed 𝑛·1·19 := 𝑛·1·18"-                       , "        boxed 𝑛·1·20 := 𝑛·1·19.φ"-                       , "        normalized 𝑛·1·21 := 40-08-00-00-00-00-00-00:Δ  # 𝑛·1·20"-                       , "        𝛿·1·2 := 40-08-00-00-00-00-00-00  # 3.0"-                       , "      𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)"-                       , "      𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_times"-                       , "      𝕄(𝑛·1·22):"-                       , "        𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )"-                       , "        𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧"-                       , "        morphed 𝑛·1·25 := 𝑛·1·24"-                       , "      𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)"-                       , "      evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·8"-                       , "    normalized 𝑛·0·9 := L_number_nope:λ  # 𝑛·1·27.nope"-                       , "    morphed 𝑛·0·10 := L_number_nope:λ"-                       , "  unanswered L_number_nope  # 𝔻(L_number_nope:λ)"-                       ]--      it "still prints bytes when nothing gets stuck" $-        withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6) ]]" $-          testCLISucceeded ["dataize", symbolic, "--partial"] ["40-45-00-00-00-00-00-00"]--      it "prints the residual at --locator as XMIR, with ρ hidden" $-        withStdin wrapped $-          testCLISucceeded-            ["dataize", symbolic, "--partial", "--locator=Q.app", "--output=xmir", "--hide-rho"]-            ["<o name=\"λ\">L_number_nope</o>"]--      it "prints the residual at --locator, not the whole program" $-        withStdin wrapped $ do-          (out, _) <- withStdout (runCLI ["dataize", symbolic, "--partial", "--locator=Q.app", "--hide-rho", "--flat"])-          lines out `shouldBe` ["⟦ λ ⤍ L_number_nope ⟧"]--      it "prints a residual of several top bindings as XMIR" $-        withStdin dispatched $-          testCLISucceeded-            ["dataize", symbolic, "--partial", "--output=xmir"]-            ["<o base=\"Φ.foo\" name=\"ρ\"/>", "<o name=\"λ\">L_number_nope</o>"]--      it "prints the chain of steps ending in the residue with --sequence" $-        withStdin stuck $-          testCLISucceeded-            ["dataize", symbolic, "--partial", "--sequence", "--sweet", "--hide-rho", "--flat"]-            ["2.0.times( 3.0 ).nope", "L_number_nope:λ"]--      it "prints the terminator ⊥ the object reduces to as the residue" $-        withStdin "[[ ]]" $-          testCLISucceeded ["dataize", "--partial"] ["⊥"]--      describe "--focus under --locator" $ do-        it "finds the same object for the steps and for the answer when --locator has no matching child" $-          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $-            testCLISucceeded-              ["dataize", "--partial", "--locator=Q.t", "--focus=Q.a", "--flat"]-              ["⟦ Δ ⤍ 02- ⟧"]-        it "finds the same object for the steps and for the answer even when --locator also binds that attribute" $-          withStdin "⟦ t ↦ ⟦ a ↦ ⟦ Δ ⤍ 01- ⟧, λ ⤍ L_nope ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $ do-            (out, _) <- withStdout (runCLI ["dataize", "--partial", "--locator=Q.t", "--focus=Q.a", "--flat", "--sequence"])-            filter (not . null) (lines out) `shouldSatisfy` (not . null)-            filter (not . null) (lines out) `shouldSatisfy` all (== "⟦ Δ ⤍ 02- ⟧")-        it "prints the residual when --focus names the object at --locator" $-          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $-            testCLISucceeded-              ["dataize", "--partial", "--locator=Q.t", "--focus=Q.t", "--flat"]-              ["⟦ λ ⤍ L_nope ⟧"]-        it "respects --hide together with --focus and --locator" $-          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧, a ↦ ⟦ x ↦ ⟦ Δ ⤍ 01- ⟧, y ↦ ⟦ Δ ⤍ 02- ⟧ ⟧ ⟧" $-            testCLISucceeded-              ["dataize", "--partial", "--locator=Q.t", "--focus=Q.a", "--hide=Q.a.x", "--flat"]-              ["⟦ y ↦ ⟦ Δ ⤍ 02- ⟧ ⟧"]-        it "fails on a --focus it cannot find before it prints any step" $-          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧ ⟧" $ do-            (out, _) <- withStdout (try (runCLI ["dataize", "--partial", "--locator=Q.t", "--focus=Q.nope", "--flat", "--sequence"]) :: IO (Either ExitCode ()))-            out `shouldNotContain` "⟦ λ ⤍"-        it "prints the answer at --focus in LaTeX format under --locator" $-          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $-            testCLISucceeded-              ["dataize", "--partial", "--locator=Q.t", "--focus=Q.a", "--flat", "--output=latex"]-              ["\\begin{phiquation}", "[[ D> |02-| ]]{.}", "\\end{phiquation}"]--    describe "--symbolic" $ do-      let sum' = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6) ]]"-      it "fires the λ function an entry of the file answers" $-        withStdin sum' $-          testCLISucceeded ["dataize", symbolic] ["40-45-00-00-00-00-00-00"]--      it "reports the progress of the run with --log-level=INFO" $-        withStdin sum' $-          testCLISucceeded ["dataize", symbolic, "--log-level=INFO", "--quiet"] ["[INFO]: Started "]--      it "gets stuck on every λ function when it is not given" $-        withStdin sum' $-          testCLIFailed ["dataize"] ["No entry of --symbolic answers the λ function 'L_number_plus'"]--      it "fails when the file is not there" $-        withStdin sum' $-          testCLIFailed ["dataize", "--symbolic=no-such-file.yaml"] ["no-such-file.yaml"]--      it "fails on a file that carries no entries at all, before dataizing anything" $-        withTempFileContent "symbolicXXXXXX.yaml" "nope: true\n" $ \path ->-          withStdin sum' $-            testCLIFailed ["dataize", "--symbolic=" ++ path] ["cannot be read"]--    describe "a join on a condition nobody decided" $ do-      let joining = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.c\n  join:\n    on: 𝛿1\n    left: $.a\n    right: $.b\n"-          dataized :: String -> IO String-          dataized program =-            withLambdasOf joining $ \joins ->-              withStdin program $-                fst <$> withStdout (runCLI ["dataize", "--symbolic=" ++ joins, "--locator=Q.y"])-      it "gets stuck on two sides that do not join, instead of splitting the run" $-        withLambdasOf joining $ \joins ->-          withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ ⟦ Δ ⤍ 02- ⟧, λ ⤍ L_fork ⟧ ⟧" $-            testCLIFailed ["dataize", "--symbolic=" ++ joins, "--locator=Q.y"] ["No entry of --symbolic answers the λ function 'L_fork'"]--      it "gets stuck on a side whose morph got stuck" $-        withLambdasOf joining $ \joins ->-          withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ Δ ⤍ 05- ⟧, b ↦ ⟦ λ ⤍ L_none ⟧.x, λ ⤍ L_fork ⟧ ⟧" $-            testCLIFailed ["dataize", "--symbolic=" ++ joins, "--locator=Q.y"] ["No entry of --symbolic answers the λ function 'L_none'"]--      it "dataizes two sides that come to the same term" $ do-        printed <- dataized "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ Δ ⤍ 07- ⟧, b ↦ ⟦ Δ ⤍ 07- ⟧, λ ⤍ L_fork ⟧ ⟧"-        lines printed `shouldBe` ["07-"]--      it "dataizes two sides that differ only in their symbols" $ do-        printed <- dataized "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, b ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ⟧, λ ⤍ L_fork ⟧ ⟧"-        length (lines printed) `shouldBe` 1--      it "dataizes a side and ⊥ into the symbol the join minted for both" $ do-        printed <- dataized "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ λ ⤍ 𝜎2 ⟧, b ↦ ⊥, λ ⤍ L_fork ⟧ ⟧"-        lines printed `shouldBe` ["40-45-00-00-00-00-00-00"]--      it "writes the symbol a join minted for a side and ⊥ beside a symbol standing for ⊥" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withLambdasOf joining $ \joins ->-            withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ λ ⤍ 𝜎2 ⟧, b ↦ ⊥, λ ⤍ L_fork ⟧ ⟧" $-              testCLISucceeded ["dataize", "--symbolic=" ++ joins, "--locator=Q.y", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-          records <- readProtocol path-          lines records `shouldContain` ["    joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥"]--    describe "--inside" $ do-      let universe = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> [[ D> 01- ]] ]]"-      it "dataizes an expression the input does not contain" $-        withStdin universe $-          testCLISucceeded ["dataize", symbolic, "--inside=5.plus( 6 )"] ["40-45-00-00-00-00-00-00"]--      it "normalizes what it is handed before dataizing it" $-        withStdin universe $-          testCLISucceeded ["dataize", "--inside=[[ x -> [[ D> 2A- ]] ]].x"] ["2A-"]--      it "hides an object of the universe from the answer it morphs inside it" $-        withStdin universe $-          testCLISucceeded ["morph", "--inside=[[ x -> [[ D> 2A- ]] ]].x", "--hide=Q.bytes", "--flat", "--hide-rho"] ["⟦ Δ ⤍ 2A- ⟧"]--      it "morphs inside the universe just as it dataizes inside it" $-        withStdin universe $-          testCLISucceeded ["morph", symbolic, "--inside=5.plus( 6 )", "--sweet", "--hide-rho", "--flat"] ["⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"]--      it "opens the text protocol before the objects it made while aiming" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin universe $-            testCLISucceeded ["morph", symbolic, "--inside=5.plus( 6 )", "--minutes=" ++ path, "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          takeWhile (/= '(') (concat (take 1 (lines records))) `shouldBe` "𝕄"--      it "opens the XML protocol before the objects it made while aiming" $-        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withStdin universe $-            testCLISucceeded ["dataize", symbolic, "--inside=5.plus( 6 )", "--protocol=" ++ path, "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          take 1 (lines records) `shouldBe` ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>"]--      it "sites what it made while aiming at the place it put the expression at" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin universe $-            testCLISucceeded ["dataize", "--inside=[[ x -> ? ]]( x -> [[ D> 2A- ]] ).x", "--minutes=" ++ path, "--sweet", "--quiet"] []-          records <- readProtocol path-          take 2 (lines records) `shouldBe` ["𝔻(Φ.a🌵0):", "  𝑛·0·1 := ∅:x( x ↦ 2A-:Δ )"]--      it "opens a single morph block in the text protocol it aims inside" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin "⟦ app ↦ ⟦ x ↦ ∅, φ ↦ ξ.x ⟧ ⟧" $-            testCLISucceeded ["morph", "--inside=Φ.app( x ↦ ⟦ Δ ⤍ 02- ⟧ )", "--minutes=" ++ path, "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          length (filter ("𝕄(Φ.a🌵0):" `isInfixOf`) (lines records)) `shouldBe` 1-          take 2 (drop 1 (lines records)) `shouldBe` ["  remembered 𝑛·0·1 ≡ Φ.app  # ⟦ x ↦ ∅, φ ↦ x ⟧", "  𝑛·0·2 := Φ.app( x ↦ 02-:Δ )"]--      it "opens a single dataize element in the XML protocol it aims inside" $-        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withStdin "⟦ app ↦ ⟦ x ↦ ∅, φ ↦ ξ.x ⟧ ⟧" $-            testCLISucceeded ["dataize", "--inside=⟦ Δ ⤍ 02- ⟧", "--protocol=" ++ path, "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          length (filter (isInfixOf "<dataize at=\"Φ.a🌵0\">") (lines records)) `shouldBe` 1--      it "keeps opening the block of a judgment nested in the universe it aims inside" $-        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-          hClose stream-          withStdin universe $-            testCLISucceeded ["dataize", symbolic, "--inside=5.plus( 6 )", "--minutes=" ++ path, "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          take 3 (lines records) `shouldBe` ["𝔻(Φ.a🌵0):", "  𝕄(Φ.a🌵0):", "    normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"]--      it "opens a single morph element in the XML protocol it aims inside" $-        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-          hClose stream-          withStdin "⟦ app ↦ ⟦ x ↦ ∅, φ ↦ ξ.x ⟧ ⟧" $-            testCLISucceeded ["morph", "--inside=Φ.app( x ↦ ⟦ Δ ⤍ 02- ⟧ )", "--protocol=" ++ path, "--sweet", "--hide-rho", "--quiet"] []-          records <- readProtocol path-          length (filter (isInfixOf "<morph at=\"Φ.a🌵0\">") (lines records)) `shouldBe` 1--      it "cannot be used together with --locator" $-        withStdin universe $-          testCLIFailed ["dataize", "--inside=Q.@", "--locator=Q.@"] ["--inside and --locator cannot be used together"]--      it "accepts --locator=Φ with --inside, since Φ and Q both name the root" $-        withStdin universe $-          testCLISucceeded ["dataize", "--inside=[[ x -> [[ D> 2A- ]] ]].x", "--locator=Φ"] ["2A-"]--      it "accepts --locator=Φ with morph --inside, since Φ and Q both name the root" $-        withStdin universe $-          testCLISucceeded ["morph", symbolic, "--inside=5.plus( 6 )", "--locator=Φ", "--sweet", "--hide-rho", "--flat"] ["⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"]--      it "fails when the input expression is not a formation" $-        withStdin "Q.x" $-          testCLIFailed ["dataize", "--inside=Q.x"] ["--inside requires the input expression to be a formation"]--    describe "fails" $ do-      it "with --output != latex and --nonumber" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--nonumber", "--output=xmir"]-            ["The --nonumber option can stay together with --output=latex only"]--      it "with --omit-listing and --output != xmir" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--omit-listing", "--output=phi"]-            ["--omit-listing"]--      it "with --omit-comments and --output != xmir" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--omit-comments", "--output=phi"]-            ["--omit-comments"]--      it "with --expression and --output != latex" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--expression=foo", "--output=phi"]-            ["--expression option can stay together with --output=latex only"]--      it "with --label and --output != latex" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--label=foo", "--output=phi"]-            ["--label option can stay together with --output=latex only"]--      it "with wrong --hide option" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--hide=Q.x(Q.y)"]-            ["[ERROR]: Invalid set of arguments: Only dispatch expression", "but given: Φ.x( Φ.y )"]--      it "with wrong --show option" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--show=Q.x(Q.y)"]-            ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --show"]--      it "with wrong --locator option" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--locator=Q.x(Q.y)"]-            ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --locator"]--      it "with wrong --focus option" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--focus=Q.x(Q.y)"]-            ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --focus"]--      it "with wrong --locator option written through ξ, keeping ξ in the error" $-        withStdin "" $-          testCLIFailed-            ["dataize", "--locator=ξ.x"]-            ["[ERROR]:", "but given: ξ.x"]--    it "accepts --depth-sensitive" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded ["dataize", "--depth-sensitive"] ["01-"]--    it "finishes exactly on --max-cycles without reporting the limit" $-      withStdin "⟦ φ ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $-        testCLISucceeded ["dataize", "--max-cycles=1"] ["01-"]--    it "reports --max-cycles exceeded when a rule still applies at the limit" $-      withStdin "[[ @ -> $.f(y -> [[ ]]), f -> [[ D> 00-, y -> ? ]] ]]" $-        testCLIFailed-          ["dataize", "--max-cycles=1"]-          ["[ERROR]: Normalization did not finish before reaching the limit of cycles: --max-cycles=1"]--  describe "morph" $ do-    let chained = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6).plus(7) ]]"-    it "prints help" $-      testCLISucceeded ["morph", "--help"] ["Morph the 𝜑-expression"]--    it "hands the top formation back untouched under the default locator" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded ["morph", "--flat", "--hide-rho"] ["⟦ Δ ⤍ 01- ⟧"]--    it "stops at the bare saturated λ-formation" $-      withStdin chained $-        testCLISucceeded-          ["morph", symbolic, "--locator=Q.@", "--sweet", "--hide-rho", "--flat"]-          ["⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"]--    it "leaves to dataize the firing that takes the same term to bytes" $-      withStdin chained $-        testCLISucceeded ["dataize", symbolic] ["40-45-00-00-00-00-00-00"]--    it "morphs the subterm --locator aims at" $-      withStdin "[[ ex -> Q.x, x -> [[ D> 42- ]] ]]" $-        testCLISucceeded ["morph", "--locator=Q.ex", "--flat", "--hide-rho"] ["⟦ Δ ⤍ 42- ⟧"]--    it "canonizes the answer it prints" $-      withStdin "[[ x -> [[ L> Foo ]], y -> [[ L> Bar ]] ]]" $-        testCLISucceeded ["morph", "--canonize", "--flat", "--sweet"] ["⟦ x ↦ Fn1:λ, y ↦ Fn2:λ ⟧"]--    it "hides a binding of the answer it prints" $-      withStdin "[[ x -> [[ L> Foo ]], y -> [[ L> Bar ]] ]]" $-        testCLISucceeded ["morph", "--hide=Q.x", "--flat", "--sweet"] ["Bar:λ:y"]--    it "shows only one binding of the answer it prints" $-      withStdin "[[ x -> [[ L> Foo ]], y -> [[ L> Bar ]] ]]" $-        testCLISucceeded ["morph", "--show=Q.x", "--flat", "--sweet"] ["Foo:λ:x"]--    it "hides an object outside the answer --locator aims at" $-      withStdin "[[ t -> [[ a -> [[ D> 01- ]], b -> [[ D> 02- ]] ]], o -> [[ D> 03- ]] ]]" $-        testCLISucceeded ["morph", "--locator=Q.t", "--hide=Q.o", "--flat", "--hide-rho"] ["⟦ a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ ⟦ Δ ⤍ 02- ⟧ ⟧"]--    it "hides a binding of the answer --locator aims at" $-      withStdin "[[ t -> [[ a -> [[ D> 01- ]], b -> [[ D> 02- ]] ]], o -> [[ D> 03- ]] ]]" $-        testCLISucceeded ["morph", "--locator=Q.t", "--hide=Q.t.a", "--flat", "--hide-rho"] ["⟦ b ↦ ⟦ Δ ⤍ 02- ⟧ ⟧"]--    it "shows only one binding of the answer --locator aims at" $-      withStdin "[[ t -> [[ a -> [[ D> 01- ]], b -> [[ D> 02- ]] ]], o -> [[ D> 03- ]] ]]" $-        testCLISucceeded ["morph", "--locator=Q.t", "--show=Q.t.b", "--flat", "--hide-rho"] ["⟦ b ↦ ⟦ Δ ⤍ 02- ⟧ ⟧"]--    it "prints ⊥ instead of failing the run" $-      withStdin "[[ x -> $ ]]" $-        testCLISucceeded ["morph", "--locator=Q.x"] ["⊥"]--    it "fails to dataize what it morphs to ⊥" $-      withStdin "[[ x -> $ ]]" $-        testCLIFailed ["dataize", "--locator=Q.x"] ["terminator ⊥"]--    it "prints the chain of morphing steps with --sequence" $-      withStdin chained $-        testCLISucceeded-          ["morph", symbolic, "--locator=Q.@", "--sequence", "--headers", "--sweet", "--hide-rho", "--flat"]-          [ "Rule 'maa'"-          , "Rule 'alpha'"-          , "Rule 'copy'"-          , "Rule 'mf'"-          , "⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"-          ]--    it "writes every step of a LaTeX --sequence with the arrow of its judgment" $-      withStdin "[[ q -> [[ ]], k -> Q.q ]]" $-        testCLISucceeded-          ["morph", "--locator=Q.k", "--sequence", "--output=latex", "--flat", "--sweet", "--quiet"]-          [ intercalate-              "\n"-              [ "\\begin{phiquation}"-              , "[[ |q| -> [[]], |k| -> Q . |q| ]] \\phiMorph[\\nameref{r:md}]"-              , "  \\phiMorph [[ |q| -> [[]], |k| -> [[ |q| -> [[]], |k| -> Q . |q| ]] . |q| ]] \\phiNormalize[\\nameref{r:dot}]"-              , "  \\phiNormalize [[ |q| -> [[]], |k| -> [[]] ( \\phiTerminal{\\rho} -> Q ) ]] \\phiNormalize[\\nameref{r:skip}]"-              , "  \\phiNormalize [[ |q| -> [[]], |k| -> [[]] ]] \\phiMorph[\\nameref{r:mf}]"-              , "  \\phiMorph [[ |q| -> [[]], |k| -> [[]] ]]{.}"-              , "\\end{phiquation}"-              ]-          ]--    it "does not print the result with --quiet" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded ["morph", "--quiet"] []--    it "records the λ functions it fires with --protocol" $-      withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-        hClose stream-        withStdin chained $-          testCLISucceeded ["morph", symbolic, "--locator=Q.@", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []-        records <- readProtocol path-        lines records-          `shouldBe` [ "𝕄(Φ.φ):"-                     , "  normalized 𝑛·0·1 := ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"-                     , "  𝑛·0·2 := 5.0"-                     , "  𝑛·0·3 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                     , "  normalized 𝑛·0·4 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus"-                     , "  𝑛·0·5 := 𝑛·0·2.plus( x ↦ 6.0 )"-                     , "  𝑛·0·6 := ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"-                     , "  𝔼(L_number_plus):"-                     , "    𝔻(ξ.ρ):"-                     , "      𝕄(ξ.ρ):"-                     , "        𝑛·1·1 := 5.0"-                     , "        𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                     , "        morphed 𝑛·1·3 := 𝑛·1·2"-                     , "      boxed 𝑛·1·4 := 𝑛·1·3.φ"-                     , "      normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"-                     , "      𝕄(𝑛·1·4):"-                     , "        normalized 𝑛·1·6 := ∅:φ  # Φ.bytes"-                     , "        𝑛·1·7 := Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"-                     , "        𝑛·1·8 := 40-14-00-00-00-00-00-00:Δ:φ"-                     , "        morphed 𝑛·1·9 := 𝑛·1·8"-                     , "      boxed 𝑛·1·10 := 𝑛·1·9.φ"-                     , "      normalized 𝑛·1·11 := 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"-                     , "      𝛿·1·1 := 40-14-00-00-00-00-00-00  # 5.0"-                     , "    𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)"-                     , "    𝔻(ξ.x):"-                     , "      𝕄(ξ.x):"-                     , "        𝑛·1·12 := 6.0"-                     , "        𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"-                     , "        morphed 𝑛·1·14 := 𝑛·1·13"-                     , "      boxed 𝑛·1·15 := 𝑛·1·14.φ"-                     , "      normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"-                     , "      𝕄(𝑛·1·15):"-                     , "        𝑛·1·17 := Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"-                     , "        𝑛·1·18 := 40-18-00-00-00-00-00-00:Δ:φ"-                     , "        morphed 𝑛·1·19 := 𝑛·1·18"-                     , "      boxed 𝑛·1·20 := 𝑛·1·19.φ"-                     , "      normalized 𝑛·1·21 := 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"-                     , "      𝛿·1·2 := 40-18-00-00-00-00-00-00  # 6.0"-                     , "    𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)"-                     , "    𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"-                     , "    𝕄(𝑛·1·22):"-                     , "      𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )"-                     , "      𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"-                     , "      morphed 𝑛·1·25 := 𝑛·1·24"-                     , "    𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)"-                     , "    evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·6"-                     , "  normalized 𝑛·0·7 := ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·27.plus"-                     , "  𝑛·0·8 := 𝑛·1·23.plus( x ↦ 7.0 )"-                     , "  𝑛·0·9 := ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"-                     , "  morphed 𝑛·0·10 := 𝑛·0·9"-                     ]--    it "saves morphing steps to dir with --steps-dir" $-      withTempDirectory "phino-steps-morph" $ \dir ->-        withStdin chained $ do-          testCLISucceeded-            ["morph", symbolic, "--locator=Q.@", "--steps-dir=" ++ dir, "--sweet", "--hide-rho", "--flat"]-            ["⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"]-          steps <- sort <$> listDirectory dir-          steps `shouldBe` map (\n -> printf "%05d.phi" (n :: Int)) [1 .. length steps]-          length steps `shouldSatisfy` (> 0)--    it "accepts --seed, --shuffle and --depth-sensitive" $-      withStdin "[[ D> 01- ]]" $-        testCLISucceeded ["morph", "--seed=7", "--shuffle", "--depth-sensitive", "--flat", "--hide-rho"] ["⟦ Δ ⤍ 01- ⟧"]--    it "returns the λ-formation dataize cannot finish on" $-      withStdin "⟦ @ ↦ ⟦ λ ⤍ L_number_div, ρ ↦ ⟦ Δ ⤍ 40-45-00-00-00-00-00-00 ⟧, x ↦ ⟦ Δ ⤍ 40-00-00-00-00-00-00-00 ⟧ ⟧ ⟧" $-        testCLISucceeded-          ["morph", "--locator=Q.@", "--max-steps=40", "--flat", "--hide-rho"]-          ["⟦ λ ⤍ L_number_div"]--    it "fails once the --max-steps budget is spent" $-      withStdin chained $-        testCLIFailed-          ["morph", "--locator=Q.@", "--max-steps=3"]-          ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=3"]--    it "names morphing, not dataization, when the budget is spent before dataization starts" $-      withStdin "⟦ x ↦ Φ.x.y ⟧" $-        testCLIFailed-          ["morph", "--locator=Q.x", "--max-steps=5"]-          ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=5"]--    describe "--max-firings" $ do-      let splitting = withLambdasOf (T.pack "- λ: L_split\n  morph:\n    𝑛1: Φ.s.foo\n    𝑛2: Φ.s.foo\n  𝑛: ⟦ l ↦ 𝑛1, r ↦ 𝑛2 ⟧\n")-          split = "⟦ s ↦ ⟦ λ ⤍ L_split ⟧, x ↦ Φ.s.foo ⟧"-      it "fails with non-positive --max-firings" $-        withStdin split $-          testCLIFailed ["morph", "--max-firings=0"] ["--max-firings must be positive"]--      it "fails once the --max-firings budget is spent on a widening recursion" $-        splitting $ \table ->-          withStdin split $-            testCLIFailed-              ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-firings=64"]-              ["[ERROR]: Evaluation did not finish before reaching the limit of firings: --max-firings=64"]--      it "ends the widening recursion with --partial" $-        splitting $ \table ->-          withStdin split $-            testCLISucceeded-              ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-firings=64", "--partial", "--flat", "--hide-rho", "--sweet"]-              ["L_split:λ.foo"]--      it "fires no more λ functions than --max-firings allows" $-        splitting $ \table ->-          withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-            hClose stream-            withStdin split $-              testCLISucceeded-                ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-firings=64", "--partial", "--minutes=" ++ path, "--quiet"]-                []-            records <- readProtocol path-            length (filter (isInfixOf "𝔼(L_split)") (lines records)) `shouldBe` 64--    describe "--max-nodes" $ do-      let growing = "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( 𝜎1:λ ) ⟧"-      it "fails with non-positive --max-nodes" $-        withStdin growing $-          testCLIFailed ["dataize", "--max-nodes=0"] ["--max-nodes must be positive"]--      it "fails once the term grows over --max-nodes" $-        withStdin growing $-          testCLIFailed-            ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-nodes=60", "--locator=Q.x"]-            ["[ERROR]: Evaluation did not finish before reaching the limit of nodes: --max-nodes=60"]--      it "ends the growing term with --partial" $-        withStdin growing $-          testCLISucceeded-            ["morph", "--acyclic=plausible", "--max-loops=2", "--max-nodes=60", "--partial", "--locator=Q.x", "--flat", "--hide-rho", "--sweet"]-            ["Φ.m( 𝜎1:λ )"]--      it "passes a small run in a large program under --max-nodes" $-        withStdin ("⟦ x ↦ ⟦ φ ↦ ξ.y, y ↦ ⟦ Δ ⤍ 05- ⟧ ⟧, junk ↦ ⟦ " ++ intercalate ", " [printf "a%d ↦ ⟦ b ↦ ⟦ c ↦ ⟦ Δ ⤍ 01- ⟧ ⟧ ⟧" index | index <- [0 .. 999 :: Int]] ++ " ⟧ ⟧") $-          testCLISucceeded ["dataize", "--max-nodes=50", "--locator=Q.x"] ["05-"]--    describe "--max-memory" $ do-      let growing = "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( 𝜎1:λ ) ⟧"-      it "fails with non-positive --max-memory" $-        withStdin growing $-          testCLIFailed ["dataize", "--max-memory=0G"] ["--max-memory must be positive"]--      it "fails with --max-memory of an unknown unit" $-        withStdin growing $-          testCLIFailed ["dataize", "--max-memory=8Q"] ["--max-memory must be a number of bytes, optionally ending with K, M, G or T"]--      it "fails once the heap grows over --max-memory" $-        withStdin growing $-          testCLIFailed-            ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-memory=1K", "--locator=Q.x"]-            ["[ERROR]: Evaluation did not finish before reaching the limit of memory: --max-memory=1K"]--      it "ends the growing term with --partial under --max-memory" $-        withStdin growing $-          testCLISucceeded-            ["morph", "--acyclic=plausible", "--max-loops=2", "--max-memory=1K", "--partial", "--locator=Q.x", "--flat", "--hide-rho", "--sweet"]-            ["Φ.m( 𝜎1:λ )"]--      it "passes a small run in a large program under --max-memory" $-        withStdin ("⟦ x ↦ ⟦ φ ↦ ξ.y, y ↦ ⟦ Δ ⤍ 05- ⟧ ⟧, junk ↦ ⟦ " ++ intercalate ", " [printf "a%d ↦ ⟦ b ↦ ⟦ c ↦ ⟦ Δ ⤍ 01- ⟧ ⟧ ⟧" index | index <- [0 .. 999 :: Int]] ++ " ⟧ ⟧") $-          testCLISucceeded ["dataize", "--max-memory=1G", "--locator=Q.x"] ["05-"]--    describe "--max-seconds" $ do-      let ladder = withLambdasOf (T.pack "- λ: L_split\n  morph:\n    𝑛1: ξ.n.foo\n    𝑛2: ξ.n.foo\n  𝑛: ⟦ l ↦ 𝑛1, r ↦ 𝑛2 ⟧\n")-          rungs = "⟦ " ++ intercalate ", " [printf "l%d ↦ ⟦ λ ⤍ L_split, n ↦ Φ.l%d ⟧" rung (rung + 1) | rung <- [0 .. 23 :: Int]] ++ ", l24 ↦ ⟦⟧, x ↦ Φ.l0.foo ⟧"-          bounded :: Expectation -> Expectation-          bounded check = timeout 60000000 check >>= (`shouldBe` Just ())-      it "fails with non-positive --max-seconds" $-        withStdin rungs $-          testCLIFailed ["morph", "--max-seconds=0"] ["--max-seconds must be positive"]--      it "fails with a --max-seconds value above maxBound Int, naming the limit" $-        withStdin rungs $-          testCLIFailed-            ["morph", "--max-seconds=9223372036854775808"]-            ["value must be between", "9223372036854775807"]--      it "fails once the --max-seconds budget is spent" $-        ladder $ \table ->-          bounded $-            withStdin rungs $-              testCLIFailed-                ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-seconds=1"]-                ["[ERROR]: Evaluation did not finish before reaching the limit of seconds: --max-seconds=1"]--      it "fails dataize once the --max-seconds budget is spent" $-        ladder $ \table ->-          bounded $-            withStdin rungs $-              testCLIFailed-                ["dataize", "--symbolic=" ++ table, "--locator=Q.x", "--max-seconds=1"]-                ["[ERROR]: Evaluation did not finish before reaching the limit of seconds: --max-seconds=1"]--      it "prints the residue once the --max-seconds budget is spent with --partial" $-        ladder $ \table ->-          bounded $-            withStdin rungs $-              testCLISucceeded-                ["morph", "--symbolic=" ++ table, "--max-seconds=1", "--locator=Q.x", "--partial", "--flat", "--hide-rho", "--sweet"]-                ["⟦ λ ⤍ L_split, n ↦ Φ.l1 ⟧.foo"]--      it "prints the residue of a dataization once the --max-seconds budget is spent with --partial" $-        ladder $ \table ->-          bounded $-            withStdin rungs $-              testCLISucceeded-                ["dataize", "--symbolic=" ++ table, "--max-seconds=1", "--locator=Q.x", "--partial", "--flat", "--hide-rho", "--sweet"]-                ["⟦ λ ⤍ L_split, n ↦ Φ.l1 ⟧.foo"]--      forM_ [(testCLIFailed, ["--max-seconds=1"], ["--locator=Q.x"]), (testCLISucceeded, [], ["--locator=Q.x", "--partial"])] $ \(run, outputs, opts) ->-        it ("writes the timeout as the last line of the protocol with " ++ unwords opts) $-          ladder $ \table ->-            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-              hClose stream-              bounded $-                withStdin rungs $-                  run-                    (["morph", "--symbolic=" ++ table, "--max-seconds=1", "--minutes=" ++ path, "--quiet"] ++ opts)-                    outputs-              records <- readProtocol path-              take 2 (words (last (lines records))) `shouldBe` ["timeout", "1"]--      it "writes the timeout once to the XML protocol" $-        ladder $ \table ->-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            bounded $-              withStdin rungs $-                testCLISucceeded-                  ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--partial", "--max-seconds=1", "--protocol=" ++ path, "--quiet"]-                  []-            records <- readProtocol path-            length (filter (isInfixOf "<timeout limit=\"1\" by=\"morph\" at=\"") (lines records)) `shouldBe` 1--      it "closes the XML protocol of a run out of time" $-        ladder $ \table ->-          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-            hClose stream-            bounded $-              withStdin rungs $-                testCLIFailed-                  ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-seconds=1", "--protocol=" ++ path, "--quiet"]-                  ["--max-seconds=1"]-            document <- X.readFile X.def path-            X.nameLocalName (X.elementName (X.documentRoot document)) `shouldBe` T.pack "protocol"--    it "parks the spent budget as a residual with --partial" $-      withStdin "⟦ φ ↦ 5.gt(Φ.nan) ⟧" $-        testCLISucceeded-          ["morph", "--locator=Q.@", "--max-steps=10", "--partial", "--flat", "--hide-rho", "--sweet"]-          ["5.0.gt( Φ.nan )"]--    describe "--partial" $ do-      let stuck = "[[ @ -> [[ L> Sym_arg_0 ]].foo ]]"-      it "fails on a λ function that cannot fire without the flag" $-        withStdin stuck $-          testCLIFailed ["morph", "--locator=Q.@"] ["No entry of --symbolic answers the λ function 'Sym_arg_0'"]--      it "prints the residue with the stuck application intact and exits successfully" $-        withStdin stuck $-          testCLISucceeded-            ["morph", "--locator=Q.@", "--partial", "--flat", "--hide-rho"]-            ["⟦ λ ⤍ Sym_arg_0 ⟧.foo"]--    describe "a copy a 'defer' line of a join defers" $ do-      let joining = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.c\n  morph:\n    𝑛1: $.a\n    𝑛2: $.b\n  defer:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n"-          counting = T.pack "- λ: L_inc\n  dataize:\n    𝛿1: $.x\n  𝑛: Φ.num( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )\n"-          recordedWith :: T.Text -> [String] -> String -> IO [String]-          recordedWith entries options program =-            withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do-              hClose stream-              withLambdasOf entries $ \joins ->-                withStdin program $-                  testCLIFailed (["dataize", "--symbolic=" ++ joins, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] ++ options) ["No entry of --symbolic answers the λ function 'L_fork'"]-              lines <$> readProtocol path-          deferred :: [String] -> String -> IO [String]-          deferred = recordedWith joining-      it "writes the copy it deferred to the XML protocol as a call of the object it was made of" $ do-        records <- deferred [] "⟦ step(tup) ↦ ⟦ φ ↦ tup.next ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.step( tup ↦ Φ.items.tail ), λ ⤍ L_fork ⟧ ⟧"-        records-          `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"-                     , "<dataize at=\"Φ.y\">"-                     , "  <evaluate λ=\"L_fork\" by=\"dataize\" at=\"Φ.y\">"-                     , "    <dataize at=\"ξ.c\">"-                     , "      <manufactured meta=\"𝛿·1·1\">𝜎2</manufactured>"-                     , "    </dataize>"-                     , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"-                     , "    <morph at=\"ξ.a\">"-                     , "      <morphed meta=\"𝑛·1·1\">01-</morphed>"-                     , "    </morph>"-                     , "    <bound meta=\"𝑛1·1\">01-</bound>"-                     , "    <morph at=\"ξ.b\">"-                     , "      <remembered meta=\"𝑛·1·2\" as=\"Φ.step\"/>"-                     , "      <applied meta=\"𝑛·1·3\" by=\"morph\" at=\"ξ.b\" of=\"Φ.step\"><ref attr=\"tup\">Φ.items.tail</ref></applied>"-                     , "      <formed meta=\"𝑛·1·4\" of=\"Φ.step\"><ref attr=\"tup\">Φ.items.tail</ref></formed>"-                     , "      <applied meta=\"𝑒·1·1\" of=\"𝑛·1·2\"><ref attr=\"tup\">Φ.items.tail</ref></applied>"-                     , "      <remembered of=\"𝑛·1·4\" as=\"𝑒·1·1\"/>"-                     , "      <morphed meta=\"𝑛·1·5\">𝑛·1·4</morphed>"-                     , "    </morph>"-                     , "    <bound meta=\"𝑛2·1\">𝑛·1·5</bound>"-                     , "    <recalled of=\"𝑛·1·4\" as=\"𝑒·1·1\"/>"-                     , "    <recalled of=\"𝑛·1·2\" as=\"Φ.step\"/>"-                     , "    <deferred symbol=\"𝜎3\" by=\"morph\" at=\"𝑛2.φ\" of=\"Φ.step\"><with><symbol attr=\"tup\">𝜎1</symbol></with></deferred>"-                     , "    <diverged left=\"01-\" right=\"𝜎3\" at=\".Δ\" reason=\"the join names no otherwise\"><left Δ=\"01-\"/><right/></diverged>"-                     , "  </evaluate>"-                     , "</dataize>"-                     ]--      it "names the object a deferred copy was made of through the formation its ρ holds" $ do-        records <- deferred [] "⟦ joined(items) ↦ ⟦ φ ↦ step( tup ↦ items ), step(ρ, tup) ↦ ⟦ φ ↦ tup.next ⟧ ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.joined( items ↦ Φ.items.tail ).φ, λ ⤍ L_fork ⟧ ⟧"-        records `shouldContain` ["    <deferred symbol=\"𝜎3\" by=\"morph\" at=\"𝑛2.φ\" of=\"Φ.joined.step\"><with><symbol attr=\"tup\">𝜎1</symbol></with></deferred>"]--      it "names an argument of a deferred copy that is no bare symbol by the meta its morph bound, though an element formed it" $ do-        records <- deferred [] "⟦ box(x, w) ↦ ⟦ φ ↦ x.next ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.box( x ↦ Φ.items.tail, w ↦ ⟦ z ↦ Φ ⟧ ), λ ⤍ L_fork ⟧ ⟧"-        records `shouldContain` ["    <deferred symbol=\"𝜎3\" by=\"morph\" at=\"𝑛2.φ\" of=\"Φ.box\"><with><symbol attr=\"x\">𝜎1</symbol><meta attr=\"w\">𝑛·1·8</meta></with></deferred>"]--      it "names a deferred copy of a formation the world does not declare by the element that formed it" $ do-        records <- deferred [] "⟦ wrap(v) ↦ ⟦⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.wrap( v ↦ ⟦ inner(x) ↦ ⟦ φ ↦ x.next ⟧ ⟧ ).v.inner( x ↦ Φ.items.tail ), λ ⤍ L_fork ⟧ ⟧"-        records `shouldContain` ["    <formed meta=\"𝑒·1·3\"><symbol attr=\"x\">𝜎1</symbol><ref attr=\"φ\">x.next</ref></formed>", "    <deferred symbol=\"𝜎3\" by=\"morph\" at=\"𝑛2.φ\" of=\"𝑒·1·3\"/>"]--      it "names an argument of a deferred copy by the object its morph answered" $ do-        records <- recordedWith (joining <> counting) [] "⟦ box(x, w) ↦ ⟦ φ ↦ x.next ⟧, num(φ) ↦ ⟦⟧, inc(x) ↦ ⟦ λ ⤍ L_inc ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.box( x ↦ Φ.items.tail, w ↦ Φ.inc( ⟦ Δ ⤍ 2A- ⟧ ) ), λ ⤍ L_fork ⟧ ⟧"-        filter (isInfixOf "<deferred") records `shouldBe` ["    <deferred symbol=\"𝜎4\" by=\"morph\" at=\"𝑛2.φ\" of=\"Φ.box\"><with><symbol attr=\"x\">𝜎1</symbol><meta attr=\"w\">𝑛·2·7</meta></with></deferred>"]--    describe "--acyclic=plausible" $ do-      let twins = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], pair(a, b) -> [[ L> L_pair ]], t -> Φ.pair( 7.plus( 5.plus( 6 ) ), 7.plus( 5.plus( 6 ) ) ).φ ]]"-          pairs = T.pack "- λ: L_number_plus\n  dataize:\n    𝛿1: $.ρ\n    𝛿2: $.x\n  𝑛: Φ.number( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )\n- λ: L_pair\n  morph:\n    𝑛1: $.a\n    𝑛2: $.b\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  𝑛: ⟦ φ ↦ ⟦ a ↦ 𝑛3, b ↦ 𝑛4 ⟧ ⟧\n"-          recorded :: String -> IO [String]-          recorded mode =-            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-              hClose stream-              withLambdasOf pairs $ \file ->-                withStdin twins $-                  testCLISucceeded-                    ["morph", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=" ++ mode, "--minutes=" ++ path, "--quiet"]-                    []-              lines <$> readProtocol path-      it "charges a formation once per argument spelling it under proven" $-        withLambdasOf pairs $ \file ->-          withStdin twins $-            testCLIFailed-              ["morph", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=proven", "--max-firings=4"]-              ["[ERROR]: Evaluation did not finish before reaching the limit of firings: --max-firings=4"]--      it "charges a firing the memo answers under plausible" $-        withLambdasOf pairs $ \file ->-          withStdin twins $-            testCLIFailed-              ["morph", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-firings=3"]-              ["[ERROR]: Evaluation did not finish before reaching the limit of firings: --max-firings=3"]--      it "answers every firing within the budget under plausible" $-        withLambdasOf pairs $ \file ->-          withStdin twins $-            testCLISucceeded-              ["morph", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-firings=4", "--flat", "--hide-rho", "--sweet"]-              ["b ↦ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧"]--      it "reduces the operands of a formation once per argument spelling it under proven" $-        recorded "proven" >>= (`shouldSatisfy` ((== 4) . length . filter (isInfixOf "𝛿1·")))--      it "reduces the operands of a formation once for the run under plausible" $-        recorded "plausible" >>= (`shouldSatisfy` ((== 2) . length . filter (isInfixOf "𝛿1·")))--      it "writes a recalled firing at its own site under plausible" $-        recorded "plausible" >>= (`shouldSatisfy` ((== 3) . length . filter (isInfixOf "𝔼(L_number_plus)")))--      it "answers a recalled firing with the line of the first under plausible" $-        recorded "plausible" >>= (`shouldContain` ["      𝑛·4·1 := 𝑛·2·21  # 𝑛 of L_number_plus"])--      it "dataizes to the same datum under plausible" $-        withStdin chained $-          testCLISucceeded-            ["dataize", symbolic, "--acyclic=plausible", "--locator=Q.@"]-            ["40-45-00-00-00-00-00-00"]--    describe "--acyclic=proven" $ do-      let looping = "⟦ x ↦ ⟦ λ ⤍ L_loop ⟧.foo ⟧"-      it "spends the whole budget and fails on the limit without the flag" $-        loopingLambdas $ \endless ->-          withStdin looping $-            testCLIFailed-              ["morph", "--symbolic=" ++ endless, "--locator=Q.x", "--max-steps=40"]-              ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=40"]--      it "answers the looping dispatch with a symbol and exits successfully with the flag" $-        loopingLambdas $ \endless ->-          withStdin looping $-            testCLISucceeded-              ["morph", "--symbolic=" ++ endless, "--locator=Q.x", "--acyclic=proven", "--max-steps=4000", "--flat", "--hide-rho"]-              ["⟦ λ ⤍ 𝜎1 ⟧"]--      it "answers a terminating program the same way with the flag" $-        withStdin chained $-          testCLISucceeded-            ["morph", symbolic, "--acyclic=proven", "--locator=Q.@", "--sweet", "--hide-rho", "--flat"]-            ["⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"]--    describe "--max-loops" $ do-      it "fires a looping λ function once more with --max-loops=1" $-        loopingLambdas $ \endless ->-          withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do-            hClose stream-            withStdin "⟦ x ↦ ⟦ λ ⤍ L_loop ⟧.foo ⟧" $-              testCLISucceeded-                ["morph", "--symbolic=" ++ endless, "--locator=Q.x", "--acyclic=proven", "--max-loops=1", "--minutes=" ++ path, "--quiet"]-                []-            records <- readProtocol path-            length (filter (isInfixOf "𝔼(L_loop)") (lines records)) `shouldBe` 2--      it "refuses the flag without --acyclic" $-        withStdin "⟦ x ↦ ⟦ λ ⤍ L_loop ⟧.foo ⟧" $-          testCLIFailed ["morph", "--locator=Q.x", "--max-loops=3"] ["The option --max-loops requires --acyclic, since only --acyclic cuts a loop"]--    it "prints a top formation of several bindings as XMIR" $-      withStdin "[[ x -> [[ D> 01- ]], y -> [[ D> 02- ]] ]]" $-        testCLISucceeded-          ["morph", "--output=xmir"]-          ["<o name=\"x\">01-</o>", "<o name=\"y\">02-</o>"]--    describe "fails" $ do-      it "with --output != latex and --nonumber" $-        withStdin "" $-          testCLIFailed-            ["morph", "--nonumber", "--output=xmir"]-            ["The --nonumber option can stay together with --output=latex only"]--      it "with --show used more than once" $-        withStdin "" $-          testCLIFailed-            ["morph", "--show=Q.a", "--show=Q.b"]-            ["The option --show can be used only once"]--      it "with wrong --locator option" $-        withStdin "" $-          testCLIFailed-            ["morph", "--locator=Q.x(Q.y)"]-            ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --locator"]--  describe "explain" $ do-    forM_-      ["--morph", "--dataize", "--contextualize"]-      ( \judgment ->-          it ("refuses --normalize together with " ++ judgment) $-            testCLIFailed ["explain", judgment, "--normalize"] ["The --normalize option cannot be used together with"]-      )--    it "prints help" $-      testCLISucceeded-        ["explain", "--help"]-        ["Explain built-in morphing rules", "Explain built-in dataization rules", "Explain built-in contextualization rules"]--    it "explains single rule" $ do-      latex <- explainPack "test-resources/explain-packs/normalize/copy.yaml"-      testCLISucceeded ["explain", "--rule=resources/normalize/copy.yaml"] [latex <> "\n"]--    it "explains single rule with a label" $-      testCLISucceeded-        ["explain", rule "labeled.yaml"]-        [ unlines-            [ "\\phinoNormalizationRule[\\lambda]{copy}"-            , "  { [[ B_1, \\tau -> ?, B_2 ]] ( \\tau -> k ) }"-            , "  { [[ B_1, \\tau -> k, B_2 ]] }"-            , "  { }"-            , "  { }"-            ]-        ]--    it "explains multiple rules" $-      testCLISucceeded-        ["explain", "--rule=resources/normalize/copy.yaml", "--rule=resources/normalize/alpha.yaml"]-        ["\\phinoNormalizationRule{copy}", "\\phinoNormalizationRule{alpha}"]--    it "reproduces the same shuffle order for the same --seed" $ do-      let args =-            [ "explain"-            , "--shuffle"-            , "--seed=42"-            , rule "swap-a.yaml"-            , rule "swap-b.yaml"-            ]-      (firstRun, _) <- withStdout (runCLI args)-      (secondRun, _) <- withStdout (runCLI args)-      firstRun `shouldBe` secondRun--    it "shuffles the normalization rules away from their file order" $ do-      (plain, _) <- withStdout (runCLI ["explain", "--normalize"])-      (mixed, _) <- withStdout (runCLI ["explain", "--normalize", "--shuffle", "--seed=1"])-      mixed `shouldNotBe` plain--    it "accepts --seed flag" $-      testCLISucceeded-        ["explain", "--seed=7", "--normalize"]-        ["\\phinoNormalizationRule{alpha}"]--    forM_-      [ ("normalization", "--normalize", "normalize")-      , ("morphing", "--morph", "morphing")-      , ("dataization", "--dataize", "dataization")-      , ("contextualization", "--contextualize", "contextualization")-      ]-      ( \(judgment, option, dir) -> it ("explains " <> judgment <> " rules") $ do-          packs <- allPathsIn ("test-resources/explain-packs" </> dir)-          latex <- mapM explainPack (sort packs)-          testCLISucceeded ["explain", option] [unlines latex]-      )--    it "fails with no rules specified" $-      testCLIFailed-        ["explain"]-        ["Either --rule, --normalize, --morph, --dataize or --contextualize must be specified"]--    it "fails when more than one rule set is specified" $-      testCLIFailed-        ["explain", "--morph", "--dataize"]-        ["Only one of --morph, --dataize or --contextualize can be specified"]--    it "allows --normalize together with --rule" $-      testCLISucceeded-        ["explain", "--normalize", "--rule=resources/normalize/copy.yaml"]-        ["\\phinoNormalizationRule{copy}"]--    it "allows --shuffle together with --morph" $-      testCLISucceeded-        ["explain", "--morph", "--shuffle"]-        ["\\begin{phinoMorphingInference}"]--    it "writes to target file" $-      bracket-        ( do-            tmp <- getTemporaryDirectory-            stamp <- getPOSIXTime-            let dir = tmp </> ("phino-test-" ++ show (floor stamp :: Integer))-            createDirectoryIfMissing True dir-            pure (dir </> "explain.tex", dir)-        )-        (\(_, dir) -> removeDirectoryRecursive dir)-        ( \(path, _) -> do-            testCLISucceeded ["explain", "--normalize", printf "--target=%s" path] []-            content <- readFile path-            _ <- evaluate (length content)-            content `shouldContain` "\\phinoNormalizationRule{alpha}"+import Data.List (intercalate, isInfixOf, isPrefixOf, isSuffixOf, sort)+import Data.Text qualified as T+import Data.Time.Clock (addUTCTime, getCurrentTime)+import Data.Time.Clock.POSIX (getPOSIXTime)+import Data.Version (showVersion)+import Files (allPathsIn)+import Fixtures (explainPack, lambdasFile, loopingLambdas, readProtocol, readUtf8, recording, withLambdasOf)+import GHC.IO.Encoding (TextEncoding (textEncodingName), getFileSystemEncoding)+import GHC.IO.Handle+import Paths_phino (version)+import System.Directory (createDirectoryIfMissing, doesDirectoryExist, doesFileExist, getTemporaryDirectory, listDirectory, makeAbsolute, removeDirectoryRecursive, removeFile, removePathForcibly, setModificationTime, withCurrentDirectory)+import System.Exit (ExitCode (ExitFailure))+import System.FilePath (takeFileName, (</>))+import System.IO+import System.Timeout (timeout)+import Test.Hspec+import Text.Printf (printf)+import Text.XML qualified as X++withStdin :: String -> IO a -> IO a+withStdin input action =+  bracket (openTempFile "." "stdinXXXXXX.tmp") cleanup $ \(filePath, h) -> do+    hSetEncoding h utf8+    hPutStr h input+    hFlush h+    hClose h+    withFile filePath ReadMode $ \hIn -> do+      hSetEncoding hIn utf8+      bracket (hDuplicate stdin) restoreStdin $ \_ -> do+        hDuplicateTo hIn stdin+        hSetEncoding stdin utf8+        action+  where+    restoreStdin orig = hDuplicateTo orig stdin >> hClose orig+    cleanup (fp, _) = removeFile fp++withStdout :: IO a -> IO (String, a)+withStdout action =+  bracket+    (openTempFile "." "stdoutXXXXXX.tmp")+    cleanup+    ( \(path, hTmp) -> do+        hSetEncoding hTmp utf8+        oldOut <- hDuplicate stdout+        oldErr <- hDuplicate stderr+        hDuplicateTo hTmp stdout+        hDuplicateTo hTmp stderr++        result <-+          action `finally` do+            hFlush stdout+            hFlush stderr+            hDuplicateTo oldOut stdout >> hClose oldOut+            hDuplicateTo oldErr stderr >> hClose oldErr+            hClose hTmp++        captured <- readFile path+        _ <- evaluate (length captured)+        return (captured, result)+    )+  where+    cleanup (fp, _) = removeFile fp++withTempFile :: String -> ((FilePath, Handle) -> IO a) -> IO a+withTempFile pattern =+  bracket+    (openTempFile "." pattern)+    (\(path, _) -> removeFile path)++withTempFileContent :: String -> String -> (FilePath -> IO a) -> IO a+withTempFileContent pattern content action =+  withTempFile pattern $ \(path, h) -> do+    hPutStr h content+    hClose h+    action path++withTempDirectory :: String -> (FilePath -> IO a) -> IO a+withTempDirectory prefix action = do+  tmp <- getTemporaryDirectory+  stamp <- getPOSIXTime+  let dir = tmp </> (prefix ++ "-" ++ show (round (stamp * 1000000) :: Integer))+  bracket (pure dir) removedEventually action+  where+    removedEventually :: FilePath -> IO ()+    removedEventually = retrying (10 :: Int)+      where+        retrying 0 dir = removePathForcibly dir+        retrying left dir = removePathForcibly dir `catch` \(_ :: IOException) -> threadDelay 200000 >> retrying (left - 1) dir++testCLI' :: [String] -> [String] -> Either ExitCode () -> Expectation+testCLI' args outputs exit = do+  (out, result) <- withStdout (try (runCLI args) :: IO (Either ExitCode ()))+  if null outputs+    then+      unless (null out) $+        expectationFailure ("Expected that output is empty, but got:\n" ++ out)+    else+      forM_+        outputs+        ( \output ->+            unless (output `isInfixOf` out) $+              expectationFailure+                ("Expected that output contains:\n" ++ output ++ "\nbut got:\n" ++ out)+        )+  result `shouldBe` exit++testCLISucceeded :: [String] -> [String] -> Expectation+testCLISucceeded args outputs = testCLI' args outputs (Right ())++symbolic :: String+symbolic = "--symbolic=" ++ lambdasFile++testCLIFailed :: [String] -> [String] -> Expectation+testCLIFailed args outputs = testCLI' args outputs (Left (ExitFailure 1))++resource :: String -> String+resource file = "test-resources/cli/expressions/" <> file++rule :: String -> String+rule file = "--rule=test-resources/cli/rules/" <> file++spec :: Spec+spec = do+  describe "regex execution limits" $ do+    forM_+      [ ("matches", ["  matches: ['^(a|b)*$', '!e1']"])+      , ("or", ["  or:", "    - matches: ['^(a|b)*$', '!e1']", "    - eq: [1, 1]"])+      ]+      ( \(desc, condition) ->+          it ("fails normally when a " ++ desc ++ " condition exceeds the recursion limit") $+            withTempFileContent+              "regex-limit.yaml"+              ( unlines+                  ( [ "name: mt"+                    , "pattern: '[[ x -> !e1 ]]'"+                    , "result: '[[ y -> !e1 ]]'"+                    , "when:"+                    ]+                      ++ condition+                  )+              )+              ( \path ->+                  withStdin ("[[ x -> \"" ++ replicate 9000 'a' ++ "\" ]]") $+                    testCLIFailed ["rewrite", "--sweet", "--rule=" ++ path] ["Regex execution failed:"]+              )+      )++    forM_ ["(a|b)*", "(ab)+"] $ \pattern ->+      forM_ ["", "g"] $ \flag ->+        it ("fails normally when sed exceeds the recursion limit with " ++ pattern ++ " and flag '" ++ flag ++ "'") $+          withTempFileContent+            "regex-limit.yaml"+            ( unlines+                [ "name: sed-limit"+                , "pattern: '[[ x -> !e1 ]]'"+                , "result: '[[ y -> !e2 ]]'"+                , "where:"+                , "  - meta: '!e2'"+                , "    function: sed"+                , "    args: ['!e1', '\"s/" ++ pattern ++ "/X/" ++ flag ++ "\"']"+                ]+            )+            ( \path ->+                withStdin ("[[ x -> \"" ++ concat (replicate 10000 "ab") ++ "\" ]]") $+                  testCLIFailed ["rewrite", "--sweet", "--rule=" ++ path] ["Regex execution failed:"]+            )++  it "prints version" $+    testCLISucceeded ["--version"] [showVersion version]++  it "prints help" $+    testCLISucceeded+      ["--help"]+      ["Phino - CLI Manipulator of 𝜑-Calculus Expressions", "Usage:"]++  describe "--pin" $+    forM_+      [+        ( "succeeds when --pin matches actual version"+        , ["--pin=" ++ showVersion version, "rewrite", "--sweet"]+        , testCLISucceeded+        , ["⟦⟧"]+        )+      ,+        ( "fails when --pin doesn't match actual version"+        , ["--pin=9.9.9.9", "rewrite"]+        , testCLIFailed+        , ["Version mismatch: --pin requires '9.9.9.9', but this is phino " ++ showVersion version]+        )+      ,+        ( "fails when --pin is empty"+        , ["--pin=", "rewrite"]+        , testCLIFailed+        , ["Version mismatch: --pin requires ''"]+        )+      ]+      (\(desc, args, test, expected) -> it desc (withStdin "[[ ]]" (test args expected)))++  describe "--pin-file" $+    forM_+      [+        ( "succeeds when --pin-file holds actual version among spaces"+        , Just ("  \n" ++ showVersion version ++ " \t\n\n")+        , testCLISucceeded+        , ["⟦⟧"]+        )+      ,+        ( "fails when --pin-file holds another version"+        , Just "7.3.0.41\n"+        , testCLIFailed+        , ["Version mismatch: --pin requires '7.3.0.41', but this is phino " ++ showVersion version]+        )+      ,+        ( "fails when --pin-file is empty"+        , Just " \n"+        , testCLIFailed+        , ["Version mismatch: --pin requires ''"]+        )+      ,+        ( "fails when --pin-file is absent"+        , Nothing+        , testCLIFailed+        , ["does not exist"]+        )+      ]+      ( \(desc, content, test, expected) ->+          it desc $+            withTempDirectory "phino-pin-file" $ \dir -> do+              createDirectoryIfMissing True dir+              let file = dir </> "vérsion.txt"+              forM_ content (writeFile file)+              withStdin "[[ ]]" (test ["--pin-file=" ++ file, "rewrite", "--sweet"] expected)+      )++  it "fails when both --pin and --pin-file are given" $+    withTempFileContent "pin-versionXXXXXX.txt" (showVersion version ++ "\n") $ \file ->+      withStdin "[[ ]]" $+        testCLIFailed+          ["--pin=" ++ showVersion version, "--pin-file=" ++ file, "rewrite"]+          ["[ERROR]: Invalid option `--pin-file=" ++ file ++ "'"]++  describe "--cheat" $ do+    it "drops a ρ applied to a term that already ends with one" $+      withStdin "[[ a -> Q.x(^ -> [[ ]]), b -> [[ ]] ]].a" $+        testCLISucceeded ["rewrite", "--normalize", "--flat", "--sweet", "--cheat"] ["Φ.x( ρ ↦ ⟦⟧ )"]+    it "keeps every ρ the rules prescribe without it" $+      withStdin "[[ a -> Q.x(^ -> [[ ]]), b -> [[ ]] ]].a" $+        testCLISucceeded ["rewrite", "--normalize", "--flat", "--sweet"] ["Φ.x( ρ ↦ ⟦⟧, ρ ↦ ⟦ a ↦ Φ.x( ρ ↦ ⟦⟧ ), b ↦ ⟦⟧ ⟧ )"]+    it "keeps the terms of nested forks small while dataizing" $+      withTempFileContent "cheat-atomsXXXXXX.yaml" "- λ: L_eq\n  𝑛: '⟦ if ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ⟧'\n- λ: L_fork\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    'on': $.on🌵\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n" $ \atoms ->+        withStdin "[[ eq -> L_eq:λ, false -> [[ if(left, right) -> right:φ ]], entry -> [[ φ -> s.if(left -> s, right -> s), s -> Q.outer ]], outer -> [[ φ -> h.if(left -> Q.good, right -> h), h -> Q.inner ]], good -> [[ φ -> Q.eq, text -> [[ D> 00- ]] ]], inner -> Q.eq.if(left -> Q.false, right -> Q.eq.if(left -> Q.false, right -> Q.good)), e1 -> Q.entry.text ]]" $+          testCLISucceeded ["dataize", "--cheat", "--acyclic=plausible", "--max-loops=2", "--max-nodes=5000", "--locator=Q.e1", "--symbolic=" ++ atoms] ["00-"]+    it "lets the terms of nested forks grow while dataizing without it" $+      withTempFileContent "cheat-atomsXXXXXX.yaml" "- λ: L_eq\n  𝑛: '⟦ if ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ⟧'\n- λ: L_fork\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    'on': $.on🌵\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n" $ \atoms ->+        withStdin "[[ eq -> L_eq:λ, false -> [[ if(left, right) -> right:φ ]], entry -> [[ φ -> s.if(left -> s, right -> s), s -> Q.outer ]], outer -> [[ φ -> h.if(left -> Q.good, right -> h), h -> Q.inner ]], good -> [[ φ -> Q.eq, text -> [[ D> 00- ]] ]], inner -> Q.eq.if(left -> Q.false, right -> Q.eq.if(left -> Q.false, right -> Q.good)), e1 -> Q.entry.text ]]" $+          testCLIFailed ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-nodes=5000", "--locator=Q.e1", "--symbolic=" ++ atoms] ["--max-nodes=5000"]++  describe "--hide-rho" $+    forM_+      [+        ( "drops every rho binding from the default salty output"+        , "[[ foo -> [[ x -> [[ ]], ^ -> $.y ]], y -> [[ ]] ]]"+        , ["rewrite", "--flat", "--hide-rho"]+        , ["⟦ foo ↦ ⟦ x ↦ ⟦⟧ ⟧, y ↦ ⟦⟧ ⟧"]+        )+      ,+        ( "also drops the rho that --sweet leaves behind"+        , "[[ foo -> [[ x -> [[ ]], ^ -> $.y ]], y -> [[ ]] ]]"+        , ["rewrite", "--flat", "--sweet", "--hide-rho"]+        , ["⟦ foo ↦ ⟦⟧:x, y ↦ ⟦⟧ ⟧"]+        )+      ,+        ( "keeps sweet numeric literals intact"+        , "[[ a -> 42 ]]"+        , ["rewrite", "--flat", "--sweet", "--hide-rho"]+        , ["42.0:a"]+        )+      ,+        ( "keeps the one-binding sugar after inline voids"+        , "[[ x(y) -> [[ a -> 42, ^ -> ? ]] ]]"+        , ["rewrite", "--flat", "--sweet", "--hide-rho"]+        , ["⟦ x(y) ↦ 42.0:a ⟧"]+        )+      ,+        ( "prints a lone void as the term without the rho would be printed"+        , "⟦ a ↦ ⟦ x ↦ ⟦ ρ ↦ ξ, y ↦ ∅ ⟧ ⟧ ⟧"+        , ["rewrite", "--sweet", "--hide-rho"]+        , ["⟦ x(y) ↦ ⟦⟧ ⟧:a"]+        )+      ,+        ( "indents the body as the term without the rho would be indented"+        , "⟦ a ↦ ⟦ x ↦ ⟦ ρ ↦ ∅, b ↦ ⟦ c ↦ ∅, ρ ↦ ∅ ⟧ ⟧ ⟧ ⟧"+        , ["rewrite", "--sweet", "--hide-rho", "--margin=3"]+        , ["⟦\n  b(c) ↦ ⟦⟧\n⟧:x:a"]+        )+      ,+        ( "prints the other arguments once the rho is gone"+        , "⟦ a ↦ ξ.b(ρ ↦ ξ, k ↦ ξ.c, m ↦ ξ.d) ⟧"+        , ["rewrite", "--flat", "--sweet", "--hide-rho"]+        , ["b( k ↦ c, m ↦ d ):a"]+        )+      ,+        ( "drops the rho from the LaTeX output too"+        , "[[ n -> [[ ^ -> ?, k -> $ ]] ]]"+        , ["rewrite", "--flat", "--hide-rho", "--output=latex"]+        , ["[[ |n| -> [[ |k| -> \\phiTerminal{\\xi} ]] ]]"]+        )+      ,+        ( "drops the rho argument of a number literal from the LaTeX output"+        , "42(ρ ↦ ξ)"+        , ["rewrite", "--flat", "--hide-rho", "--output=latex"]+        , ["Q . |number| ( @ -> Q . |bytes| ( @ -> [[ D> |40-45-00-00-00-00-00-00| ]] ) ){.}"]+        )+      ,+        ( "drops only the rho argument of a string literal from the LaTeX output"+        , "\"s\"(ρ ↦ ⊥, b ↦ Φ)"+        , ["rewrite", "--flat", "--hide-rho", "--output=latex"]+        , ["Q . |string| ( @ -> Q . |bytes| ( @ -> [[ D> |73-| ]] ) ) ( |b| -> Q ){.}"]+        )+      ,+        ( "drops the rho argument of a non-finite literal from the LaTeX output"+        , "Φ.nan(ρ ↦ ξ)"+        , ["rewrite", "--flat", "--hide-rho", "--output=latex"]+        , ["Q . |number| ( @ -> Q . |bytes| ( @ -> [[ D> |7F-F8-00-00-00-00-00-00| ]] ) ){.}"]+        )+      ]+      (\(desc, input, args, expected) -> it desc (withStdin input (testCLISucceeded args expected)))++  it "keeps a data literal sugared when it is applied to more arguments" $+    withStdin "⟦ i ↦ 42(z ↦ ξ.f), s ↦ \"Hello\"(z ↦ ξ.f) ⟧" $+      testCLISucceeded ["rewrite", "--sweet", "--flat"] ["⟦ i ↦ 42.0( z ↦ f ), s ↦ \"Hello\"( z ↦ f ) ⟧"]++  it "prints the one-binding sugar after inline voids with --sweet" $+    withStdin "[[ x(y) -> [[ a -> 42 ]] ]]" $+      testCLISucceeded ["rewrite", "--sweet"] ["⟦ x(y) ↦ 42.0:a ⟧"]++  it "prints debug info with --log-level=DEBUG" $+    withStdin "[[]]" $+      testCLISucceeded ["rewrite", "--log-level=DEBUG"] ["[DEBUG]:"]++  describe "--log-level accepts every named level" $+    forM_+      ["INFO", "info", "ERROR", "ERR", "error", "NONE", "none"]+      ( \flagValue ->+          it ("--log-level=" ++ flagValue) $+            withStdin "[[]]" $+              testCLISucceeded ["rewrite", "--log-level=" ++ flagValue] ["⟧"]+      )++  describe "--log-level prints nothing below its level" $+    forM_+      [("NONE", ["[DEBUG]", "[INFO]"]), ("ERROR", ["[DEBUG]", "[INFO]"]), ("INFO", ["[DEBUG]"])]+      ( \(level, hidden) ->+          it ("--log-level=" ++ level) $+            withStdin "[[]]" $ do+              (out, _) <- withStdout (try (runCLI ["rewrite", "--log-level=" ++ level]) :: IO (Either ExitCode ()))+              forM_ hidden (out `shouldNotContain`)+      )++  it "fails on an unrecognized --log-level value" $+    withStdin "[[]]" $+      testCLIFailed ["rewrite", "--log-level=verbose"] ["unknown log-level: verbose"]++  describe "rewriting" $ do+    let xmir =+          unlines+            [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+            , "<object>"+            , "  <o name=\"bar\">"+            , "    <o base=\"∅\" name=\"x\"/>"+            , "  </o>"+            , "</object>"+            ]+    describe "fails" $ do+      forM_+        [ ("with --input=latex", "", ["rewrite", "--input=latex"], ["The value 'latex' can't be used for '--input' option"])+        , ("with negative --log-lines", "", ["rewrite", "--log-lines=-2"], ["--log-lines must be >= -1"])+        , ("with negative --max-depth", "", ["rewrite", "--max-depth=-1"], ["--max-depth must be positive"])+        , ("with zero --max-cycles", "", ["rewrite", "--max-cycles=0"], ["--max-cycles must be positive"])+        , ("with zero --meet-length", "", ["rewrite", "--output=latex", "--meet-length=0"], ["--meet-length must be positive"])+        , ("with a --max-cycles value above maxBound Int", "", ["rewrite", "--max-cycles=18446744073709551617"], ["value must be between", "9223372036854775807"])+        ,+          ( "with --normalize and --must=1"+          , "[[ x -> [[ y -> 5 ]].y ]].x"+          , ["rewrite", "--max-cycles=2", "--max-depth=1", "--normalize", "--must=1"]+          , ["it's expected rewriting cycles to be in range [1], but rewriting has already reached 2"]+          )+        , ("when --in-place is used without input file", "[[ ]]", ["rewrite", "--in-place"], ["--in-place requires an input file"])+        ]+        (\(desc, input, args, expected) -> it desc (withStdin input (testCLIFailed args expected)))++      it "when --in-place is used with --target" $+        withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do+          hPutStr h "[[ ]]"+          hClose h+          testCLIFailed+            ["rewrite", "--in-place", "--target=output.phi", path]+            ["--in-place and --target cannot be used together"]++      it "fails when --in-place is used with a non-phi output format" $+        withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do+          hPutStr h "[[ ]]"+          hClose h+          testCLIFailed+            ["rewrite", "--in-place", "--output=latex", path]+            ["The option --in-place requires the output format to match the input format"]++      it "requires an XMIR input to be written back as XMIR" $+        withTempFileContent "inplaceXXXXXX.xmir" xmir $ \path ->+          testCLIFailed+            ["rewrite", "--input=xmir", "--in-place", path]+            ["The option --in-place requires the output format to match the input format"]++      it "does not leak a HasCallStack backtrace into errors" $ do+        (out, _) <- withStdout (try (runCLI ["rewrite", "--in-place"]) :: IO (Either ExitCode ()))+        out `shouldNotContain` "HasCallStack backtrace"+        out `shouldNotContain` "ExitFailure 1"+        out `shouldContain` "[ERROR]:"++      it "prints optparse errors once, without a backtrace" $ do+        (out, _) <- withStdout (try (runCLI ["rewrite", "--badopt"]) :: IO (Either ExitCode ()))+        out `shouldNotContain` "HasCallStack backtrace"+        out `shouldNotContain` "ExitFailure 1"+        out `shouldContain` "[ERROR]:"++      forM_+        [ ("when --update is used without --target", "[[ ]]", ["rewrite", "--update"], ["--update requires --target"])+        ,+          ( "when --update is used without an input file"+          , "[[ ]]"+          , ["rewrite", "--update", "--target=output.phi"]+          , ["--update requires an input file"]+          )+        ,+          ( "when --sequence is used with --in-place"+          , "[[ ]]"+          , ["rewrite", "--sequence", "--in-place", "input.phi"]+          , ["--in-place and --sequence cannot be used together"]+          )+        ,+          ( "when --focus is used with --in-place"+          , "[[ ]]"+          , ["rewrite", "--focus=Q.y", "--in-place", "input.phi"]+          , ["--in-place and --focus cannot be used together"]+          )+        ,+          ( "when --show is used with --in-place"+          , "[[ ]]"+          , ["rewrite", "--show=Q.y", "--in-place", "input.phi"]+          , ["--in-place and --show cannot be used together"]+          )+        ,+          ( "when --update is used with --in-place"+          , "[[ ]]"+          , ["rewrite", "--update", "--in-place", "input.phi"]+          , ["--update and --in-place cannot be used together"]+          )+        ,+          ( "when --hide is used with --in-place"+          , "[[ ]]"+          , ["rewrite", "--hide=Q.y", "--in-place", "input.phi"]+          , ["--in-place and --hide cannot be used together"]+          )+        ,+          ( "when --hide-rho is used with --in-place"+          , "[[ ]]"+          , ["rewrite", "--hide-rho", "--in-place", "input.phi"]+          , ["--in-place and --hide-rho cannot be used together"]+          )+        ,+          ( "with --depth-sensitive"+          , "[[ x -> \"x\"]]"+          , ["rewrite", "--depth-sensitive", "--max-depth=1", "--max-cycles=1", rule "infinite.yaml"]+          , ["[ERROR]: With option --depth-sensitive it's expected rewriting iterations amount does not reach the limit: --max-depth=1"]+          )+        ,+          ( "with looping rules"+          , "[[ x -> \"0\" ]]"+          , ["rewrite", rule "first.yaml", rule "second.yaml", "--max-depth=1", "--max-cycles=3"]+          , ["it seems rewriting is looping"]+          )+        ]+        (\(desc, input, args, expected) -> it desc (withStdin input (testCLIFailed args expected)))++      it "with wrong attribute and valid error message" $+        testCLIFailed+          ["rewrite", resource "with-$this-attribute.phi"]+          [ "[ERROR]: Couldn't parse given phi expression, cause:"+          , "unexpected"+          ]++      forM_+        [+          ( "with --output != latex and --nonumber"+          , ["rewrite", "--nonumber", "--output=xmir"]+          , ["The --nonumber option can stay together with --output=latex only"]+          )+        , ("with --omit-listing and --output != xmir", ["rewrite", "--omit-listing", "--output=phi"], ["--omit-listing"])+        , ("with --omit-comments and --output != xmir", ["rewrite", "--omit-comments", "--output=phi"], ["--omit-comments"])+        ,+          ( "with --expression and --output != latex"+          , ["rewrite", "--expression=foo", "--output=phi"]+          , ["--expression option can stay together with --output=latex only"]+          )+        ,+          ( "with --label and --output != latex"+          , ["rewrite", "--label=foo", "--output=phi"]+          , ["--label option can stay together with --output=latex only"]+          )+        ,+          ( "with a '%' in --meet-prefix and --output=latex"+          , ["rewrite", "--meet-prefix=a%b", "--output=latex"]+          , ["The --meet-prefix option must contain only letters, numbers, colons, periods, underscores, and hyphens"]+          )+        ,+          ( "with a '}' in --meet-prefix and --output=latex"+          , ["rewrite", "--meet-prefix=a}b", "--output=latex"]+          , ["The --meet-prefix option must contain only letters, numbers, colons, periods, underscores, and hyphens"]+          )+        ,+          ( "with an unsafe --label and --output=latex"+          , ["rewrite", "--label=eq:bad%tag", "--output=latex"]+          , ["The --label option must contain only letters, numbers, colons, periods, underscores, and hyphens"]+          )+        ,+          ( "with --compress and --output != latex"+          , ["rewrite", "--compress", "--output=phi"]+          , ["--compress option can stay together with --output=latex only"]+          )+        ,+          ( "with --meet-prefix and --output != latex"+          , ["rewrite", "--meet-prefix=foo", "--output=phi"]+          , ["--meet-prefix option can stay together with --output=latex only"]+          )+        ,+          ( "with wrong --hide option"+          , ["rewrite", "--hide=Q.x(k -> Q.y)"]+          , ["[ERROR]: Invalid set of arguments: Only dispatch expression", "but given: Φ.x( k ↦ Φ.y )"]+          )+        , ("with many --show options", ["rewrite", "--show=Q.x.y", "--show=hello"], ["The option --show can be used only once"])+        ,+          ( "with wrong --show option"+          , ["rewrite", "--show=Q.x(k -> Q.y)"]+          , ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --show"]+          )+        , ("with --show overlapping --hide", ["rewrite", "--show=Q.x", "--hide=Q.x"], ["[ERROR]:", "The --show locator 'Φ.x' is also listed in --hide"])+        , ("with --hide of an ancestor of --show", ["rewrite", "--show=Q.y.z", "--hide=Q.y"], ["[ERROR]:", "The --show locator 'Φ.y.z' lies inside the --hide locator 'Φ.y'"])+        , ("with --meet-popularity < 0", ["rewrite", "--meet-popularity=-1"], ["[ERROR]:", "--meet-popularity must be positive"])+        , ("with --meet-popularity > 100", ["rewrite", "--meet-popularity=102"], ["[ERROR]:", "--meet-popularity must be <= 100"])+        ,+          ( "with --meet-popularity and output != latex"+          , ["rewrite", "--meet-popularity=51", "--output=phi"]+          , ["[ERROR]:", "--meet-popularity option can stay together with --output=latex only"]+          )+        ,+          ( "with --meet-length and output != latex"+          , ["rewrite", "--meet-length=4", "--output=phi"]+          , ["[ERROR]:", "--meet-length option can stay together with --output=latex only"]+          )+        ,+          ( "with non-dispatch --focus"+          , ["rewrite", "--focus=Q.x(k -> Q.y)"]+          , ["Invalid set of arguments: Only dispatch expression started with Φ (or Q) can be used in --focus, but given: Φ.x( k ↦ Φ.y )"]+          )+        , ("with --focus!=Q and --output=XMIR", ["rewrite", "--focus=Q.x", "--output=xmir"], ["Only --focus=Q is allowed to be used with --output=xmir"])+        , ("with --margin < 0", ["rewrite", "--margin=-1"], ["--margin must be positive"])+        ,+          ( "with --breakpoint which does not exist across the rules"+          , ["rewrite", "--breakpoint=hello", "--normalize"]+          , ["The rule 'hello' provided in '--breakpoint' option is absent across given rewriting rules: copy"]+          )+        ]+        (\(desc, args, expected) -> it desc (withStdin "[[ x -> 5 ]]" (testCLIFailed args expected)))++    it "prints help" $+      testCLISucceeded+        ["rewrite", "--help"]+        ["Rewrite the 𝜑-expression", "--seed SEED"]++    it "accepts --seed flag" $+      withStdin "[[ x -> 5 ]]" $+        testCLISucceeded+          ["rewrite", "--seed=42", "--sweet"]+          ["5.0:x"]++    it "defaults --seed to 0 in help" $+      testCLISucceeded+        ["rewrite", "--help"]+        ["default: 0"]++    it "describes --must as counting rewriting cycles, not rules applied" $+      testCLISucceeded+        ["rewrite", "--help"]+        ["Stops execution if number of rewriting cycles is not"]++    it "reproduces the same shuffle order for the same --seed" $ do+      let args =+            [ "rewrite"+            , "--shuffle"+            , "--seed=42"+            , "--sweet"+            , "--sequence"+            , "--max-depth=1"+            , "--max-cycles=1"+            , rule "swap-a.yaml"+            , rule "swap-b.yaml"+            ]+      (firstRun, _) <- withStdin "[[ x -> 5 ]]" $ withStdout (runCLI args)+      (secondRun, _) <- withStdin "[[ x -> 5 ]]" $ withStdout (runCLI args)+      firstRun `shouldBe` secondRun++    it "shuffles the rules away from their file order" $ do+      let base =+            [ "--sweet"+            , "--sequence"+            , "--max-depth=1"+            , "--max-cycles=1"+            , rule "swap-a.yaml"+            , rule "swap-b.yaml"+            ]+      (plain, _) <- withStdin "[[ x -> 5 ]]" $ withStdout (runCLI ("rewrite" : base))+      (mixed, _) <- withStdin "[[ x -> 5 ]]" $ withStdout (runCLI ("rewrite" : "--shuffle" : "--seed=1" : base))+      mixed `shouldNotBe` plain++    it "fails with a non-integer --seed" $+      withStdin "[[ ]]" $+        testCLIFailed+          ["rewrite", "--seed=abc"]+          ["[ERROR]"]++    it "refuses a --seed outside the Int range" $+      withStdin "[[ ]]" $+        testCLIFailed+          ["rewrite", "--seed=18446744073709551616"]+          ["value must be between"]++    it "refuses a non-positive --abridged width" $+      withStdin "[[ t -> 01- ]]" $+        testCLIFailed+          ["dataize", "--locator=Q.t", "--protocol=p.txt", "--abridged=0"]+          ["--abridged must be positive"]++    it "saves steps to dir with --steps-dir" $+      withTempDirectory "phino-steps" $ \dir ->+        withStdin "[[ x -> \"hello\"]]" $ do+          testCLISucceeded+            ["rewrite", rule "infinite.yaml", "--max-cycles=2", "--max-depth=2", "--steps-dir=" ++ dir, "--sweet"]+            ["hello_hi_hi"]+          doesDirectoryExist dir `shouldReturn` True+          files <- listDirectory dir+          length files `shouldBe` 4+          doesFileExist (dir ++ "/00001.phi") `shouldReturn` True+          doesFileExist (dir ++ "/00003.phi") `shouldReturn` True++    it "clears step files left from an earlier, longer run with --steps-dir" $+      withTempDirectory "phino-steps-stale" $ \dir -> do+        withStdin "[[ x -> \"hello\"]]" $+          testCLISucceeded+            ["rewrite", rule "infinite.yaml", "--max-cycles=2", "--max-depth=2", "--steps-dir=" ++ dir, "--sweet"]+            ["hello_hi_hi"]+        files <- listDirectory dir+        length files `shouldBe` 4+        withStdin "[[ x -> \"hello\"]]" $+          testCLISucceeded+            ["rewrite", rule "infinite.yaml", "--max-cycles=1", "--max-depth=2", "--steps-dir=" ++ dir, "--sweet"]+            ["hello_hi"]+        files2 <- listDirectory dir+        sort files2 `shouldBe` ["00001.phi", "00002.phi"]++    it "gives the saved steps the --canonize and --hide of the printed ones" $+      withTempDirectory "phino-steps-filtered" $ \dir ->+        withStdin "[[ m -> [[ x -> [[ L> Plus ]], y -> $.x ]].y, k -> [[ L> Minus ]] ]]" $ do+          testCLISucceeded+            ["rewrite", "--normalize", "--hide=Q.k", "--canonize", "--steps-dir=" ++ dir, "--flat"]+            ["Fn1"]+          files <- listDirectory dir+          null files `shouldBe` False+          saved <- mapM (\file -> readFile (dir ++ "/" ++ file)) files+          concat saved `shouldNotContain` "Minus"+          concat saved `shouldNotContain` "Plus"++    it "keeps the name a function has under --sequence in every --steps-dir file under --canonize" $+      withTempDirectory "phino-steps-canonized" $ \dir ->+        withStdin "[[ a -> [[ x -> [[ L> Fa ]] ]].q, b -> [[ y -> [[ L> Fb ]] ]].y ]]" $ do+          testCLISucceeded+            ["rewrite", "--normalize", "--sequence", "--canonize", "--flat", "--steps-dir=" ++ dir]+            ["⟦ a ↦ ⊥, b ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧"]+          saved <- traverse (readUtf8 . (dir </>)) ["00001.phi", "00002.phi", "00003.phi"]+          map (filter (/= '\n')) saved+            `shouldBe` [ "⟦ a ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧ ⟧.q, b ↦ ⟦ λ ⤍ Fn2 ⟧( ρ ↦ ⟦ y ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧ ) ⟧"+                       , "⟦ a ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧ ⟧.q, b ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧"+                       , "⟦ a ↦ ⊥, b ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧"+                       ]++    it "saves the --canonize steps when --show names an object only the steps hold" $+      withTempDirectory "phino-steps-shown" $ \dir ->+        withStdin "[[ app -> [[ x -> [[ L> Fx ]] ]](^ -> [[ ]]) ]]" $ do+          testCLISucceeded+            ["rewrite", "--normalize", "--canonize", "--flat", "--show=Q.app.x", "--steps-dir=" ++ dir]+            ["⟦ app ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧ ⟧ ⟧"]+          saved <- readUtf8 (dir </> "00001.phi")+          filter (/= '\n') saved `shouldBe` "⟦ app ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧ ⟧ ⟧"++    it "gives the saved steps the --focus of the printed ones" $+      withTempDirectory "phino-steps-focused" $ \dir ->+        withStdin "⟦ x ↦ ⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧ ⟧.k, y ↦ ⟦ z ↦ ⟦⟧ ⟧ ⟧" $ do+          testCLISucceeded+            ["rewrite", "--normalize", "--sweet", "--flat", "--focus=Q.y", "--sequence", "--steps-dir=" ++ dir]+            ["⟦⟧:z"]+          files <- listDirectory dir+          null files `shouldBe` False+          saved <- mapM (\file -> readFile (dir ++ "/" ++ file)) (sort files)+          map (filter (/= '\n')) saved `shouldSatisfy` all (== "⟦⟧:z")++    it "saves dataize steps to dir with --steps-dir" $+      withTempDirectory "phino-steps-dataize" $ \dir ->+        withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6).plus(x -> 7) ]]" $ do+          testCLISucceeded+            ["dataize", symbolic, "--steps-dir=" ++ dir, "--sweet"]+            ["40-45"]+          doesDirectoryExist dir `shouldReturn` True+          files <- listDirectory dir+          let steps = sort files+          steps `shouldBe` map (\n -> printf "%05d.phi" (n :: Int)) [1 .. length steps]+          length steps `shouldSatisfy` (> 18)++    it "saves steps with a .tex extension when --output=latex is used with --steps-dir" $+      withTempDirectory "phino-steps-latex" $ \dir ->+        withStdin "[[ x -> \"hello\"]]" $ do+          testCLISucceeded+            ["rewrite", rule "infinite.yaml", "--max-cycles=2", "--max-depth=2", "--steps-dir=" ++ dir, "--output=latex", "--sweet"]+            ["\\begin{phiquation}"]+          doesDirectoryExist dir `shouldReturn` True+          files <- listDirectory dir+          length files `shouldBe` 4+          doesFileExist (dir ++ "/00001.tex") `shouldReturn` True+          doesFileExist (dir ++ "/00003.tex") `shouldReturn` True++    it "desugares without any rules flag from file" $+      testCLISucceeded+        ["rewrite", resource "desugar.phi"]+        ["⟦ foo ↦ ξ.x ⟧"]++    it "desugares with without any rules flag from stdin" $+      withStdin "[[foo ↦ x]]" $+        testCLISucceeded ["rewrite"] ["⟦ foo ↦ ξ.x ⟧"]++    it "keeps the bytes of a string intact while desugaring it" $+      withStdin "⟦ φ ↦ Φ.string(as-bytes ↦ Φ.bytes(data ↦ ⟦ Δ ⤍ 65-0A-65, ρ ↦ ∅ ⟧)), ρ ↦ ∅ ⟧" $+        testCLISucceeded ["rewrite", "--flat"] ["Δ ⤍ 65-0A-65"]++    it "rewrites with single rule" $+      withStdin "T(x -> Q.y)" $+        testCLISucceeded ["rewrite", "--rule=resources/normalize/dc.yaml"] ["⊥"]++    it "fails when a rewriting rule uses a dataization-only function" $+      withStdin "⟦⟧" $+        testCLIFailed+          ["rewrite", rule "evaluate-in-rewrite.yaml"]+          ["Function 'evaluate' in rule 'uses-evaluate' is available only for dataization and morphing, not for rewriting"]++    forM_+      [ ("kind-tau-to-expression.yaml", "Function 'random-tau' in rule 'tau-to-expression' returns an attribute, but its meta '𝑒2' is an expression")+      , ("kind-size-to-attribute.yaml", "Function 'size' in rule 'size-to-attribute' returns an expression, but its meta '𝜏2' is an attribute")+      , ("kind-dataize-to-expression.yaml", "Function 'dataize' in rule 'dataize-to-expression' returns bytes, but its meta '𝑒2' is an expression")+      ]+      ( \(file, message) ->+          it ("refuses " ++ file ++ " at load time, before the pattern matches") $+            withStdin "⟦ bar ↦ ⟦⟧ ⟧" (testCLIFailed ["rewrite", rule file] [message])+      )++    it "accepts a where step whose function returns the kind of its meta" $+      withStdin "⟦ bar ↦ ⟦⟧ ⟧" (testCLISucceeded ["rewrite", rule "kind-tau-to-attribute.yaml"] ["bar ↦ ⟦⟧"])++    it "names the join function in the error message" $+      withStdin "⟦⟧" $+        testCLIFailed+          ["rewrite", rule "join-broken.yaml"]+          ["Function join() can work with bindings only"]++    it "reports a broken rule file in plain text with its path" $+      withStdin "⟦⟧" $+        testCLIFailed+          ["rewrite", rule "malformed-pattern.yaml"]+          [ "Could not load rule from 'test-resources/cli/rules/malformed-pattern.yaml'"+          , "unexpected '⟧'"+          ]++    it "counts the position of a YAML error from one" $+      withTempFileContent "badruleXXXXXX.yaml" "name: a\npattern: x: y\n" $ \path ->+        withStdin "⟦⟧" $+          testCLIFailed+            ["rewrite", "--rule=" ++ path]+            ["YAML parse exception at line 2, column 11"]++    it "normalizes with --normalize flag" $+      testCLISucceeded+        ["rewrite", "--normalize", resource "normalize.phi", "--margin=25"]+        [ unlines+            [ "⟦"+            , "  x ↦ ⟦"+            , "    ρ ↦ ⟦ y ↦ ⟦ ρ ↦ ∅ ⟧ ⟧"+            , "  ⟧"+            , "⟧"+            ]+        ]++    it "normalizes and applies --rule at the same time" $+      withStdin "⟦ k ↦ ⟦ m ↦ ⟦ Δ ⤍ 01- ⟧ ⟧.m, j ↦ ⟦ λ ⤍ Marker ⟧ ⟧" $+        testCLISucceeded+          ["rewrite", "--normalize", rule "marker.yaml", "--sweet"]+          ["⟦ k ↦ 01-:Δ, j ↦ FF-:Δ ⟧"]++    it "normalizes from stdin" $+      withStdin "⟦ a ↦ ⟦ b ↦ ∅ ⟧ (b ↦ [[ ]]) ⟧" $+        testCLISucceeded+          ["rewrite", "--normalize", "--margin=20"]+          ["⟦ a ↦ ⟦ b ↦ ⟦⟧ ⟧ ⟧"]++    it "rewrites with --sweet flag" $+      withStdin "[[ x -> 5]]" $+        testCLISucceeded+          ["rewrite", "--sweet"]+          ["5.0:x"]++    it "rewrites as XMIR" $+      withStdin "[[ x -> Q.y ]]" $+        testCLISucceeded+          ["rewrite", "--output=xmir"]+          ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<object", "  <o base=\"Φ.y\" name=\"x\"/>"]++    it "accepts --focus=Φ together with --output=xmir, since Φ and Q are the same locator" $+      withStdin "[[ x -> Q.y ]]" $+        testCLISucceeded+          ["rewrite", "--focus=Φ", "--output=xmir"]+          ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<object", "  <o base=\"Φ.y\" name=\"x\"/>"]++    it "rewrites a formation of several bindings at the root as XMIR" $+      withStdin "⟦ x ↦ 1, ρ ↦ 2 ⟧" $+        testCLISucceeded+          ["rewrite", "--output=xmir"]+          ["<o base=\"Φ.number\" name=\"x\">", "<o base=\"Φ.number\" name=\"ρ\">"]++    it "emits a real revision and ms in XMIR" $ do+      (output, _) <- withStdin "[[ x -> Q.y ]]" $ withStdout (runCLI ["rewrite", "--output=xmir"])+      let attrValue :: String -> String -> String+          attrValue name text =+            let needle = name ++ "=\""+                breakOn :: String -> Maybe String+                breakOn haystack+                  | needle `isPrefixOf` haystack = Just (drop (length needle) haystack)+                  | null haystack = Nothing+                  | otherwise = breakOn (drop 1 haystack)+             in case breakOn text of+                  Just afterNeedle -> takeWhile (/= '"') afterNeedle+                  Nothing -> ""+          revision = attrValue "revision" output+          ms = attrValue "ms" output+      revision `shouldSatisfy` (\sha -> length sha == 7 && all (`elem` "0123456789abcdef") sha)+      revision `shouldNotBe` "1234567"+      ms `shouldSatisfy` (all isDigit)++    it "rewrites as LaTeX" $+      withStdin "[[ x_o -> Q.z(y -> 5), q$ -> T, w -> $, ^ -> Q, @ -> 1, y -> \"H$@^M\", L> Fu_nc ]]" $+        testCLISucceeded+          ["rewrite", "--output=latex", "--sweet"]+          [ unlines+              [ "\\begin{phiquation}"+              , "[["+              , "  |x\\char95{}o| -> Q . |z| ( |y| -> |5.0| ),"+              , "  |q\\char36{}| -> T,"+              , "  |w| -> \\phiTerminal{\\xi},"+              , "  \\phiTerminal{\\rho} -> Q,"+              , "  @ -> |1.0|,"+              , "  |y| -> \"H\\char36{}\\char64{}\\char94{}M\","+              , "  L> |Fu\\char95{}nc|"+              , "]]{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "rewrites as LaTeX without numeration" $+      withStdin "[[ x -> 5 ]]" $+        testCLISucceeded+          ["rewrite", "--output=latex", "--sweet", "--nonumber", "--flat"]+          [ unlines+              [ "\\begin{phiquation*}"+              , "|5.0| : |x|{.}"+              , "\\end{phiquation*}"+              ]+          ]++    it "rewrite as LaTeX with expression name" $+      withStdin "[[ x -> 5 ]]" $+        testCLISucceeded+          ["rewrite", "--output=latex", "--sweet", "--flat", "--expression=foo"]+          [ unlines+              [ "\\begin{phiquation}"+              , "\\phiExpression{foo} |5.0| : |x|{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "escapes special characters in the LaTeX expression name" $+      withStdin "[[ x -> 5 ]]" $+        testCLISucceeded+          ["rewrite", "--output=latex", "--sweet", "--flat", "--expression=bad%tag"]+          [ unlines+              [ "\\begin{phiquation}"+              , "\\phiExpression{bad\\char37{}tag} |5.0| : |x|{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "rewrite as LaTeX with label name" $+      withStdin "[[ x -> 5 ]]" $+        testCLISucceeded+          ["rewrite", "--output=latex", "--sweet", "--flat", "--label=foo"]+          [ unlines+              [ "\\begin{phiquation}\n\\label{foo}"+              , "|5.0| : |x|{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "rewrites with XMIR as input" $+      withStdin "<object><o name=\"app\"><o name=\"x\" base=\"Φ.number\"/></o></object>" $+        testCLISucceeded+          ["rewrite", "--input=xmir", "--sweet"]+          ["Φ.number:x:app"]++    it "rewrites and prints with XMIR as input and output" $+      withStdin+        ( intercalate+            ""+            [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+            , "<object><o name=\"app\"><o name=\"x\" base=\"Φ.number\"/></o></object>"+            ]+        )+        ( testCLISucceeded+            ["rewrite", "--input=xmir", "--output=xmir", "--sweet", "--flat"]+            [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+            , "<listing>Φ.number:x:app</listing>"+            ]+        )++    it "rewrites as XMIR with omit-listing flag" $+      withStdin "[[ x -> Q.y ]]" $+        testCLISucceeded+          ["rewrite", "--output=xmir", "--omit-listing"]+          ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<object", "<listing>1 line(s)</listing>", "  <o base=\"Φ.y\" name=\"x\"/>"]++    it "does not fail on exactly 1 rewriting" $+      withStdin "⟦ t ↦ ⟦ x ↦ \"foo\" ⟧ ⟧" $+        testCLISucceeded+          ["rewrite", rule "simple.yaml", "--must=1", "--sweet"]+          ["\"bar\":x"]++    it "prints many expressions with --sequence" $+      withStdin "[[ x -> \"0\" ]]" $+        testCLISucceeded+          [ "rewrite"+          , rule "first.yaml"+          , rule "second.yaml"+          , "--max-depth=1"+          , "--max-cycles=1"+          , "--sequence"+          , "--sweet"+          , "--flat"+          ]+          [ unlines+              [ "\"0\":x"+              , "Φ.x( y ↦ \"1\" )"+              , "\"1\":x"+              ]+          ]++    it "prefixes every step with a header when --headers is on" $+      withStdin "[[ x -> \"0\" ]]" $+        testCLISucceeded+          [ "rewrite"+          , rule "first.yaml"+          , rule "second.yaml"+          , "--max-depth=1"+          , "--max-cycles=1"+          , "--sequence"+          , "--headers"+          , "--sweet"+          , "--flat"+          ]+          [ intercalate+              "\n"+              [ ""+              , "=== Step #1"+              , "\"0\":x"+              , ""+              , "=== Step #2, Rule 'first', 23t -> 26t"+              , "Φ.x( y ↦ \"1\" )"+              , ""+              , "=== Step #3, Rule 'second', 26t -> 23t"+              , "\"1\":x"+              ]+          ]++    it "ignores --headers without --sequence" $+      withStdin "[[ x -> \"foo\" ]]" $+        testCLISucceeded+          ["rewrite", rule "simple.yaml", "--headers", "--sweet", "--flat"]+          ["\"bar\":x"]++    it "emits step headers as LaTeX comments with --headers" $+      withStdin "[[ x -> \"0\" ]]" $+        testCLISucceeded+          [ "rewrite"+          , rule "first.yaml"+          , rule "second.yaml"+          , "--max-depth=1"+          , "--max-cycles=1"+          , "--sequence"+          , "--headers"+          , "--sweet"+          , "--flat"+          , "--output=latex"+          ]+          [ unlines+              [ "\\begin{phiquation}"+              , "% === Step #1"+              , "\"0\" : |x| \\phiNormalize[\\nameref{r:first}]"+              , "% === Step #2, Rule 'first', 23t -> 26t"+              , "  \\phiNormalize Q . |x| ( |y| -> \"1\" ) \\phiNormalize[\\nameref{r:second}]"+              , "% === Step #3, Rule 'second', 26t -> 23t"+              , "  \\phiNormalize \"1\" : |x| \\phiNormalize"+              , "  \\phiNormalize \\dots"+              , "\\end{phiquation}"+              ]+          ]++    it "prints only one latex preamble with --sequence" $+      withStdin "[[ x -> \"0\" ]]" $+        testCLISucceeded+          [ "rewrite"+          , rule "first.yaml"+          , rule "second.yaml"+          , "--max-depth=1"+          , "--max-cycles=1"+          , "--sequence"+          , "--sweet"+          , "--flat"+          , "--output=latex"+          ]+          [ unlines+              [ "\\begin{phiquation}"+              , "\"0\" : |x| \\phiNormalize[\\nameref{r:first}]"+              , "  \\phiNormalize Q . |x| ( |y| -> \"1\" ) \\phiNormalize[\\nameref{r:second}]"+              , "  \\phiNormalize \"1\" : |x| \\phiNormalize"+              , "  \\phiNormalize \\dots"+              , "\\end{phiquation}"+              ]+          ]++    it "prints meet prefix with --meet-prefix=foo in LaTeX" $+      withStdin "[[ x -> ?, y -> $.x ]](x -> [[ D> 42- ]]).y" $+        testCLISucceeded+          ["rewrite", "--normalize", "--sweet", "--sequence", "--output=latex", "--flat", "--compress", "--meet-prefix=foo"]+          [ unlines+              [ "\\begin{phiquation}"+              , "[[ |x| -> ?, |y| -> |x| ]] ( |x| -> |42-| : D ) . |y| \\phiNormalize[\\nameref{r:copy}]"+              , "  \\phiNormalize \\phinoMeet{foo:1}{ [[ |x| -> |42-| : D, |y| -> |x| ]] } . |y| \\phiNormalize[\\nameref{r:dot}]"+              , "  \\phiNormalize |42-| : D : |x| . |x| ( \\phiTerminal{\\rho} -> \\phinoAgain{foo:1} ) \\phiNormalize[\\nameref{r:dot}]"+              , "  \\phiNormalize |42-| : D ( \\phiTerminal{\\rho} -> |42-| : D : |x|, \\phiTerminal{\\rho} -> \\phinoAgain{foo:1} ) \\phiNormalize[\\nameref{r:skip}]"+              , "  \\phiNormalize |42-| : D ( \\phiTerminal{\\rho} -> \\phinoAgain{foo:1} ) \\phiNormalize[\\nameref{r:skip}]"+              , "  \\phiNormalize |42-| : D{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "prints with compressed expressions in LaTeX" $+      withStdin "[[ x -> ?, y -> $.x ]](x -> [[ D> 42- ]]).y" $+        testCLISucceeded+          ["rewrite", "--normalize", "--sweet", "--sequence", "--output=latex", "--flat", "--compress"]+          [ unlines+              [ "\\begin{phiquation}"+              , "[[ |x| -> ?, |y| -> |x| ]] ( |x| -> |42-| : D ) . |y| \\phiNormalize[\\nameref{r:copy}]"+              , "  \\phiNormalize \\phinoMeet{1}{ [[ |x| -> |42-| : D, |y| -> |x| ]] } . |y| \\phiNormalize[\\nameref{r:dot}]"+              , "  \\phiNormalize |42-| : D : |x| . |x| ( \\phiTerminal{\\rho} -> \\phinoAgain{1} ) \\phiNormalize[\\nameref{r:dot}]"+              , "  \\phiNormalize |42-| : D ( \\phiTerminal{\\rho} -> |42-| : D : |x|, \\phiTerminal{\\rho} -> \\phinoAgain{1} ) \\phiNormalize[\\nameref{r:skip}]"+              , "  \\phiNormalize |42-| : D ( \\phiTerminal{\\rho} -> \\phinoAgain{1} ) \\phiNormalize[\\nameref{r:skip}]"+              , "  \\phiNormalize |42-| : D{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "should not print \\phinoMeet{} twice" $+      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $+        testCLISucceeded+          ["rewrite", "--normalize", "--sequence", "--flat", "--compress", "--output=latex", "--sweet"]+          [ unlines+              [ "\\begin{phiquation}"+              , "[[ |y| -> ?, |k| -> \\phinoMeet{1}{ |42.0| : |t| } ]] ( |y| -> \\phinoAgain{1} ) : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:copy}]"+              , "  \\phiNormalize [[ |y| -> \\phinoAgain{1}, |k| -> \\phinoAgain{1} ]] : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:stop}]"+              , "  \\phiNormalize T : |ex|{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "should not meet expression with high --meet-popularity" $+      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $+        testCLISucceeded+          ["rewrite", "--normalize", "--sequence", "--flat", "--compress", "--output=latex", "--sweet", "--meet-popularity=70"]+          [ unlines+              [ "\\begin{phiquation}"+              , "[[ |y| -> ?, |k| -> |42.0| : |t| ]] ( |y| -> |42.0| : |t| ) : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:copy}]"+              , "  \\phiNormalize [[ |y| -> |42.0| : |t|, |k| -> |42.0| : |t| ]] : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:stop}]"+              , "  \\phiNormalize T : |ex|{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "meets with --meet-length=32" $+      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $+        testCLISucceeded+          ["rewrite", "--normalize", "--sequence", "--flat", "--compress", "--output=latex", "--sweet", "--meet-length=32"]+          [ unlines+              [ "\\begin{phiquation}"+              , "[[ |y| -> ?, |k| -> |42.0| : |t| ]] ( |y| -> |42.0| : |t| ) : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:copy}]"+              , "  \\phiNormalize [[ |y| -> |42.0| : |t|, |k| -> |42.0| : |t| ]] : |x| . |i| : |ex| \\phiNormalize[\\nameref{r:stop}]"+              , "  \\phiNormalize T : |ex|{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "focuses expression in latex with sequence" $+      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $+        testCLISucceeded+          ["rewrite", "--normalize", "--sequence", "--flat", "--output=latex", "--sweet", "--focus=Q.ex"]+          [ unlines+              [ "\\begin{phiquation}"+              , "[[ |y| -> ?, |k| -> |42.0| : |t| ]] ( |y| -> |42.0| : |t| ) : |x| . |i| \\phiNormalize[\\nameref{r:copy}]"+              , "  \\phiNormalize [[ |y| -> |42.0| : |t|, |k| -> |42.0| : |t| ]] : |x| . |i| \\phiNormalize[\\nameref{r:stop}]"+              , "  \\phiNormalize T{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "focuses expression in latex without sequence" $+      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $+        testCLISucceeded+          ["rewrite", "--normalize", "--flat", "--output=latex", "--sweet", "--focus=Q.ex"]+          [ unlines+              [ "\\begin{phiquation}"+              , "T{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "shows exceeding of limits in latex" $+      withStdin "[[ x -> $.y, y -> $.x ]].x" $+        testCLISucceeded+          ["rewrite", "--normalize", "--flat", "--sequence", "--output=latex", "--sweet", "--max-depth=1", "--max-cycles=1"]+          [ unlines+              [ "\\begin{phiquation}"+              , "[[ |x| -> |y|, |y| -> |x| ]] . |x| \\phiNormalize[\\nameref{r:dot}]"+              , "  \\phiNormalize |x| : |y| . |y| ( \\phiTerminal{\\rho} -> [[ |x| -> |y|, |y| -> |x| ]] ) \\phiNormalize"+              , "  \\phiNormalize \\dots"+              , "\\end{phiquation}"+              ]+          ]++    it "ends the last step with a period when --max-cycles lands on the normal form" $+      withStdin "⟦ a ↦ ⟦ x ↦ ∅ ⟧( x ↦ ⟦⟧ ).x ⟧" $+        testCLISucceeded+          ["rewrite", "--normalize", "--max-cycles=1", "--sequence", "--output=latex"]+          ["  \\phiNormalize [[ |a| -> [[]] ]]{.}"]++    it "focuses expression in phi without sequence" $+      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $+        testCLISucceeded+          ["rewrite", "--normalize", "--flat", "--output=phi", "--sweet", "--focus=Q.ex"]+          ["⊥"]++    it "focuses expression in phi with sequence" $+      withStdin "[[ ex -> [[ x -> [[ y -> ?, k -> [[ t -> 42]]  ]]( y -> [[ t -> 42 ]]) ]].i ]]" $+        testCLISucceeded+          ["rewrite", "--normalize", "--sequence", "--flat", "--output=phi", "--sweet", "--focus=Q.ex"]+          [ unlines+              [ "⟦ y ↦ ∅, k ↦ 42.0:t ⟧( y ↦ 42.0:t ):x.i"+              , "⟦ y ↦ 42.0:t, k ↦ 42.0:t ⟧:x.i"+              , "⊥"+              ]+          ]++    it "prints input as listing in XMIR" $+      withStdin "[[ app -> [[]] ]]" $+        testCLISucceeded+          ["rewrite", "--output=xmir", "--omit-comments", "--sweet", "--flat"]+          ["  <listing>[[ app -&gt; [[]] ]]</listing>"]++    it "print expression in listing in XMIRs with --sequence" $+      withStdin "[[ x -> \"foo\" ]]" $+        testCLISucceeded+          ["rewrite", "--output=xmir", "--omit-comments", "--sweet", "--flat", "--sequence", rule "simple.yaml"]+          ["  <listing>\"foo\":x</listing>", "  <listing>\"bar\":x</listing>"]++    describe "must range tests" $ do+      describe "fails" $ do+        it "when cycles exceed range ..1" $+          withStdin "[[ x -> [[ y -> 5 ]].y ]].x" $+            testCLIFailed+              ["rewrite", "--max-depth=1", "--max-cycles=2", "--normalize", "--must=..1"]+              ["it's expected rewriting cycles to be in range [..1], but rewriting has already reached 2"]++        it "when cycles below range 2.." $+          withStdin "⟦ t ↦ ⟦ x ↦ \"foo\" ⟧ ⟧" $+            testCLIFailed+              ["rewrite", rule "simple.yaml", "--must=2.."]+              ["it's expected rewriting cycles to be in range [2..], but rewriting stopped after 1"]++        it "with invalid range 5..3" $+          withStdin "[[ ]]" $+            testCLIFailed+              ["rewrite", "--must=5..3"]+              ["cannot parse value `5..3'"]++        it "with negative in range -1..5" $+          withStdin "[[ ]]" $+            testCLIFailed+              ["rewrite", "--must=-1..5"]+              ["cannot parse value `-1..5'"]++        it "with malformed range syntax" $+          withStdin "[[ ]]" $+            testCLIFailed+              ["rewrite", "--must=3...5"]+              ["cannot parse value `3...5'"]++      it "accepts range ..5 (0 to 5 cycles)" $+        withStdin "[[ ]]" $+          testCLISucceeded ["rewrite", "--must=..5", "--sweet"] ["⟦⟧"]++      it "accepts range 0..0 (exactly 0 cycles)" $+        withStdin "[[ ]]" $+          testCLISucceeded ["rewrite", "--must=0..0", "--sweet"] ["⟦⟧"]++      it "accepts range 1..1 (exactly 1 cycle)" $+        withStdin "⟦ t ↦ ⟦ x ↦ \"foo\" ⟧ ⟧" $+          testCLISucceeded+            ["rewrite", rule "simple.yaml", "--must=1..1", "--sweet"]+            ["\"bar\":x"]++      it "accepts range 1..3 when 1 cycle happens" $+        withStdin "⟦ t ↦ ⟦ x ↦ \"foo\" ⟧ ⟧" $+          testCLISucceeded+            ["rewrite", rule "simple.yaml", "--must=1..3", "--sweet"]+            ["\"bar\":x"]++      it "accepts range 0.. (0 or more)" $+        withStdin "[[ ]]" $+          testCLISucceeded ["rewrite", "--must=0..", "--sweet"] ["⟦⟧"]++    it "prints to target file" $+      withStdin "[[ ]]" $+        withTempFile "targetXXXXXX.tmp" $ \(path, h) -> do+          hClose h+          testCLISucceeded ["rewrite", "--sweet", printf "--target=%s" path] []+          content <- readFile path+          content `shouldBe` "⟦⟧\n"++    it "modifies file in-place" $+      withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do+        hPutStr h "[[ x -> \"foo\" ]]"+        hClose h+        testCLISucceeded ["rewrite", rule "simple.yaml", "--in-place", "--sweet", path] []+        content <- readFile path+        content `shouldBe` "\"bar\":x\n"++    it "writes the same bytes to --target as it prints to the console" $+      withTempFile "targetXXXXXX.tmp" $ \(path, h) -> do+        hClose h+        (console, _) <- withStdout (withStdin "[[ ]]" (runCLI ["rewrite", "--sweet"]))+        withStdin "[[ ]]" (testCLISucceeded ["rewrite", "--sweet", printf "--target=%s" path] [])+        content <- readFile path+        content `shouldBe` console++    it "keeps the trailing newline of the source file when nothing is rewritten by --in-place" $+      withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do+        hPutStr h "⟦⟧\n"+        hClose h+        testCLISucceeded ["rewrite", "--in-place", "--sweet", path] []+        content <- readFile path+        content `shouldBe` "⟦⟧\n"++    it "modifies file in-place with --focus=Φ, since Φ and Q are the same locator" $+      withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do+        hPutStr h "[[ x -> \"foo\" ]]"+        hClose h+        testCLISucceeded ["rewrite", rule "simple.yaml", "--focus=Φ", "--in-place", "--sweet", path] []+        content <- readFile path+        content `shouldBe` "\"bar\":x\n"++    it "keeps the XMIR format when rewriting an XMIR file in-place" $+      withTempFileContent "inplaceXXXXXX.xmir" xmir $ \path -> do+        testCLISucceeded ["rewrite", "--input=xmir", "--output=xmir", "--in-place", path] []+        content <- readFile path+        _ <- evaluate (length content)+        content `shouldContain` "<object"++    it "skips rewriting with --update when target is newer than source" $+      withTempFileContent "src-XXXXXX.phi" "[[ x -> \"foo\" ]]" $ \src ->+        withTempFileContent "tgt-XXXXXX.phi" "ORIGINAL" $ \tgt -> do+          now <- getCurrentTime+          setModificationTime src (addUTCTime (-60) now)+          setModificationTime tgt now+          testCLISucceeded+            ["rewrite", rule "simple.yaml", "--update", "--sweet", "--target=" ++ tgt, src]+            []+          content <- readFile tgt+          content `shouldBe` "ORIGINAL"++    it "logs the skip reason at debug level when --update finds a newer target" $+      withTempFileContent "src-XXXXXX.phi" "[[ x -> \"foo\" ]]" $ \src ->+        withTempFileContent "tgt-XXXXXX.phi" "ORIGINAL" $ \tgt -> do+          now <- getCurrentTime+          setModificationTime src (addUTCTime (-60) now)+          setModificationTime tgt now+          testCLISucceeded+            ["rewrite", rule "simple.yaml", "--update", "--sweet", "--log-level=DEBUG", "--target=" ++ tgt, src]+            ["is newer than source", "skipping rewriting (--update)"]++    it "logs progress at debug level when printing to --target" $+      withStdin "[[ ]]" $+        withTempFile "targetXXXXXX.tmp" $ \(path, h) -> do+          hClose h+          testCLISucceeded+            ["rewrite", "--sweet", "--log-level=DEBUG", printf "--target=%s" path]+            ["The option '--target' is specified, printing to", "The command result was saved in"]++    it "logs progress at debug level when modifying a file in-place" $+      withTempFile "inplaceXXXXXX.phi" $ \(path, h) -> do+        hPutStr h "[[ x -> \"foo\" ]]"+        hClose h+        testCLISucceeded+          ["rewrite", rule "simple.yaml", "--in-place", "--sweet", "--log-level=DEBUG", path]+          ["The option '--in-place' is specified, writing back to", "was modified in-place"]++    it "rewrites with --update when source is newer than target" $+      withTempFileContent "src-XXXXXX.phi" "[[ x -> \"foo\" ]]" $ \src ->+        withTempFileContent "tgt-XXXXXX.phi" "ORIGINAL" $ \tgt -> do+          now <- getCurrentTime+          setModificationTime tgt (addUTCTime (-60) now)+          setModificationTime src now+          testCLISucceeded+            ["rewrite", rule "simple.yaml", "--update", "--sweet", "--target=" ++ tgt, src]+            []+          content <- readFile tgt+          content `shouldBe` "\"bar\":x\n"++    it "rewrites with cycles" $+      withStdin "[[ x -> \"x\" ]]" $+        testCLISucceeded+          ["rewrite", "--sweet", rule "infinite.yaml", "--max-depth=1", "--max-cycles=2"]+          ["\"x_hi_hi\":x"]++    it "hides default package" $+      withStdin "[[ org -> [[ eolang -> [[ number -> [[]] ]]]], x -> 42 ]]" $+        testCLISucceeded+          ["rewrite", "--sweet", "--flat", "--hide=Q.org"]+          ["42.0:x"]++    it "hides several FQNs" $+      withStdin "[[ org -> [[ eolang -> Q.x, yegor256 -> Q.y ]], x -> 42 ]]" $+        testCLISucceeded+          ["rewrite", "--sweet", "--flat", "--hide=Q.org.eolang", "--hide=Q.org.yegor256"]+          ["⟦ org ↦ ⟦⟧, x ↦ 42.0 ⟧"]++    it "shows and hides" $+      withStdin "[[ org -> [[ eolang -> Q.x, yegor256 -> Q.y ]], x -> 42 ]]" $+        testCLISucceeded+          ["rewrite", "--sweet", "--flat", "--show=Q.org", "--hide=Q.org.eolang"]+          ["Φ.y:yegor256:org"]++    it "hides an object outside the --show locator" $+      withStdin "[[ org -> [[ eolang -> Q.x ]], x -> 42 ]]" $+        testCLISucceeded+          ["rewrite", "--sweet", "--flat", "--show=Q.x", "--hide=Q.org.eolang"]+          ["42.0:x"]++    it "hides an object inside an earlier --hide locator" $+      withStdin "[[ org -> [[ eolang -> [[ number -> [[]] ]] ]], x -> 42 ]]" $+        testCLISucceeded+          ["rewrite", "--sweet", "--flat", "--hide=Q.org.eolang", "--hide=Q.org.eolang.number"]+          ["⟦ org ↦ ⟦⟧, x ↦ 42.0 ⟧"]++    it "fails on a --show locator that matches nothing" $+      withStdin "[[ a -> [[ b -> Q, c -> Q ]], d -> Q ]]" $+        testCLIFailed+          ["rewrite", "--flat", "--show=Q.zzz"]+          ["[ERROR]:", "Can't find object by locator: 'Φ.zzz'"]++    it "shows the whole program with --show=Q" $+      withStdin "[[ a -> [[ b -> Q, c -> Q ]], d -> Q ]]" $+        testCLISucceeded+          ["rewrite", "--flat", "--show=Q"]+          ["⟦ a ↦ ⟦ b ↦ Φ, c ↦ Φ ⟧, d ↦ Φ ⟧"]++    it "prints in line with --flat" $+      withStdin "[[ x -> 5, y -> \"hey\", z -> [[ w -> [[ ]] ]] ]]" $+        testCLISucceeded+          ["rewrite", "--sweet", "--flat"]+          ["⟦ x ↦ 5.0, y ↦ \"hey\", z ↦ ⟦⟧:w ⟧"]++    it "removes unnecessary rho bindings in primitive applications" $+      withStdin+        ( unlines+            [ "[["+            , "  z -> [[ x -> [[ t -> 42 ]].t ]].x,"+            , "  org -> [[ eolang -> [[ bytes -> [[ data -> ? ]], number -> [[ as-bytes -> ? ]] ]] ]]"+            , "]]"+            ]+        )+        ( testCLISucceeded+            ["rewrite", "--sweet", "--normalize", "--flat"]+            ["⟦ z ↦ 42.0, org ↦ ⟦ bytes(data) ↦ ⟦⟧, number(as-bytes) ↦ ⟦⟧ ⟧:eolang ⟧"]+        )++    it "reduces log message" $+      withStdin "[[ x -> [[ y -> ? ]](y -> 5) ]]" $+        testCLISucceeded+          ["rewrite", "--log-level=debug", "--log-lines=1", "--normalize"]+          [ intercalate+              "\n"+              [ "[DEBUG]: Applied 'copy' (32 nodes -> 27 nodes)"+              , "---| log is limited by --log-lines=1 option |---"+              ]+          ]++    it "reports a condition that raised while being evaluated" $+      withStdin "[[ x -> [[ y -> ∅ ]] ]]" $+        testCLISucceeded+          ["rewrite", rule "raising-condition.yaml", "--log-level=debug", "--flat"]+          [ "raised and was treated as not met: user error (Only data objects and bytes are supported"+          , "⟦ x ↦ ⟦ y ↦ ∅ ⟧ ⟧"+          ]++    it "canonizes expression" $+      withStdin "[[ x -> [[ y -> [[ L> Func ]].q, z -> Q.x(a -> [[ w -> [[ L> Atom ]], L> Hello ]]) ]], L> Package ]]" $+        testCLISucceeded+          ["rewrite", "--canonize", "--sweet", "--flat"]+          ["⟦ x ↦ ⟦ y ↦ Fn1:λ.q, z ↦ Φ.x( a ↦ ⟦ w ↦ Fn2:λ, λ ⤍ Fn3 ⟧ ) ⟧, λ ⤍ Package ⟧"]++    it "keeps the name of a function across the steps of --sequence under --canonize" $+      withStdin "[[ a -> [[ x -> [[ L> Fa ]], y -> [[ L> Fb ]] ]] ]]" $+        testCLISucceeded+          ["rewrite", rule "drop-x.yaml", "--sequence", "--canonize", "--flat"]+          [ "⟦ a ↦ ⟦ x ↦ ⟦ λ ⤍ Fn1 ⟧, y ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧ ⟧"+          , "⟦ a ↦ ⟦ y ↦ ⟦ λ ⤍ Fn2 ⟧ ⟧ ⟧"+          ]++    it "rewrites by locator" $+      withStdin "[[ ex -> [[ x -> [[ y -> 5 ]].y ]], abc -> [[ x -> ? ]](x -> 5) ]]" $+        testCLISucceeded+          ["rewrite", "--sweet", "--flat", "--locator=Q.ex", "--normalize"]+          ["⟦ ex ↦ 5.0:x, abc ↦ ∅:x( x ↦ 5.0 ) ⟧"]++    it "returns original expression on --breakpoint" $+      withStdin "[[ x -> ?, y -> $.x ]](x -> [[ D> 42- ]]).y" $+        testCLISucceeded+          ["rewrite", "--sweet", "--flat", "--normalize", "--breakpoint=stop", "--log-level=debug"]+          [ "Applied 'copy' (22 nodes -> 17 nodes)"+          , "Rule 'stop' is a breakpoint, dropping down all the previous rewritings..."+          , "⟦ x ↦ ∅, y ↦ x ⟧( x ↦ 42-:Δ ).y"+          ]++    it "leaves no step files of the rewritings --breakpoint dropped" $+      withTempDirectory "phino-steps-breakpoint" $ \dir ->+        withStdin "[[ x -> ?, y -> $.x ]](x -> [[ D> 42- ]]).y" $ do+          testCLISucceeded+            ["rewrite", "--sweet", "--flat", "--normalize", "--breakpoint=stop", "--steps-dir=" ++ dir]+            ["⟦ x ↦ ∅, y ↦ x ⟧( x ↦ 42-:Δ ).y"]+          listDirectory dir `shouldReturn` []++    it "finishes under --depth-sensitive when the only match left would not change the term" $+      withTempFileContent "phino-fixpoint.yaml" "name: fix\npattern: '[[ x -> !e1, !B1 ]]'\nresult: '[[ x -> Q, !B1 ]]'\n" $ \fix ->+        withStdin "[[ x -> $ ]]" $+          testCLISucceeded ["rewrite", "--rule=" ++ fix, "--max-depth=1", "--depth-sensitive", "--flat"] ["⟦ x ↦ Φ ⟧"]++    it "keeps the rewritten expression when the --breakpoint rule fired" $+      withStdin "⟦ a ↦ ⟦ b ↦ Φ ⟧.b ⟧" $+        testCLISucceeded+          ["rewrite", "--flat", "--normalize", "--breakpoint=dot"]+          ["⟦ a ↦ Φ( ρ ↦ ⟦ b ↦ Φ ⟧ ) ⟧"]++    it "reads back an application of ξ as it is" $+      withStdin "[[ a -> [[ x -> ∅ ]], b -> $(x -> [[ ]]) ]]" $+        testCLISucceeded ["rewrite", "--flat"] ["⟦ a ↦ ⟦ x ↦ ∅ ⟧, b ↦ ξ( x ↦ ⟦⟧ ) ⟧"]++    it "keeps the ρ that dot applies to Φ, and reads it back" $ do+      withStdin "[[ x -> [[ y -> Q ]].y ]]" $+        testCLISucceeded ["rewrite", "--normalize", "--flat"] ["⟦ x ↦ Φ( ρ ↦ ⟦ y ↦ Φ ⟧ ) ⟧"]+      withStdin "⟦ x ↦ Φ( ρ ↦ ⟦ y ↦ Φ ⟧ ) ⟧" $+        testCLISucceeded ["rewrite", "--flat"] ["⟦ x ↦ Φ( ρ ↦ ⟦ y ↦ Φ ⟧ ) ⟧"]++  describe "morph --focus under --locator" $ do+    it "finds the same object for the steps and for the answer" $+      withStdin "⟦ t ↦ ⟦ a ↦ ⟦ Δ ⤍ 01- ⟧ ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $ do+        (out, _) <- withStdout (runCLI ["morph", "--locator=Q.t", "--focus=Q.a", "--flat", "--sequence"])+        filter (not . null) (lines out) `shouldSatisfy` all (== "⟦ Δ ⤍ 02- ⟧")+    it "prints the answer when --focus names the object at --locator" $+      withStdin "⟦ t ↦ ⟦ a ↦ ⟦ Δ ⤍ 01- ⟧ ⟧ ⟧" $+        testCLISucceeded ["morph", "--locator=Q.t", "--focus=Q.t", "--flat", "--sequence"] ["⟦ a ↦ ⟦ Δ ⤍ 01- ⟧ ⟧"]+    it "fails on a --focus it cannot find before it prints any step" $+      withStdin "⟦ t ↦ ⟦ a ↦ ⟦ Δ ⤍ 01- ⟧ ⟧ ⟧" $ do+        (out, _) <- withStdout (try (runCLI ["morph", "--locator=Q.t", "--focus=Q.nope", "--flat", "--sequence"]) :: IO (Either ExitCode ()))+        out `shouldNotContain` "⟦ t ↦"++  it "fails on a --hide locator that matches nothing, as --show does" $+    withStdin "[[ x -> Q.y ]]" $+      testCLIFailed ["rewrite", "--hide=Q.nope"] ["Can't find object by locator: 'Φ.nope'"]++  it "names the term dataization cannot take, and says a normal form is expected" $+    withStdin "⟦ x ↦ ⟦ b ↦ ⟦ Δ ⤍ 01- ⟧ ⟧.b ⟧" $+      testCLIFailed ["dataize", "--locator=Q.x"] ["Dataization expects a normal form, but the term at the locator is not one: 01-:Δ:b.b"]++  describe "--partial parks a universe that --max-cycles stops" $ do+    let heavy = "⟦ simple ↦ ⟦ Δ ⤍ 01- ⟧, heavy ↦ ⟦ a ↦ ⟦ b ↦ ⟦ c ↦ ⟦ Δ ⤍ 02- ⟧ ⟧ ⟧ ⟧.a.b.c ⟧"+    it "in dataize" $+      withStdin heavy $+        testCLISucceeded ["dataize", "--locator=Q.simple", "--max-cycles=1", "--partial", "--flat"] ["⟦ Δ ⤍ 01- ⟧"]+    it "in morph" $+      withStdin heavy $+        testCLISucceeded ["morph", "--locator=Q.simple", "--max-cycles=1", "--partial", "--flat"] ["⟦ Δ ⤍ 01- ⟧"]++  describe "dataize" $ do+    it "prints help" $+      testCLISucceeded ["dataize", "--help"] ["Dataize the 𝜑-expression"]++    it "names every block of a --symbolic entry in its help" $+      testCLISucceeded ["dataize", "--help"] ["\"dataize\"", "\"morph\"", "\"evaluate\"", "\"defer\"", "\"stay\"", "\"rewrite\"", "\"symbolize\"", "\"cast\"", "\"join\""]++    it "dataizes simple expression" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded ["dataize"] ["01-"]++    it "accepts --seed flag" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded ["dataize", "--seed=7"] ["01-"]++    it "feeds an argument to a bare symbol and gets a new symbol, not ⊥" $+      withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+        hClose stream+        withStdin "⟦ x ↦ ⟦ λ ⤍ 𝜎1 ⟧, app ↦ Φ.x( k ↦ 01-:Δ ) ⟧" $+          testCLISucceeded ["dataize", "--locator=Q.app", "--partial", "--quiet", "--sweet", "--hide-rho", "--minutes=" ++ path] []+        protocol <- readProtocol path+        map (dropWhile (== ' ')) (lines protocol) `shouldContain` ["fed 𝜎2:λ ≔ 𝜎1:λ( k ↦ 01-:Δ )", "morphed 𝑛·0·2 ≔ 𝜎2:λ", "𝛿·0·1 ≔ 𝔻(𝜎2:λ)"]++    it "dispatches an attribute off a bare symbol and gets a new symbol, not a stop" $+      withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+        hClose stream+        withStdin "⟦ x ↦ ⟦ λ ⤍ 𝜎1 ⟧, app ↦ Φ.x.foo ⟧" $+          testCLISucceeded ["dataize", "--locator=Q.app", "--partial", "--quiet", "--sweet", "--hide-rho", "--minutes=" ++ path] []+        protocol <- readProtocol path+        map (dropWhile (== ' ')) (lines protocol) `shouldContain` ["opaque 𝜎2:λ ≔ 𝜎1:λ.foo", "morphed 𝑛·0·2 ≔ 𝜎2:λ", "𝛿·0·1 ≔ 𝔻(𝜎2:λ)"]++    it "dispatches an attribute off a bare symbol and writes the new symbol to the XML protocol" $+      withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+        hClose stream+        withStdin "⟦ x ↦ ⟦ λ ⤍ 𝜎1 ⟧, app ↦ Φ.x.foo ⟧" $+          testCLISucceeded ["dataize", "--locator=Q.app", "--partial", "--quiet", "--sweet", "--hide-rho", "--protocol=" ++ path] []+        protocol <- readProtocol path+        map (dropWhile (== ' ')) (lines protocol) `shouldContain` ["<opaque symbol=\"𝜎2\" of=\"𝜎1.foo\"/>", "<morphed meta=\"𝑛·0·2\">𝜎2</morphed>"]++    it "feeds a named argument to a bare symbol and writes it to the XML protocol" $+      withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+        hClose stream+        withStdin "⟦ x ↦ ⟦ λ ⤍ 𝜎1 ⟧, app ↦ Φ.x( k ↦ 01-:Δ ) ⟧" $+          testCLISucceeded ["dataize", "--locator=Q.app", "--partial", "--quiet", "--sweet", "--hide-rho", "--protocol=" ++ path] []+        protocol <- readProtocol path+        map (dropWhile (== ' ')) (lines protocol) `shouldContain` ["<applied meta=\"𝑒·0·1\" of=\"𝜎1\"><datum attr=\"k\">01-</datum></applied>", "<fed symbol=\"𝜎2\" of=\"𝑒·0·1\"/>"]++    it "fails to dataize an empty object, which dataizes the terminator ⊥" $+      withStdin "[[ ]]" $+        testCLIFailed ["dataize"] ["terminator ⊥"]++    it "fails with negative --max-steps" $+      withStdin "[[ D> 01- ]]" $+        testCLIFailed ["dataize", "--max-steps=-1"] ["--max-steps must be positive"]++    it "fails on --max-steps instead of dataizing forever" $+      loopingLambdas $ \endless ->+        withStdin "⟦ @ ↦ ⟦ λ ⤍ L_loop ⟧ ⟧" $+          testCLIFailed+            ["dataize", "--symbolic=" ++ endless, "--max-steps=40"]+            ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=40"]++    it "parks --max-steps on a residual with --partial" $+      loopingLambdas $ \endless ->+        withStdin "⟦ @ ↦ ⟦ λ ⤍ L_loop ⟧ ⟧" $+          testCLISucceeded+            ["dataize", "--symbolic=" ++ endless, "--max-steps=40", "--partial", "--flat", "--hide-rho"]+            ["⟦ λ ⤍ L_loop ⟧"]++    it "fails on --max-firings before --max-steps is spent" $+      loopingLambdas $ \endless ->+        withStdin "⟦ @ ↦ ⟦ λ ⤍ L_loop ⟧ ⟧" $+          testCLIFailed+            ["dataize", "--symbolic=" ++ endless, "--max-steps=400", "--max-firings=5"]+            ["[ERROR]: Evaluation did not finish before reaching the limit of firings: --max-firings=5"]++    describe "--acyclic=proven" $ do+      let circling = "⟦ cyc ↦ ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ↦ ξ.x ) ⟧, t ↦ Φ.cyc( x ↦ ⟦⟧ ) ⟧"+      it "spends the whole budget and fails on the limit without the flag" $+        withStdin circling $+          testCLIFailed+            ["dataize", "--locator=Q.t", "--max-steps=40"]+            ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=40"]++      it "answers the copy it came back to with a symbol with the flag" $+        withStdin circling $+          testCLISucceeded+            ["dataize", "--locator=Q.t", "--acyclic=proven", "--max-steps=4000"]+            ["40-45-00-00-00-00-00-00"]++      it "answers the same with --partial" $+        withStdin circling $+          testCLISucceeded+            ["dataize", "--locator=Q.t", "--acyclic=proven", "--partial", "--max-steps=4000", "--flat", "--hide-rho"]+            ["40-45-00-00-00-00-00-00"]++      it "writes the cut to the protocol where the formation would have opened" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin circling $+            testCLISucceeded+              ["dataize", "--locator=Q.t", "--acyclic=proven", "--partial", "--minutes=" ++ path, "--sweet", "--hide-rho", "--flat", "--quiet"]+              []+          records <- readProtocol path+          lines records+            `shouldBe` [ "𝔻(Φ.t):"+                       , "  𝕄(Φ.t):"+                       , "    remembered 𝑛·0·1 ≡ Φ.cyc  # ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ↦ x ) ⟧"+                       , "    𝑛·0·2 ≔ Φ.cyc( x ↦ ⟦⟧ )"+                       , "    𝑛·0·3 ≔ ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ↦ x ) ⟧"+                       , "    remembered 𝑛·0·3 ≡ 𝑛·0·1( x ↦ ⟦⟧ )"+                       , "    morphed 𝑛·0·4 ≔ 𝑛·0·3"+                       , "  boxed 𝑛·0·5 ≔ 𝑛·0·4.φ"+                       , "  normalized 𝑛·0·6 ≔ 𝑛·0·2  # 𝑛·0·5"+                       , "  𝕄(𝑛·0·5):"+                       , "    𝑛·0·7 ≔ Φ.cyc( x ↦ ⟦⟧ )"+                       , "    𝑛·0·8 ≔ ⟦ x ↦ ⟦⟧, φ ↦ Φ.cyc( x ↦ x ) ⟧"+                       , "    morphed 𝑛·0·9 ≔ 𝑛·0·8"+                       , "  recalled 𝑛·0·3 ⇒ 𝑛·0·1( x ↦ ⟦⟧ )"+                       , "  recalled 𝑛·0·1 ⇒ Φ.cyc"+                       , "  𝕄(𝑛·0·9.x):"+                       , "    morphed 𝑛·0·10 ≔ ⟦⟧"+                       , "  looped 𝜎1 ≔ Φ.cyc( x ↦ 𝑛·0·10 )  # 𝔻(𝑛·0·5), proven, repeats 𝑛·0·9"+                       , "  𝛿·0·1 ≔ 𝔻(𝜎1:λ)"+                       ]++      it "writes the cut to the XML protocol with the formation in an element of its own" $+        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withStdin circling $+            testCLISucceeded+              ["dataize", "--locator=Q.t", "--acyclic=proven", "--partial", "--protocol=" ++ path, "--sweet", "--hide-rho", "--flat", "--quiet"]+              []+          records <- readProtocol path+          lines records+            `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                       , "<dataize at=\"Φ.t\">"+                       , "  <morph at=\"Φ.t\">"+                       , "    <remembered meta=\"𝑛·0·1\" as=\"Φ.cyc\"/>"+                       , "    <formed meta=\"𝑒·0·1\"/>"+                       , "    <applied meta=\"𝑛·0·2\" by=\"morph\" at=\"Φ.t\" of=\"Φ.cyc\"><meta attr=\"x\">𝑒·0·1</meta></applied>"+                       , "    <formed meta=\"𝑛·0·3\" of=\"Φ.cyc\"><meta attr=\"x\">𝑒·0·1</meta></formed>"+                       , "    <applied meta=\"𝑒·0·2\" of=\"𝑛·0·1\"><meta attr=\"x\">𝑒·0·1</meta></applied>"+                       , "    <remembered of=\"𝑛·0·3\" as=\"𝑒·0·2\"/>"+                       , "    <morphed meta=\"𝑛·0·4\">𝑛·0·3</morphed>"+                       , "  </morph>"+                       , "  <boxed meta=\"𝑛·0·5\">𝑛·0·4.φ</boxed>"+                       , "  <applied meta=\"𝑒·0·3\" of=\"𝑛·0·2\"><meta attr=\"ρ\">𝑛·0·2</meta></applied>"+                       , "  <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5\">𝑒·0·3</normalized>"+                       , "  <morph at=\"𝑛·0·5\">"+                       , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·5\" of=\"Φ.cyc\"><meta attr=\"x\">𝑒·0·1</meta></applied>"+                       , "    <formed meta=\"𝑛·0·8\" of=\"Φ.cyc\"><meta attr=\"x\">𝑒·0·1</meta></formed>"+                       , "    <morphed meta=\"𝑛·0·9\">𝑛·0·8</morphed>"+                       , "  </morph>"+                       , "  <recalled of=\"𝑛·0·3\" as=\"𝑒·0·2\"/>"+                       , "  <recalled of=\"𝑛·0·1\" as=\"Φ.cyc\"/>"+                       , "  <morph at=\"𝑛·0·9.x\">"+                       , "    <morphed meta=\"𝑛·0·10\">𝑒·0·1</morphed>"+                       , "  </morph>"+                       , "  <looped symbol=\"𝜎1\" by=\"dataize\" match=\"proven\" at=\"𝑛·0·5\" of=\"𝑛·0·9\" object=\"Φ.cyc\"><with><meta attr=\"x\">𝑛·0·10</meta></with></looped>"+                       , "  <manufactured meta=\"𝛿·0·1\">𝜎1</manufactured>"+                       , "</dataize>"+                       ]++      it "writes a plausible cut to the protocol as plausible" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin circling $+            testCLISucceeded+              ["dataize", "--locator=Q.t", "--acyclic=plausible", "--partial", "--minutes=" ++ path, "--sweet", "--hide-rho", "--flat", "--quiet"]+              []+          records <- readProtocol path+          lines records `shouldContain` ["  looped 𝜎1 ≔ Φ.cyc( x ↦ 𝑛·0·10 )  # 𝔻(𝑛·0·5), plausible, repeats 𝑛·0·9"]++      it "refuses the flag without a mode" $+        withStdin "⟦ t ↦ ⟦ Δ ⤍ 01-02 ⟧ ⟧" $+          testCLIFailed ["dataize", "--locator=Q.t", "--acyclic"] ["The option `--acyclic` expects an argument"]++      it "refuses a mode it does not know" $+        withStdin "⟦ t ↦ ⟦ Δ ⤍ 01-02 ⟧ ⟧" $+          testCLIFailed ["dataize", "--locator=Q.t", "--acyclic=sure"] ["The value 'sure' can't be used for '--acyclic' option"]++      it "answers a terminating program the same way with the flag" $+        withStdin "⟦ t ↦ ⟦ Δ ⤍ 01-02 ⟧ ⟧" $+          testCLISucceeded ["dataize", "--locator=Q.t", "--acyclic=proven"] ["01-02"]++    describe "--max-loops" $ do+      let once = "⟦ f ↦ ⟦ x ↦ ∅, φ ↦ ξ.x.again ⟧, start ↦ ⟦ again ↦ Φ.f( x ↦ Φ.stop( v ↦ Φ.start ) ) ⟧, stop ↦ ⟦ v ↦ ∅, again ↦ ⟦ Δ ⤍ 01- ⟧ ⟧, t ↦ Φ.f( x ↦ Φ.start ) ⟧"+      it "cuts a recursion that stops after one round without the flag" $+        withStdin once $+          testCLISucceeded+            ["dataize", "--locator=Q.t", "--acyclic=plausible"]+            ["40-45-00-00-00-00-00-00"]++      it "dataizes a recursion that stops after one round with --max-loops=1" $+        withStdin once $+          testCLISucceeded ["dataize", "--locator=Q.t", "--acyclic=plausible", "--max-loops=1"] ["01-"]++      it "cuts a recursion that never stops with --max-loops=1" $+        withStdin "⟦ cyc ↦ ⟦ x ↦ ∅, φ ↦ Φ.cyc( x ↦ ξ.x ) ⟧, t ↦ Φ.cyc( x ↦ ⟦⟧ ) ⟧" $+          testCLISucceeded+            ["dataize", "--locator=Q.t", "--acyclic=proven", "--max-loops=1", "--max-steps=4000"]+            ["40-45-00-00-00-00-00-00"]++      describe "over a recursion that takes an attribute off its own call" $ do+        let world = "⟦ num(φ) ↦ ⟦ gt(ρ, b) ↦ L_gt:λ, plus(ρ, b) ↦ L_plus:λ ⟧, seq(i) ↦ ⟦ φ ↦ Φ.num( φ ↦ 𝜎1:λ ).gt( b ↦ i ).if( left ↦ Φ.seq( i ↦ i.plus( b ↦ Φ.num( φ ↦ 01-:Δ ) ) ).plus( b ↦ Φ.num( φ ↦ 01-:Δ ) ), right ↦ i ) ⟧, app ↦ Φ.seq( i ↦ Φ.num( φ ↦ 00-:Δ ) ) ⟧"+            atoms = T.pack "- λ: L_gt\n  dataize: {𝛿1: $.b}\n  𝑛: ⟦ if ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ⟧\n- λ: L_fork\n  morph: {𝑛1: $.left🌵, 𝑛2: $.right🌵}\n  evaluate: {𝑛3: 𝑛1, 𝑛4: 𝑛2}\n  symbolize: {𝑛5: 𝑛3, 𝑛6: 𝑛4}\n  cast: {𝑛7: 𝑛5, 𝑛8: 𝑛6}\n  join: {'on': $.on🌵, left: 𝑛7, right: 𝑛8, otherwise: L_fork}\n- λ: L_plus\n  dataize: {𝛿1: $.ρ}\n  𝑛: Φ.num( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )\n"+        it "cuts the recursion by --max-loops, not by --max-steps" $+          withLambdasOf atoms $ \file ->+            withStdin world $+              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--partial", "--cheat", "--max-steps=1000", "--max-firings=50"] ["40-45-00-00-00-00-00-00"]+        it "writes the cut of the dispatch off the copy that repeats one above" $+          withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+            hClose stream+            withLambdasOf atoms $ \file ->+              withStdin world $+                testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--partial", "--cheat", "--quiet", "--sweet", "--hide-rho", "--minutes=" ++ path] []+            records <- map (dropWhile (== ' ')) . lines <$> readProtocol path+            records `shouldContain` ["looped 𝜎5 ≔ 𝑛·5·1.plus  # plausible, repeats 𝑛·0·4"]++      describe "over a world whose levels share the value below them twice" $ do+        let level :: String -> String+            level inner = "⟦ ρ ↦ ∅, x ↦ ∅, l ↦ ⟦ ρ ↦ ∅, x ↦ ∅, y ↦ ∅, m ↦ ⟦ ρ ↦ ∅, f ↦ ⟦ λ ⤍ L_f, ρ ↦ ∅ ⟧ ⟧ ⟧( x ↦ ξ.x, y ↦ ξ.x ).m ⟧( x ↦ " ++ inner ++ " ).l"+            world = "⟦ mk ↦ " ++ iterate level "⟦ ρ ↦ ∅ ⟧" !! 24 ++ ", app ↦ Φ.mk.f ⟧"+            atoms = T.pack "- λ: L_f\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+            triple :: String -> String+            triple target = "⟦ dataized(target, big) ↦ L_dataized:λ, peek(target) ↦ L_peek:λ, p ↦ ⟦ a ↦ Φ.dataized( target ↦ Φ.u, big ↦ Φ.mk.f ), b ↦ Φ.peek( target ↦ Φ.v ), c ↦ Φ.dataized( target ↦ Φ." ++ target ++ ", big ↦ Φ.mk.f ), λ ⤍ L_triple ⟧.φ, u ↦ ⟦ λ ⤍ 𝜎1 ⟧, v ↦ ⟦ λ ⤍ 𝜎2 ⟧, w ↦ ⟦ λ ⤍ 𝜎1 ⟧, mk ↦ " ++ iterate level "⟦ ρ ↦ ∅ ⟧" !! 30 ++ " ⟧"+            firings = T.pack "- λ: L_dataized\n  dataize: {𝛿1: $.target}\n  morph: {𝑛1: $.big}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_peek\n  dataize: {𝛿1: $.target}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_triple\n  morph: {𝑛1: $.a, 𝑛2: $.b, 𝑛3: $.c}\n  evaluate: {𝑛4: 𝑛1, 𝑛5: 𝑛2, 𝑛6: 𝑛3}\n  𝑛: ⟦ φ ↦ ⟦ a ↦ 𝑛4, b ↦ 𝑛5, c ↦ 𝑛6 ⟧ ⟧\n"+            recorded :: String -> IO (Maybe [String])+            recorded target =+              timeout 60000000 $+                withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+                  hClose stream+                  withLambdasOf firings $ \file ->+                    withStdin (triple target) $+                      testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.p", "--acyclic=plausible", "--max-loops=1", "--partial", "--cheat", "--sweet", "--hide-rho", "--max-cycles=1000", "--minutes=" ++ path] ["⊥"]+                  map (dropWhile (== ' ')) . lines <$> readProtocol path+        it "fires the atom without walking the shared values as a tree" $+          timeout+            60000000+            ( withLambdasOf atoms $ \file ->+                withStdin world $+                  testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--max-cycles=1000"] ["40-45-00-00-00-00-00-00"]+            )+            >>= (`shouldBe` Just ())+        it "takes the answer of a kindred firing without walking the shared values as a tree" $+          recorded "v" >>= (`shouldSatisfy` maybe False (elem "renamed 𝑛·1·14 ⇛ 𝜎5:λ  # from 𝑛·1·5, 𝜎1 as 𝜎2, 𝜎3 as 𝜎5"))+        it "takes the answer of a firing of the same operands without walking the shared values as a tree" $+          recorded "w" >>= (`shouldSatisfy` maybe False (elem "recalled 𝑛·1·5 ⇒ 𝜎3:λ"))++      describe "over a recursion that hands its own growing call to an atom" $ do+        let world = "⟦ go(x) ↦ ⟦ λ ⤍ L_go ⟧, seq(i) ↦ ⟦ ok ↦ Φ.go( x ↦ Φ.seq( i ↦ i.next ).ok ) ⟧, app ↦ Φ.seq( i ↦ 𝜎1:λ ).ok ⟧"+            atoms = T.pack "- λ: L_go\n  morph: {𝑛1: $.x}\n  𝑛: 𝑛1\n"+        it "cuts the recursion by --max-loops, not by --max-steps" $+          withLambdasOf atoms $ \file ->+            withStdin world $+              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--max-steps=200"] ["40-45-00-00-00-00-00-00"]++      describe "over copies of one object made inside each other with a new argument every time" $ do+        let world = "⟦ f ↦ ⟦ x ↦ ∅, φ ↦ ξ.x.call ⟧, " ++ intercalate ", " [printf "a%d ↦ ⟦ call ↦ Φ.f( x ↦ Φ.a%d ) ⟧" index (index `mod` 5 + 1) | index <- [1 .. 5 :: Int]] ++ ", app ↦ Φ.f( x ↦ Φ.a1 ) ⟧"+            copies :: String -> IO Int+            copies loops =+              withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+                hClose stream+                withStdin world $+                  testCLISucceeded ["dataize", "--locator=Q.app", "--acyclic=plausible", "--max-loops=" ++ loops, "--quiet", "--sweet", "--hide-rho", "--minutes=" ++ path] []+                length . filter (\record -> "𝑛" `isPrefixOf` record && "φ ↦ x.call ⟧" `isSuffixOf` record) . map (dropWhile (== ' ')) . lines <$> readProtocol path+        it "cuts the second copy with --max-loops=0" $+          copies "0" >>= (`shouldBe` 2)+        it "cuts the third copy with --max-loops=1" $+          copies "1" >>= (`shouldBe` 3)+        it "cuts the fourth copy with --max-loops=2" $+          copies "2" >>= (`shouldBe` 4)++      describe "over copies of one object two levels down made inside each other with a new argument every time" $ do+        let world = "⟦ p ↦ ⟦ o ↦ ⟦ f ↦ ⟦ x ↦ ∅, φ ↦ ξ.x.call ⟧ ⟧ ⟧, " ++ intercalate ", " [printf "a%d ↦ ⟦ call ↦ Φ.p.o.f( x ↦ Φ.a%d ) ⟧" index (index `mod` 5 + 1) | index <- [1 .. 5 :: Int]] ++ ", app ↦ Φ.p.o.f( x ↦ Φ.a1 ) ⟧"+        it "cuts the third copy with --max-loops=1" $+          withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+            hClose stream+            withStdin world $+              testCLISucceeded ["dataize", "--locator=Q.app", "--acyclic=plausible", "--max-loops=1", "--quiet", "--sweet", "--hide-rho", "--minutes=" ++ path] []+            protocol <- readProtocol path+            length (filter (\record -> "𝑛" `isPrefixOf` record && "φ ↦ x.call ⟧" `isSuffixOf` record) (map (dropWhile (== ' ')) (lines protocol))) `shouldBe` 3++      describe "over copies of one atom fired inside each other with a new argument every time" $ do+        let world = "⟦ f ↦ ⟦ x ↦ ∅, λ ⤍ L_g ⟧, " ++ intercalate ", " [printf "a%d ↦ ⟦ φ ↦ Φ.f( x ↦ Φ.a%d ) ⟧" index (index `mod` 5 + 1) | index <- [1 .. 5 :: Int]] ++ ", app ↦ Φ.f( x ↦ Φ.a1 ) ⟧"+            atoms = T.pack "- λ: L_g\n  dataize:\n    𝛿1: $.x\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+            firings :: String -> IO Int+            firings loops =+              withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+                hClose stream+                withLambdasOf atoms $ \file ->+                  withStdin world $+                    testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.app", "--acyclic=plausible", "--max-loops=" ++ loops, "--partial", "--quiet", "--sweet", "--hide-rho", "--minutes=" ++ path] []+                length . filter ("𝔼(L_g)" `isPrefixOf`) . map (dropWhile (== ' ')) . lines <$> readProtocol path+        it "cuts the second firing with --max-loops=0" $+          firings "0" >>= (`shouldBe` 1)+        it "cuts the third firing with --max-loops=1" $+          firings "1" >>= (`shouldBe` 2)+        it "cuts the fourth firing with --max-loops=2" $+          firings "2" >>= (`shouldBe` 3)++      it "dont cut copies of one atom fired inside each other with an argument the copy above holds" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withLambdasOf (T.pack "- λ: L_d\n  dataize:\n    𝛿1: $.t\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \file ->+            withStdin "⟦ d(t) ↦ ⟦ λ ⤍ L_d ⟧, e ↦ Φ.d( t ↦ Φ.d( t ↦ Φ.d( t ↦ Φ.d( t ↦ Φ.d( t ↦ Φ.d( t ↦ 01-:Δ ) ) ) ) ) ) ⟧" $+              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.e", "--acyclic=plausible", "--max-loops=0", "--partial", "--quiet", "--sweet", "--hide-rho", "--minutes=" ++ path] []+          records <- readProtocol path+          lines records `shouldNotSatisfy` any (isInfixOf "looped")++      it "refuses a negative count" $+        withStdin once $+          testCLIFailed ["dataize", "--locator=Q.t", "--acyclic=plausible", "--max-loops=-1"] ["--max-loops must be >= 0"]++      it "refuses the flag without --acyclic" $+        withStdin once $+          testCLIFailed ["dataize", "--locator=Q.t", "--max-loops=1"] ["The option --max-loops requires --acyclic, since only --acyclic cuts a loop"]++    describe "--acyclic=plausible over a mutual recursion of four objects" $ do+      let world = "⟦ bit(fork) ↦ ⟦ if ↦ ξ.fork, φ ↦ ξ.fork( left ↦ FF-:Δ, right ↦ 00-:Δ ) ⟧, eq(a, b) ↦ ⟦ λ ⤍ L_eq ⟧, byte(data, i) ↦ ⟦ λ ⤍ L_byte ⟧, plus(i) ↦ ⟦ λ ⤍ L_plus ⟧, read(p) ↦ ⟦ at ↦ ξ.p ⟧, f1(i) ↦ ⟦ φ ↦ Φ.eq( a ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ ξ.i ), b ↦ 28-:Δ ).if( left ↦ Φ.read( p ↦ Φ.f4( i ↦ Φ.plus( i ↦ ξ.i ) ).at ), right ↦ Φ.read( p ↦ Φ.plus( i ↦ ξ.i ) ) ) ⟧, " ++ intercalate ", " [printf "f%d(i) ↦ ⟦ φ ↦ Φ.eq( a ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ ξ.i ), b ↦ %02X-:Δ ).if( left ↦ Φ.read( p ↦ ξ.i ), right ↦ Φ.f%d( i ↦ Φ.f%d( i ↦ ξ.i ).at ) ) ⟧" level (0x28 + level :: Int) level (level - 1) | level <- [2 .. 4 :: Int]] ++ ", t ↦ Φ.f4( i ↦ 00-:Δ ).at ⟧"+          atoms = T.pack "- λ: L_fork\n  dataize: {𝛿1: $.on🌵}\n  morph: {𝑛1: $.left🌵, 𝑛2: $.right🌵}\n  stay: {𝑛3: 𝑛1, 𝑛4: 𝑛2}\n  evaluate: {𝑛5: 𝑛3, 𝑛6: 𝑛4}\n  undress: {𝑛15: 𝑛5, 𝑛16: 𝑛6}\n  symbolize: {𝑛11: 𝑛15, 𝑛12: 𝑛16}\n  defer: {𝑛13: 𝑛11, 𝑛14: 𝑛12}\n  cast: {𝑛19: 𝑛13, 𝑛20: 𝑛14}\n  join: {'on': 𝛿1, left: 𝑛19, right: 𝑛20, otherwise: L_fork}\n- λ: L_eq\n  dataize: {𝛿1: $.a, 𝛿2: $.b}\n  𝑛: Φ.bit( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ )\n- λ: L_byte\n  dataize: {𝛿1: $.data, 𝛿2: $.i}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_plus\n  dataize: {𝛿1: $.i}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+      it "answers the rounds alike an earlier one from memory, within a cap of firings the work of every round runs over" $+        withLambdasOf atoms $ \file ->+          withStdin world $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-loops=1", "--max-firings=400"] ["40-45-00-00-00-00-00-00"]++    describe "--acyclic=plausible over an accumulator that grows every round" $ do+      let world = "⟦ bit(fork) ↦ ⟦ if ↦ ξ.fork, φ ↦ ξ.fork( left ↦ FF-:Δ, right ↦ 00-:Δ ) ⟧, eq(a, b) ↦ ⟦ λ ⤍ L_eq ⟧, byte(data, i) ↦ ⟦ λ ⤍ L_byte ⟧, plus(x) ↦ ⟦ λ ⤍ L_plus ⟧, state(at, groups) ↦ ⟦ φ ↦ ξ.at ⟧, more(acc) ↦ ⟦ φ ↦ Φ.eq( a ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ ξ.acc.at ), b ↦ 29-:Δ ).if( left ↦ ξ.acc, right ↦ Φ.more( acc ↦ Φ.more( acc ↦ Φ.state( at ↦ Φ.plus( x ↦ ξ.acc.at ), groups ↦ ξ.acc.groups ) ) ) ) ⟧, e1 ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ Φ.more( acc ↦ Φ.state( at ↦ 00-:Δ, groups ↦ 00-:Δ ) ).at ) ⟧"+          atoms = T.pack "- λ: L_fork\n  dataize: {𝛿1: $.on🌵}\n  morph: {𝑛1: $.left🌵, 𝑛2: $.right🌵}\n  stay: {𝑛3: 𝑛1, 𝑛4: 𝑛2}\n  evaluate: {𝑛5: 𝑛3, 𝑛6: 𝑛4}\n  undress: {𝑛15: 𝑛5, 𝑛16: 𝑛6}\n  symbolize: {𝑛11: 𝑛15, 𝑛12: 𝑛16}\n  defer: {𝑛13: 𝑛11, 𝑛14: 𝑛12}\n  cast: {𝑛19: 𝑛13, 𝑛20: 𝑛14}\n  join: {'on': 𝛿1, left: 𝑛19, right: 𝑛20, otherwise: L_fork}\n- λ: L_eq\n  dataize: {𝛿1: $.a, 𝛿2: $.b}\n  𝑛: Φ.bit( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ )\n- λ: L_byte\n  dataize: {𝛿1: $.data, 𝛿2: $.i}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_plus\n  dataize: {𝛿1: $.x}\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+      it "shares the accumulator by a name, so no line of the minutes grows with the rounds" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withLambdasOf atoms $ \file ->+            withStdin world $+              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.e1", "--acyclic=plausible", "--max-loops=2", "--max-seconds=60", "--minutes=" ++ path, "--sweet", "--hide-rho"] ["40-45-00-00-00-00-00-00"]+          records <- lines <$> readProtocol path+          (any (isPrefixOf "shared " . dropWhile (== ' ')) records, maximum (map length records) < 1000) `shouldBe` (True, True)++      it "gives an argument read off a copy one name, so a chain of recursions stays within a cap of firings" $+        withLambdasOf atoms $ \file ->+          withStdin "⟦ bit(fork) ↦ ⟦ if ↦ ξ.fork, φ ↦ ξ.fork( left ↦ FF-:Δ, right ↦ 00-:Δ ) ⟧, eq(a, b) ↦ ⟦ λ ⤍ L_eq ⟧, byte(data, i) ↦ ⟦ λ ⤍ L_byte ⟧, num(v) ↦ ⟦ φ ↦ ξ.v, next ↦ Φ.num( v ↦ ξ.v ) ⟧, r1(i) ↦ ⟦ φ ↦ Φ.eq( a ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ ξ.i ), b ↦ 0A-:Δ ).if( left ↦ ξ.i, right ↦ Φ.r1( i ↦ ξ.i.next ) ) ⟧, r2(i) ↦ ⟦ φ ↦ Φ.eq( a ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ ξ.i ), b ↦ 22-:Δ ).if( left ↦ Φ.r2( i ↦ Φ.r1( i ↦ ξ.i.next ) ), right ↦ ξ.i ) ⟧, r3(i) ↦ ⟦ φ ↦ Φ.eq( a ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ ξ.i ), b ↦ 23-:Δ ).if( left ↦ Φ.r3( i ↦ Φ.r2( i ↦ ξ.i.next ) ), right ↦ ξ.i ) ⟧, r4(i) ↦ ⟦ φ ↦ Φ.eq( a ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ ξ.i ), b ↦ 24-:Δ ).if( left ↦ Φ.r4( i ↦ Φ.r3( i ↦ ξ.i.next ) ), right ↦ ξ.i ) ⟧, e1 ↦ Φ.byte( data ↦ 𝜎1:λ, i ↦ Φ.r4( i ↦ Φ.num( v ↦ 00-:Δ ) ) ) ⟧" $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.e1", "--acyclic=plausible", "--max-loops=1", "--max-firings=600"] ["40-45-00-00-00-00-00-00"]++    describe "--acyclic at a recursive call" $ do+      let recursive = "⟦ call(a) ↦ ⟦ λ ⤍ L_call ⟧, wrap(v) ↦ ⟦⟧, down(i) ↦ ⟦ φ ↦ Φ.call( a ↦ Φ.down( i ↦ Φ.wrap( v ↦ i ) ) ) ⟧, t ↦ Φ.down( i ↦ ⟦ Δ ⤍ 01- ⟧ ) ⟧"+          calling = T.pack "- λ: L_call\n  morph:\n    𝑛1: $.a\n  evaluate:\n    𝑛2: 𝑛1\n  𝑛: 𝑛2\n"+          recorded :: String -> IO [String]+          recorded name =+            withTempFile name $ \(path, stream) -> do+              hClose stream+              withLambdasOf calling $ \file ->+                withStdin recursive $+                  testCLISucceeded+                    ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", recording path, "--quiet", "--sweet", "--hide-rho"]+                    []+              lines <$> readProtocol path+      it "answers the recursive call it cuts with a fresh symbol and goes on" $+        withLambdasOf calling $ \file ->+          withStdin recursive $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible"] ["40-45-00-00-00-00-00-00"]++      it "writes the recursive call an operand comes to to the protocol as passed, as a call of the object" $+        recorded "protocolXXXXXX.txt" >>= (`shouldContain` ["      passed 𝑛·1·4 ≔ Φ.down( i ↦ Φ.wrap( v ↦ 01-:Δ ) )  # plausible, repeats 𝑛·0·4"])++      it "writes the recursive call an operand comes to to the XML protocol as passed, with the object and the metas of its arguments" $+        recorded "protocolXXXXXX.xml" >>= (`shouldContain` ["      <passed meta=\"𝑛·1·4\" by=\"morph\" match=\"plausible\" at=\"ξ.a\" of=\"𝑛·0·4\" object=\"Φ.down\"><with><meta attr=\"i\">𝑒·0·2</meta></with></passed>"])++      it "cuts the recursive call after the firing that handed it back" $+        recorded "protocolXXXXXX.txt" >>= (`shouldContain` ["  looped 𝜎1 ≔ Φ.down( i ↦ Φ.wrap( v ↦ 01-:Δ ) )  # 𝔼(𝑛·0·13.a), plausible, repeats 𝑛·0·13"])++    describe "--acyclic at a recursive call through a fork" $ do+      let recursive = "⟦ if(c, a, b) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ξ.c, left🌵 ↦ ξ.a, right🌵 ↦ ξ.b ⟧, wrap(v) ↦ ⟦⟧, down(i) ↦ ⟦ φ ↦ Φ.if( c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ Φ.down( i ↦ Φ.wrap( v ↦ i ) ), b ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧ ) ⟧, t ↦ Φ.down( i ↦ ⟦ Δ ⤍ 01- ⟧ ) ⟧"+          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  cast:\n    𝑛5: 𝑛3\n    𝑛6: 𝑛4\n  join:\n    on: 𝛿1\n    left: 𝑛5\n    right: 𝑛6\n    otherwise: L_fork\n"+          recorded :: String -> String -> IO [String]+          recorded loops name =+            withTempFile name $ \(path, stream) -> do+              hClose stream+              withLambdasOf forking $ \file ->+                withStdin recursive $+                  testCLISucceeded+                    ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-loops=" ++ loops, recording path, "--quiet", "--sweet", "--hide-rho"]+                    []+              lines <$> readProtocol path+      it "answers the copy a side of a fork makes again with a fresh symbol and joins" $+        withLambdasOf forking $ \file ->+          withStdin recursive $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-loops=1"] ["40-45-00-00-00-00-00-00"]++      it "writes the copy a side of a fork comes to again to the protocol as passed, as a call of the object" $+        recorded "1" "protocolXXXXXX.txt" >>= (`shouldContain` ["        passed 𝑛·3·4 ≔ Φ.down( i ↦ Φ.wrap( v ↦ Φ.wrap( v ↦ 01-:Δ ) ) )  # plausible, repeats 𝑛·0·4"])++      it "writes the copy a side of a fork comes to again to the XML protocol as passed, with the object and the metas of its arguments" $+        recorded "1" "protocolXXXXXX.xml" >>= (`shouldContain` ["        <passed meta=\"𝑛·3·4\" by=\"morph\" match=\"plausible\" at=\"ξ.left🌵\" of=\"𝑛·0·4\" object=\"Φ.down\"><with><meta attr=\"i\">𝑒·2·3</meta></with></passed>"])++      it "counts the copies the sides of earlier rounds of a fork made under --max-loops=2" $+        recorded "2" "protocolXXXXXX.txt" >>= (`shouldContain` ["          passed 𝑛·6·4 ≔ Φ.down( i ↦ Φ.wrap( v ↦ Φ.wrap( v ↦ Φ.wrap( v ↦ 01-:Δ ) ) ) )  # plausible, repeats 𝑛·0·4"])++    describe "--acyclic at an object an atom only hands back" $ do+      let world = "⟦ call(a) ↦ ⟦ λ ⤍ L_call ⟧, down ↦ ⟦ φ ↦ Φ.call( a ↦ Φ.down ).at, at ↦ 2A-:Δ ⟧, t ↦ Φ.down ⟧"+          calling = T.pack "- λ: L_call\n  morph:\n    𝑛1: $.a\n  𝑛: 𝑛1\n"+          recorded :: String -> IO [String]+          recorded name =+            withTempFile name $ \(path, stream) -> do+              hClose stream+              withLambdasOf calling $ \file ->+                withStdin world $+                  testCLISucceeded+                    ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", recording path, "--quiet", "--sweet", "--hide-rho"]+                    []+              lines <$> readProtocol path+      forM_ ["plausible", "proven"] $ \mode ->+        it ("hands the object back as it is and takes the attribute off it under --acyclic=" ++ mode) $+          withLambdasOf calling $ \file ->+            withStdin world $+              testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=" ++ mode] ["2A-"]++      it "writes the object it hands back to the protocol as passed" $+        recorded "protocolXXXXXX.txt" >>= (`shouldContain` ["        passed 𝑛·1·2 ≔ Φ.down  # plausible, repeats 𝑛·1·1"])++      it "writes the object it hands back to the XML protocol as passed" $+        recorded "protocolXXXXXX.xml" >>= (`shouldContain` ["        <passed meta=\"𝑛·1·2\" by=\"morph\" match=\"plausible\" at=\"ξ.a\" of=\"𝑛·1·1\" object=\"Φ.down\"/>"])++    describe "--acyclic at a copy holding a λ" $ do+      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, fork(left, right) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧, x ↦ Φ.dataized( target ↦ Φ.fork( left ↦ Φ.dataized( target ↦ Φ.x ), right ↦ ⟦ λ ⤍ 𝜎3 ⟧ ) ) ⟧"+          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+          recorded :: String -> IO [String]+          recorded name =+            withTempFile name $ \(path, stream) -> do+              hClose stream+              withLambdasOf forking $ \file ->+                withStdin recursive $+                  testCLISucceeded+                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", recording path, "--quiet", "--sweet", "--hide-rho"]+                    []+              lines <$> readProtocol path+      it "answers the copy holding a λ it cuts with a fresh symbol and goes on" $+        withLambdasOf forking $ \file ->+          withStdin recursive $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]++      it "writes the copy holding a λ it cuts to the protocol as a call of the object" $+        recorded "protocolXXXXXX.txt" >>= (`shouldContain` ["                      looped 𝜎8 ≔ Φ.dataized( target ↦ 𝜎7:λ )  # plausible, repeats 𝑛·7·2"])++    describe "--acyclic at a copy holding a λ that evaluate fires" $ do+      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, fork(left, right) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧, num(φ) ↦ ⟦⟧, x ↦ ⟦ φ ↦ Φ.fork( left ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ), right ↦ Φ.num( φ ↦ Φ.dataized( target ↦ Φ.x ) ) ) ⟧ ⟧"+          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+      it "answers the copy holding a λ that evaluate cuts with a fresh symbol and goes on" $+        withLambdasOf forking $ \file ->+          withStdin recursive $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]++    describe "--acyclic at a copy whose call ends with an attribute" $ do+      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, fork(left, right) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧, num(φ) ↦ ⟦⟧, x ↦ Φ.fork( left ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ), right ↦ Φ.fork( left ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ), right ↦ Φ.num( φ ↦ Φ.dataized( target ↦ Φ.x.φ ) ) ) ) ⟧"+          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+          recorded :: String -> IO [String]+          recorded name =+            withTempFile name $ \(path, stream) -> do+              hClose stream+              withLambdasOf forking $ \file ->+                withStdin recursive $+                  testCLISucceeded+                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", recording path, "--quiet", "--sweet", "--hide-rho"]+                    []+              lines <$> readProtocol path+      it "writes the copy it cuts to the protocol as a call of the object with the attribute it ends with" $+        recorded "protocolXXXXXX.txt" >>= (`shouldSatisfy` any (isInfixOf "looped 𝜎6 ≔ Φ.fork( left ↦ 𝑛·7·5, right ↦ 𝑛·8·2 ).right🌵.φ  # 𝔼(𝑛2 of L_fork), plausible"))++      it "writes the copy it cuts to the XML protocol with the object, the metas of its arguments and the attribute it ends with" $+        recorded "protocolXXXXXX.xml" >>= (`shouldSatisfy` any (isInfixOf "object=\"Φ.fork\" dispatch=\"right🌵.φ\"><with><meta attr=\"left\">𝑛·7·5</meta><meta attr=\"right\">𝑛·8·2</meta></with></looped>"))++    describe "--acyclic at a copy whose argument repeats the same loop" $ do+      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, times(b) ↦ ⟦ λ ⤍ L_times ⟧, x ↦ Φ.times( b ↦ Φ.dataized( target ↦ Φ.x ) ) ⟧"+          atoms = T.pack "- λ: L_times\n  dataize:\n    𝛿1: $.b\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+      it "ends the run with an answer once it cuts the loop" $+        withLambdasOf atoms $ \file ->+          withStdin recursive $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--max-seconds=30"] ["40-45-00-00-00-00-00-00"]++      it "writes the cut of the argument inside the cut of the call to the protocol" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withLambdasOf atoms $ \file ->+            withStdin recursive $+              testCLISucceeded+                ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--max-seconds=30", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]+                []+          records <- readProtocol path+          filter (isInfixOf "looped") (lines records) `shouldBe` ["                          looped 𝜎1 ≔ Φ.dataized( target ↦ Φ.x )  # 𝔼(𝑛·6·3.b), plausible, repeats 𝑛·6·6", "                          looped 𝜎2 ≔ Φ.times( b ↦ 𝜎1:λ )  # plausible, repeats 𝑛·6·3"]++    describe "--acyclic at a copy whose argument raises" $+      it "writes the copy of the terminator into the call it cuts by its name, never firing it" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withLambdasOf (T.pack "- λ: L_times\n  terminators: [L_throw]\n  dataize:\n    𝛿1: $.b\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n- λ: L_dataized\n  terminators: [L_throw]\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \file ->+            withStdin "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, throw(message) ↦ ⟦ λ ⤍ L_throw ⟧, times(b, c) ↦ ⟦ λ ⤍ L_times ⟧, x ↦ Φ.times( b ↦ Φ.dataized( target ↦ Φ.x ), c ↦ Φ.throw( message ↦ 𝜎1:λ ) ) ⟧" $+              testCLISucceeded+                ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--max-seconds=30", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]+                []+          records <- readProtocol path+          filter (isInfixOf "looped 𝜎3") (lines records) `shouldBe` ["                          looped 𝜎3 ≔ Φ.times( b ↦ 𝜎2:λ, c ↦ 𝑛·6·12 )  # plausible, repeats 𝑛·6·5"]++    describe "--acyclic at a fork the memo fabricated" $ do+      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, bool(fork) ↦ ⟦ if ↦ ξ.fork ⟧, num(φ) ↦ ⟦⟧, p ↦ ⟦ φ ↦ Φ.bool( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( left ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ), right ↦ Φ.num( φ ↦ Φ.dataized( target ↦ Φ.p ) ) ) ⟧, q ↦ ⟦ φ ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ) ⟧, x ↦ Φ.bool( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎1 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( left ↦ Φ.p, right ↦ Φ.q ) ⟧"+          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+          recorded :: IO [String]+          recorded =+            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+              hClose stream+              withLambdasOf forking $ \file ->+                withStdin recursive $+                  testCLISucceeded+                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]+                    []+              lines <$> readProtocol path+      it "answers the fork it cuts inside a formation the memo fabricated with a fresh symbol and goes on" $+        withLambdasOf forking $ \file ->+          withStdin recursive $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]++      it "writes the fork it cuts inside a fabricated formation by its symbol alone, since no fact names it" $+        recorded >>= (`shouldSatisfy` any (isInfixOf "looped 𝜎6  # 𝔻("))++      it "answers the fork it cuts inside a formation fabricated from a fork of the world with a fresh symbol and goes on" $+        withLambdasOf forking $ \file ->+          withStdin "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, fork(left, right) ↦ ⟦ λ ⤍ L_fork, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧, num(φ) ↦ ⟦⟧, p ↦ ⟦ φ ↦ Φ.fork( left ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ), right ↦ Φ.num( φ ↦ Φ.dataized( target ↦ Φ.p ) ) ) ⟧, q ↦ ⟦ φ ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ) ⟧, x ↦ Φ.fork( left ↦ Φ.p, right ↦ Φ.q ) ⟧" $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]++    describe "--acyclic at a fork written in place" $ do+      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, bool(fork) ↦ ⟦ if ↦ ξ.fork ⟧, num(φ) ↦ ⟦⟧, p ↦ ⟦ φ ↦ Φ.bool( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( left ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ), right ↦ Φ.num( φ ↦ Φ.dataized( target ↦ Φ.p ) ) ) ⟧, x ↦ Φ.p ⟧"+          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+          recorded :: IO [String]+          recorded =+            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+              hClose stream+              withLambdasOf forking $ \file ->+                withStdin recursive $+                  testCLISucceeded+                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]+                    []+              lines <$> readProtocol path+      it "answers the fork it cuts with a fresh symbol and goes on" $+        withLambdasOf forking $ \file ->+          withStdin recursive $+            testCLISucceeded ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2"] ["40-45-00-00-00-00-00-00"]++      it "writes the loop it cuts as a call of the object whose bindings the copy repeats exactly" $+        recorded >>= (`shouldSatisfy` any (isInfixOf "looped 𝜎5 ≔ Φ.p  #"))++      it "dont get stuck above the fork it cuts" $+        recorded >>= (`shouldNotSatisfy` any (isInfixOf "stuck L_dataized"))++    describe "--acyclic at a fork nested in a side of another fork" $ do+      let recursive = "⟦ dataized(target) ↦ ⟦ λ ⤍ L_dataized ⟧, bool(fork) ↦ ⟦ if ↦ ξ.fork ⟧, num(φ) ↦ ⟦⟧, p ↦ ⟦ φ ↦ Φ.bool( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎4 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( left ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ), right ↦ Φ.bool( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ ⟦ λ ⤍ 𝜎6 ⟧, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ).if( left ↦ Φ.num( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ), right ↦ Φ.num( φ ↦ Φ.dataized( target ↦ Φ.p ) ) ) ) ⟧, x ↦ Φ.p ⟧"+          forking = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n    otherwise: L_fork\n- λ: L_dataized\n  dataize:\n    𝛿1: $.target\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n"+          recorded :: IO [String]+          recorded =+            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+              hClose stream+              withLambdasOf forking $ \file ->+                withStdin recursive $+                  testCLISucceeded+                    ["dataize", "--symbolic=" ++ file, "--locator=Q.x", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]+                    []+              lines <$> readProtocol path+      it "writes the loop it cuts at the fabricated fork by its symbol alone, since no fact names it" $+        recorded >>= (`shouldSatisfy` any (isInfixOf "looped 𝜎7  # 𝔻(𝑛·9·12), plausible"))++      it "dont get stuck above the nested fork it cuts" $+        recorded >>= (`shouldNotSatisfy` any (isInfixOf "stuck L_dataized"))++    describe "--acyclic at copies of one atom called from different places" $+      it "dont cut a copy of an atom that only resembles the copies open above it" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withLambdasOf (T.pack "- λ: L_d\n  dataize:\n    𝛿1: $.t\n  𝑛: Φ.w( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )\n") $ \file ->+            withStdin "⟦ w ↦ ⟦ φ ↦ ∅, me ↦ ξ, you ↦ ξ, x ↦ Φ.d( t ↦ ξ ).me.you ⟧, d(t) ↦ ⟦ λ ⤍ L_d ⟧, e ↦ Φ.d( t ↦ Φ.d( t ↦ Φ.d( t ↦ ⟦ φ ↦ Φ.d( t ↦ ⟦ Δ ⤍ 01- ⟧ ).x ⟧ ) ) ) ⟧" $+              testCLISucceeded+                ["dataize", "--symbolic=" ++ file, "--locator=Q.e", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]+                []+          records <- readProtocol path+          lines records `shouldNotSatisfy` any (isInfixOf "looped")++    describe "--acyclic at a fork whose side grows the argument of a copy" $+      it "cuts the recursion that the side of the fork runs" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withLambdasOf (T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.on🌵\n  morph:\n    𝑛1: $.left🌵\n    𝑛2: $.right🌵\n  stay:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  evaluate:\n    𝑛5: 𝑛3\n    𝑛6: 𝑛4\n  undress:\n    𝑛15: 𝑛5\n    𝑛16: 𝑛6\n  symbolize:\n    𝑛11: 𝑛15\n    𝑛12: 𝑛16\n  defer:\n    𝑛13: 𝑛11\n    𝑛14: 𝑛12\n  cast:\n    𝑛19: 𝑛13\n    𝑛20: 𝑛14\n  join:\n    on: 𝛿1\n    left: 𝑛19\n    right: 𝑛20\n    otherwise: L_fork\n") $ \file ->+            withStdin "⟦ bit(fork) ↦ ⟦ if ↦ ξ.fork, φ ↦ ξ.fork( left ↦ FF-:Δ, right ↦ 00-:Δ ) ⟧, no ↦ Φ.bit( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ 00-:Δ, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ), maybe ↦ Φ.bit( fork ↦ ⟦ λ ⤍ L_fork, left ↦ ∅, right ↦ ∅, on🌵 ↦ 𝜎1:λ, left🌵 ↦ ξ.left, right🌵 ↦ ξ.right ⟧ ), next(x) ↦ ⟦ φ ↦ ξ.x ⟧, down(i) ↦ ⟦ φ ↦ Φ.maybe.if( left ↦ Φ.no, right ↦ Φ.down( i ↦ Φ.next( x ↦ ξ.i ) ) ) ⟧, l🌵 ↦ ⟦ e1 ↦ Φ.down( i ↦ 𝜎3:λ ).if( left ↦ FF-:Δ, right ↦ 00-:Δ ) ⟧ ⟧" $+              testCLISucceeded+                ["dataize", "--symbolic=" ++ file, "--locator=Q.l🌵.e1", "--acyclic=plausible", "--max-loops=2", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho", "--max-steps=1000", "--max-seconds=10"]+                []+          records <- readProtocol path+          lines records `shouldSatisfy` any (isInfixOf "looped")++    it "dataizes with --sequence" $+      withStdin "[[ @ -> $.f(y -> [[ ]]), f -> [[ D> 00-, y -> ? ]] ]]" $+        testCLISucceeded+          ["dataize", "--sequence", "--output=latex", "--flat", "--sweet"]+          [ intercalate+              "\n"+              [ "\\begin{phiquation}"+              , "[[ @ -> |f| ( |y| -> [[]] ), |f|(|y|) -> |00-| : D ]] \\phiDataize[\\nameref{r:box}]"+              , "  \\phiDataize [[ @ -> |f| ( |y| -> [[]] ), |f|(|y|) -> |00-| : D ]] . @ \\phiNormalize[\\nameref{r:dot}]"+              , "  \\phiNormalize [[ |f|(|y|) -> |00-| : D ]] . |f| ( |y| -> [[]], \\phiTerminal{\\rho} -> Q ) \\phiNormalize[\\nameref{r:dot}]"+              , "  \\phiNormalize [[ D> |00-|, |y| -> ? ]] ( \\phiTerminal{\\rho} -> [[ |f|(|y|) -> |00-| : D ]], |y| -> [[]], \\phiTerminal{\\rho} -> Q ) \\phiNormalize[\\nameref{r:skip}]"+              , "  \\phiNormalize [[ D> |00-|, |y| -> ? ]] ( |y| -> [[]], \\phiTerminal{\\rho} -> Q ) \\phiNormalize[\\nameref{r:copy}]"+              , "  \\phiNormalize [[ D> |00-|, |y| -> [[]] ]] ( \\phiTerminal{\\rho} -> Q ) \\phiNormalize[\\nameref{r:skip}]"+              , "  \\phiNormalize [[ D> |00-|, |y| -> [[]] ]] \\phiDataize[\\nameref{r:delta}]"+              , "  \\phiDataize |00-|{.}"+              , "\\end{phiquation}"+              , "00-"+              ]+          ]++    it "keeps the delta step in --sequence under --quiet" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded+          ["dataize", "--sequence", "--quiet", "--output=latex", "--flat", "--sweet"]+          [ intercalate+              "\n"+              [ "|01-| : D \\phiDataize[\\nameref{r:delta}]"+              , "  \\phiDataize |01-|{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "ends the phi --sequence at the bare data" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded+          ["dataize", "--sequence", "--quiet", "--flat", "--sweet"]+          ["01-:Δ\n01-"]++    it "focuses a compressed sequence whose meet replaces a step root" $+      withStdin "[[ @ -> [[ @ -> $.c.plus( x -> 32.0 ), c -> 25.0 ]], bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus -> [[ ^ -> ?, x -> ?, L> L_number_plus ]] ]] ]]" $+        testCLISucceeded+          ["dataize", symbolic, "--output=latex", "--sweet", "--nonumber", "--compress", "--canonize", "--meet-prefix=dataization", "--sequence", "--flat", "--quiet", "--hide=Q.bytes", "--hide=Q.number", "--locator=Q.@", "--focus=Q.@", "--meet-length=5", "--meet-popularity=1"]+          ["\\phinoMeet{dataization:1}{ [[ @ -> |c| . |plus| ( |x| -> |32.0| ), |c| -> |25.0| ]] } \\phiDataize[\\nameref{r:box}]"]++    it "compresses a canonized whole-expression sequence into a meet" $+      withStdin "[[ @ -> [[ @ -> $.c.plus( x -> 32.0 ), c -> 25.0 ]], bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus -> [[ ^ -> ?, x -> ?, L> L_number_plus ]] ]] ]]" $+        testCLISucceeded+          ["dataize", symbolic, "--output=latex", "--sweet", "--nonumber", "--compress", "--canonize", "--meet-prefix=dataization", "--sequence", "--flat", "--quiet", "--meet-length=5", "--meet-popularity=1"]+          ["\\phinoMeet{dataization:1}"]++    it "canonizes the residue it prints with --partial" $+      withStdin "[[ @ -> [[ L> Foo ]] ]]" $+        testCLISucceeded ["dataize", "--partial", "--canonize", "--flat", "--sweet"] ["Fn1:λ"]++    it "hides an object outside the residue --locator aims at with --partial" $+      withStdin "[[ t -> [[ @ -> [[ L> Foo ]] ]], o -> [[ D> 03- ]] ]]" $+        testCLISucceeded ["dataize", "--partial", "--locator=Q.t", "--hide=Q.o", "--flat", "--sweet"] ["Foo:λ"]++    it "dataizes with --locator" $+      withStdin "[[ ex -> [[ @ -> Q.x ]], x -> [[ D> 42- ]] ]]" $+        testCLISucceeded ["dataize", "--locator=Q.ex"] ["42-"]++    it "does not print bytes with --quiet" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded ["dataize", "--quiet"] []++    describe "--abridged" $ do+      let wide = "⟦ t ↦ ⟦ φ ↦ ⟦ Δ ⤍ 01-02 ⟧, anfang ↦ ξ.schluss, mitte ↦ ξ.anfang, schluss ↦ ξ.mitte, rand ↦ ξ.schluss ⟧ ⟧"+          stuck = "⟦ t ↦ ⟦ λ ⤍ L_weit, anfang ↦ ξ.schluss, mitte ↦ ξ.anfang, schluss ↦ ξ.mitte, rand ↦ ξ.schluss ⟧ ⟧"+      it "folds a long formation in the text protocol" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin stuck $+            testCLISucceeded ["dataize", "--locator=Q.t", "--partial", "--minutes=" ++ path, "--abridged", "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          lines records `shouldContain` ["  unanswered L_weit  # 𝔻(⟦ λ ⤍ L_weit, +4 ⟧)"]+      it "names a long formation in the XML protocol by its path rather than folding it" $+        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withStdin stuck $+            testCLISucceeded ["dataize", "--locator=Q.t", "--partial", "--protocol=" ++ path, "--abridged", "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          lines records `shouldContain` ["  <unanswered λ=\"L_weit\" by=\"dataize\">Φ.t</unanswered>"]+      forM_+        [ ("textXXXXXX.txt", "      𝛿·1·1 ≔ 01-02-..(8b)..-0B-0C")+        , ("XMLXXXXXX.xml", "      <dataized meta=\"𝛿·1·1\">01-02-..(8b)..-0B-0C</dataized>")+        ]+        ( \(template, line) ->+            it ("cuts a long datum a firing came down to under --abridged-data, as " ++ line) $+              withTempFile template $ \(path, stream) -> do+                hClose stream+                withLambdasOf (T.pack "- λ: L_outer\n  dataize:\n    𝛿1: ξ.arg\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \outer ->+                  withStdin "⟦ x ↦ ⟦ arg ↦ ⟦ Δ ⤍ 01-02-03-04-05-06-07-08-09-0A-0B-0C ⟧, λ ⤍ L_outer ⟧ ⟧" $+                    testCLISucceeded ["dataize", "--symbolic=" ++ outer, "--locator=Q.x", "--partial", recording path, "--abridged", "--abridged-data", "--sweet", "--hide-rho", "--quiet"] []+                records <- readProtocol path+                lines records `shouldContain` [line]+        )+      forM_+        [ ("textXXXXXX.txt", "      𝛿·1·1 ≔ 30-31-32-33-34-35-36-37-38-39-41-42-43-44-45-46")+        , ("XMLXXXXXX.xml", "      <dataized meta=\"𝛿·1·1\">30-31-32-33-34-35-36-37-38-39-41-42-43-44-45-46</dataized>")+        ]+        ( \(template, line) ->+            it ("keeps a long datum a firing came down to whole without --abridged-data, as " ++ line) $+              withTempFile template $ \(path, stream) -> do+                hClose stream+                withLambdasOf (T.pack "- λ: L_hex\n  dataize:\n    𝛿1: ξ.arg\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \hex ->+                  withStdin "⟦ x ↦ ⟦ arg ↦ ⟦ Δ ⤍ 30-31-32-33-34-35-36-37-38-39-41-42-43-44-45-46 ⟧, λ ⤍ L_hex ⟧ ⟧" $+                    testCLISucceeded ["dataize", "--symbolic=" ++ hex, "--locator=Q.x", "--partial", recording path, "--abridged", "--sweet", "--hide-rho", "--quiet"] []+                records <- readProtocol path+                lines records `shouldContain` [line]+        )+      it "folds a long formation under the width given as the value" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin stuck $+            testCLISucceeded ["dataize", "--locator=Q.t", "--partial", "--minutes=" ++ path, "--abridged=64", "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          lines records `shouldContain` ["  unanswered L_weit  # 𝔻(⟦ λ ⤍ L_weit, +4 ⟧)"]+      it "keeps a formation whole under a width it fits in" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin stuck $+            testCLISucceeded ["dataize", "--locator=Q.t", "--partial", "--minutes=" ++ path, "--abridged=200", "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          lines records `shouldContain` ["  unanswered L_weit  # 𝔻(⟦ λ ⤍ L_weit, anfang ↦ schluss, mitte ↦ anfang, schluss ↦ mitte, rand ↦ schluss ⟧)"]+      it "refuses a width that is not a number" $+        withStdin wide $+          testCLIFailed ["dataize", "--locator=Q.t", "--protocol=breit.txt", "--abridged=breit"] ["cannot parse value `breit'"]+      it "leaves the printed result whole" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin wide $+            testCLISucceeded ["morph", "--locator=Q.t", "--minutes=" ++ path, "--abridged", "--sweet", "--hide-rho", "--flat"] ["anfang ↦ schluss, mitte ↦ anfang"]+      it "refuses the flag without a protocol" $+        withStdin wide $+          testCLIFailed ["dataize", "--locator=Q.t", "--abridged"] ["The option --abridged requires --protocol"]+      it "refuses to cut the data in dataize without --abridged" $+        withStdin wide $+          testCLIFailed ["dataize", "--locator=Q.t", "--protocol=daten.txt", "--abridged-data"] ["The option --abridged-data requires --abridged"]+      it "refuses to cut the data in morph without --abridged" $+        withStdin wide $+          testCLIFailed ["morph", "--locator=Q.t", "--protocol=daten.xml", "--abridged-data"] ["The option --abridged-data requires --abridged"]++    describe "--protocol" $ do+      let sum' = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6) ]]"+          chained = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6).plus(x -> 7) ]]"+          nested = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6.plus(x -> 7)) ]]"+          mixed = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]], times(^, x) -> [[ L> L_number_times ]] ]], @ -> 5.plus(x -> 6).times(x -> 7) ]]"+      it "opens the protocol with the run it is the protocol of" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []+          records <- readProtocol path+          records `shouldBe` "𝔻(Φ):\n  𝛿·0·1 ≔ 01-\n"++      it "adds the time, the depth, the firings and the memory to every line under --profile" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--minutes=" ++ path, "--profile", "--quiet"] []+          records <- readProtocol path+          lines records `shouldSatisfy` all (\line -> all (`isInfixOf` line) [" ms, at ", ", depth ", ", firings ", ", heap ", ", peak "])++      it "refuses --profile without --minutes" $+        withStdin "[[ D> 01- ]]" $+          testCLIFailed ["dataize", "--profile", "--quiet"] ["The option --profile requires --minutes"]++      it "opens the protocol with a header naming the phino that wrote it" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          records `shouldSatisfy` isPrefixOf ("# Written by phino " ++ showVersion version ++ " ")++      it "writes the command line of the run into the header" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--minutes=" ++ takeFileName path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` ["# Command: phino dataize --minutes=" ++ takeFileName path ++ " --quiet"]++      it "writes the world read from the standard input into the header" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $+            testCLISucceeded ["dataize", "--locator=Q.t", "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` ["# World: stdin, 1 line, 32 bytes, 1 object at the top, 2 bindings"]++      it "writes the world read from a file into the header" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withTempFileContent "worldXXXXXX.phi" "[[\n  t -> [[ D> 01- ]]\n]]\n" $ \world -> do+            testCLISucceeded ["dataize", "--locator=Q.t", "--minutes=" ++ path, "--quiet", world] []+            records <- readUtf8 path+            lines records `shouldContain` [printf "# World: %s, 3 lines, 26 bytes, 1 object at the top, 2 bindings" world]++      it "writes the λ functions of the run into the header" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin sum' $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` [printf "# Symbolic: %s, 5 entries" lambdasFile]++      it "writes the locator of the run into the header" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $+            testCLISucceeded ["dataize", "--locator=Q.t", "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` ["# Locator: Φ.t"]++      it "writes the expression the locator points at into the header" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $+            testCLISucceeded ["dataize", "--locator=Q.t", "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` ["# Expression: ⟦ Δ ⤍ 01- ⟧"]++      it "writes the expression given to --inside into the header" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $+            testCLISucceeded ["morph", "--inside=Φ.t", "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` ["# Expression: Φ.t"]++      it "writes the header into the XML protocol" $+        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withStdin "⟦ t ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $+            testCLISucceeded ["dataize", "--locator=Q.t", "--protocol=" ++ path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` ["  <locator>Φ.t</locator>"]++      it "closes the protocol with its msec on the third line from the end" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin sum' $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          (lines records !! (length (lines records) - 3)) `shouldSatisfy` isPrefixOf "msec "++      it "closes the protocol with the firings it counted" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin sum' $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` ["firings 1"]++      it "closes the protocol with its fps on the last line" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin sum' $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          last (lines records) `shouldSatisfy` isPrefixOf "fps "++      it "closes the protocol with zero firings when the run fires nothing" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []+          records <- readUtf8 path+          lines records `shouldContain` ["firings 0"]++      it "writes one line per operand and one per answer of a firing" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin sum' $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          lines records+            `shouldBe` [ "𝔻(Φ):"+                       , "  boxed 𝑛·0·1 ≔ Φ.φ"+                       , "  normalized 𝑛·0·2 ≔ 5.0.plus( x ↦ 6.0 )  # Φ.φ"+                       , "  𝕄(𝑛·0·1):"+                       , "    normalized 𝑛·0·3 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"+                       , "    𝑛·0·4 ≔ 5.0"+                       , "    𝑛·0·5 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "    normalized 𝑛·0·6 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"+                       , "    𝑛·0·7 ≔ 𝑛·0·4.plus( x ↦ 6.0 )"+                       , "    𝑛·0·8 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"+                       , "    morphed 𝑛·0·9 ≔ 𝑛·0·8"+                       , "  𝔼(L_number_plus):  # 𝔻(𝑛·0·1)"+                       , "    𝔻(ξ.ρ):"+                       , "      𝕄(ξ.ρ):"+                       , "        𝑛·1·1 ≔ 5.0"+                       , "        𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "        morphed 𝑛·1·3 ≔ 𝑛·1·2"+                       , "      boxed 𝑛·1·4 ≔ 𝑛·1·3.φ"+                       , "      normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"+                       , "      𝕄(𝑛·1·4):"+                       , "        normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes"+                       , "        𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"+                       , "        𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ"+                       , "        morphed 𝑛·1·9 ≔ 𝑛·1·8"+                       , "      boxed 𝑛·1·10 ≔ 𝑛·1·9.φ"+                       , "      normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"+                       , "      𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0"+                       , "    𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)"+                       , "    𝔻(ξ.x):"+                       , "      𝕄(ξ.x):"+                       , "        𝑛·1·12 ≔ 6.0"+                       , "        𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "        morphed 𝑛·1·14 ≔ 𝑛·1·13"+                       , "      boxed 𝑛·1·15 ≔ 𝑛·1·14.φ"+                       , "      normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"+                       , "      𝕄(𝑛·1·15):"+                       , "        𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"+                       , "        𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ"+                       , "        morphed 𝑛·1·19 ≔ 𝑛·1·18"+                       , "      boxed 𝑛·1·20 ≔ 𝑛·1·19.φ"+                       , "      normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"+                       , "      𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0"+                       , "    𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)"+                       , "    𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"+                       , "    𝕄(𝑛·1·22):"+                       , "      𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                       , "      𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"+                       , "      morphed 𝑛·1·25 ≔ 𝑛·1·24"+                       , "    𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)"+                       , "    evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·8"+                       , "  boxed 𝑛·0·10 ≔ 𝑛·1·27.φ"+                       , "  normalized 𝑛·0·11 ≔ 𝜎1:λ  # 𝑛·0·10"+                       , "  𝛿·0·1 ≔ 𝔻(𝜎1:λ)"+                       ]++      it "writes what every morphing a dataization ran came to" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withLambdasOf (T.pack "- λ: L_make\n  𝑛: ⟦ φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ ) ⟧\n") $ \makes ->+            withStdin "⟦ bytes ↦ ⟦ φ ↦ ∅ ⟧, make ↦ ⟦ λ ⤍ L_make ⟧, foo ↦ ⟦ φ ↦ Φ.make ⟧, e ↦ Φ.foo ⟧" $+              testCLISucceeded ["dataize", "--symbolic=" ++ makes, "--locator=Q.e", "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          lines records+            `shouldBe` [ "𝔻(Φ.e):"+                       , "  𝕄(Φ.e):"+                       , "    remembered 𝑛·0·1 ≡ Φ.foo  # Φ.make:φ"+                       , "    morphed 𝑛·0·2 ≔ 𝑛·0·1"+                       , "  boxed 𝑛·0·3 ≔ 𝑛·0·2.φ"+                       , "  normalized 𝑛·0·4 ≔ Φ.make  # 𝑛·0·3"+                       , "  𝕄(𝑛·0·3):"+                       , "    remembered 𝑛·0·5 ≡ Φ.make  # L_make:λ"+                       , "    morphed 𝑛·0·6 ≔ 𝑛·0·5"+                       , "  𝔼(L_make):  # 𝔻(𝑛·0·3)"+                       , "    𝑛·1·1 ≔ Φ.bytes( φ ↦ 𝜎1:λ ):φ  # 𝑛 of L_make"+                       , "    𝕄(𝑛·1·1):"+                       , "      morphed 𝑛·1·2 ≔ Φ.bytes( φ ↦ 𝜎1:λ ):φ"+                       , "    𝑛·1·3 ≔ 𝑛·1·2  # 𝕄(𝑛·1·1)"+                       , "    remembered 𝑛·1·3 ≡ 𝑛·0·5"+                       , "    evaluated 𝑛·1·4 ≔ 𝑛·1·3  # 𝑛·0·5"+                       , "  boxed 𝑛·0·7 ≔ 𝑛·1·4.φ"+                       , "  normalized 𝑛·0·8 ≔ Φ.bytes( φ ↦ 𝜎1:λ )  # 𝑛·0·7"+                       , "  𝕄(𝑛·0·7):"+                       , "    normalized 𝑛·0·9 ≔ ∅:φ  # Φ.bytes"+                       , "    𝑛·0·10 ≔ Φ.bytes( φ ↦ 𝜎1:λ )"+                       , "    𝑛·0·11 ≔ 𝜎1:λ:φ"+                       , "    morphed 𝑛·0·12 ≔ 𝑛·0·11"+                       , "  boxed 𝑛·0·13 ≔ 𝑛·0·12.φ"+                       , "  normalized 𝑛·0·14 ≔ 𝜎1:λ  # 𝑛·0·13"+                       , "  𝛿·0·1 ≔ 𝔻(𝜎1:λ)"+                       ]++      it "numbers the firings of one entry apart and names the symbol between them" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin chained $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          lines records+            `shouldBe` [ "𝔻(Φ):"+                       , "  boxed 𝑛·0·1 ≔ Φ.φ"+                       , "  normalized 𝑛·0·2 ≔ 5.0.plus( x ↦ 6.0 ).plus( x ↦ 7.0 )  # Φ.φ"+                       , "  𝕄(𝑛·0·1):"+                       , "    normalized 𝑛·0·3 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"+                       , "    𝑛·0·4 ≔ 5.0"+                       , "    𝑛·0·5 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "    normalized 𝑛·0·6 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"+                       , "    𝑛·0·7 ≔ 𝑛·0·4.plus( x ↦ 6.0 )"+                       , "    𝑛·0·8 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"+                       , "    𝔼(L_number_plus):"+                       , "      𝔻(ξ.ρ):"+                       , "        𝕄(ξ.ρ):"+                       , "          𝑛·1·1 ≔ 5.0"+                       , "          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "          morphed 𝑛·1·3 ≔ 𝑛·1·2"+                       , "        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ"+                       , "        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"+                       , "        𝕄(𝑛·1·4):"+                       , "          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes"+                       , "          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"+                       , "          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ"+                       , "          morphed 𝑛·1·9 ≔ 𝑛·1·8"+                       , "        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ"+                       , "        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"+                       , "        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0"+                       , "      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)"+                       , "      𝔻(ξ.x):"+                       , "        𝕄(ξ.x):"+                       , "          𝑛·1·12 ≔ 6.0"+                       , "          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "          morphed 𝑛·1·14 ≔ 𝑛·1·13"+                       , "        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ"+                       , "        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"+                       , "        𝕄(𝑛·1·15):"+                       , "          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"+                       , "          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ"+                       , "          morphed 𝑛·1·19 ≔ 𝑛·1·18"+                       , "        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ"+                       , "        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"+                       , "        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0"+                       , "      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)"+                       , "      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"+                       , "      𝕄(𝑛·1·22):"+                       , "        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                       , "        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"+                       , "        morphed 𝑛·1·25 ≔ 𝑛·1·24"+                       , "      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)"+                       , "      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·8"+                       , "    normalized 𝑛·0·9 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·27.plus"+                       , "    𝑛·0·10 ≔ 𝑛·1·23.plus( x ↦ 7.0 )"+                       , "    𝑛·0·11 ≔ ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"+                       , "    morphed 𝑛·0·12 ≔ 𝑛·0·11"+                       , "  𝔼(L_number_plus):  # 𝔻(𝑛·0·1)"+                       , "    𝔻(ξ.ρ):"+                       , "      𝕄(ξ.ρ):"+                       , "        𝑛·2·1 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                       , "        𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"+                       , "        morphed 𝑛·2·3 ≔ 𝑛·1·26"+                       , "      boxed 𝑛·2·4 ≔ 𝑛·2·3.φ"+                       , "      normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4"+                       , "      𝛿·2·1 ≔ 𝔻(𝜎1:λ)"+                       , "    𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)"+                       , "    𝔻(ξ.x):"+                       , "      𝕄(ξ.x):"+                       , "        𝑛·2·6 ≔ 7.0"+                       , "        𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "        morphed 𝑛·2·8 ≔ 𝑛·2·7"+                       , "      boxed 𝑛·2·9 ≔ 𝑛·2·8.φ"+                       , "      normalized 𝑛·2·10 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·9"+                       , "      𝕄(𝑛·2·9):"+                       , "        𝑛·2·11 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )"+                       , "        𝑛·2·12 ≔ 40-1C-00-00-00-00-00-00:Δ:φ"+                       , "        morphed 𝑛·2·13 ≔ 𝑛·2·12"+                       , "      boxed 𝑛·2·14 ≔ 𝑛·2·13.φ"+                       , "      normalized 𝑛·2·15 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·14"+                       , "      𝛿·2·2 ≔ 40-1C-00-00-00-00-00-00  # 7.0"+                       , "    𝛿2·2 ≔ 𝛿·2·2  # 𝔻(ξ.x)"+                       , "    𝑛·2·16 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus"+                       , "    𝕄(𝑛·2·16):"+                       , "      𝑛·2·17 ≔ Φ.number( φ ↦ 𝜎2:λ )"+                       , "      𝑛·2·18 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧"+                       , "      morphed 𝑛·2·19 ≔ 𝑛·2·18"+                       , "    𝑛·2·20 ≔ 𝑛·2·19  # 𝕄(𝑛·2·16)"+                       , "    evaluated 𝑛·2·21 ≔ 𝑛·2·20  # 𝑛·0·11"+                       , "  boxed 𝑛·0·13 ≔ 𝑛·2·21.φ"+                       , "  normalized 𝑛·0·14 ≔ 𝜎2:λ  # 𝑛·0·13"+                       , "  𝛿·0·1 ≔ 𝔻(𝜎2:λ)"+                       ]++      it "numbers the firings of different entries apart" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin mixed $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          lines records+            `shouldBe` [ "𝔻(Φ):"+                       , "  boxed 𝑛·0·1 ≔ Φ.φ"+                       , "  normalized 𝑛·0·2 ≔ 5.0.plus( x ↦ 6.0 ).times( x ↦ 7.0 )  # Φ.φ"+                       , "  𝕄(𝑛·0·1):"+                       , "    normalized 𝑛·0·3 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧  # Φ.number"+                       , "    𝑛·0·4 ≔ 5.0"+                       , "    𝑛·0·5 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"+                       , "    normalized 𝑛·0·6 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"+                       , "    𝑛·0·7 ≔ 𝑛·0·4.plus( x ↦ 6.0 )"+                       , "    𝑛·0·8 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"+                       , "    𝔼(L_number_plus):"+                       , "      𝔻(ξ.ρ):"+                       , "        𝕄(ξ.ρ):"+                       , "          𝑛·1·1 ≔ 5.0"+                       , "          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"+                       , "          morphed 𝑛·1·3 ≔ 𝑛·1·2"+                       , "        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ"+                       , "        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"+                       , "        𝕄(𝑛·1·4):"+                       , "          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes"+                       , "          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"+                       , "          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ"+                       , "          morphed 𝑛·1·9 ≔ 𝑛·1·8"+                       , "        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ"+                       , "        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"+                       , "        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0"+                       , "      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)"+                       , "      𝔻(ξ.x):"+                       , "        𝕄(ξ.x):"+                       , "          𝑛·1·12 ≔ 6.0"+                       , "          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"+                       , "          morphed 𝑛·1·14 ≔ 𝑛·1·13"+                       , "        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ"+                       , "        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"+                       , "        𝕄(𝑛·1·15):"+                       , "          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"+                       , "          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ"+                       , "          morphed 𝑛·1·19 ≔ 𝑛·1·18"+                       , "        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ"+                       , "        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"+                       , "        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0"+                       , "      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)"+                       , "      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"+                       , "      𝕄(𝑛·1·22):"+                       , "        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                       , "        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"+                       , "        morphed 𝑛·1·25 ≔ 𝑛·1·24"+                       , "      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)"+                       , "      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·8"+                       , "    normalized 𝑛·0·9 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_times ⟧  # 𝑛·1·27.times"+                       , "    𝑛·0·10 ≔ 𝑛·1·23.times( x ↦ 7.0 )"+                       , "    𝑛·0·11 ≔ ⟦ x ↦ 7.0, λ ⤍ L_number_times ⟧"+                       , "    morphed 𝑛·0·12 ≔ 𝑛·0·11"+                       , "  𝔼(L_number_times):  # 𝔻(𝑛·0·1)"+                       , "    𝔻(ξ.ρ):"+                       , "      𝕄(ξ.ρ):"+                       , "        𝑛·2·1 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                       , "        𝑛·2·2 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"+                       , "        morphed 𝑛·2·3 ≔ 𝑛·1·26"+                       , "      boxed 𝑛·2·4 ≔ 𝑛·2·3.φ"+                       , "      normalized 𝑛·2·5 ≔ 𝜎1:λ  # 𝑛·2·4"+                       , "      𝛿·2·1 ≔ 𝔻(𝜎1:λ)"+                       , "    𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)"+                       , "    𝔻(ξ.x):"+                       , "      𝕄(ξ.x):"+                       , "        𝑛·2·6 ≔ 7.0"+                       , "        𝑛·2·7 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"+                       , "        morphed 𝑛·2·8 ≔ 𝑛·2·7"+                       , "      boxed 𝑛·2·9 ≔ 𝑛·2·8.φ"+                       , "      normalized 𝑛·2·10 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·9"+                       , "      𝕄(𝑛·2·9):"+                       , "        𝑛·2·11 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )"+                       , "        𝑛·2·12 ≔ 40-1C-00-00-00-00-00-00:Δ:φ"+                       , "        morphed 𝑛·2·13 ≔ 𝑛·2·12"+                       , "      boxed 𝑛·2·14 ≔ 𝑛·2·13.φ"+                       , "      normalized 𝑛·2·15 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·14"+                       , "      𝛿·2·2 ≔ 40-1C-00-00-00-00-00-00  # 7.0"+                       , "    𝛿2·2 ≔ 𝛿·2·2  # 𝔻(ξ.x)"+                       , "    𝑛·2·16 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_times"+                       , "    𝕄(𝑛·2·16):"+                       , "      𝑛·2·17 ≔ Φ.number( φ ↦ 𝜎2:λ )"+                       , "      𝑛·2·18 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ, times(x) ↦ L_number_times:λ ⟧"+                       , "      morphed 𝑛·2·19 ≔ 𝑛·2·18"+                       , "    𝑛·2·20 ≔ 𝑛·2·19  # 𝕄(𝑛·2·16)"+                       , "    evaluated 𝑛·2·21 ≔ 𝑛·2·20  # 𝑛·0·11"+                       , "  boxed 𝑛·0·13 ≔ 𝑛·2·21.φ"+                       , "  normalized 𝑛·0·14 ≔ 𝜎2:λ  # 𝑛·0·13"+                       , "  𝛿·0·1 ≔ 𝔻(𝜎2:λ)"+                       ]++      it "nests the firing an operand of another firing brought down" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin nested $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          lines records+            `shouldBe` [ "𝔻(Φ):"+                       , "  boxed 𝑛·0·1 ≔ Φ.φ"+                       , "  normalized 𝑛·0·2 ≔ 5.0.plus( x ↦ 6.0.plus( x ↦ 7.0 ) )  # Φ.φ"+                       , "  𝕄(𝑛·0·1):"+                       , "    normalized 𝑛·0·3 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"+                       , "    𝑛·0·4 ≔ 5.0"+                       , "    𝑛·0·5 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "    normalized 𝑛·0·6 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"+                       , "    shared 𝑛·1 ≔ 6.0.plus( x ↦ 7.0 )"+                       , "    𝑛·0·7 ≔ 𝑛·0·4.plus( x ↦ 𝑛·1 )"+                       , "    𝑛·0·8 ≔ ⟦ x ↦ 𝑛·1, λ ⤍ L_number_plus ⟧"+                       , "    morphed 𝑛·0·9 ≔ 𝑛·0·8"+                       , "  𝔼(L_number_plus):  # 𝔻(𝑛·0·1)"+                       , "    𝔻(ξ.ρ):"+                       , "      𝕄(ξ.ρ):"+                       , "        𝑛·1·1 ≔ 5.0"+                       , "        𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "        morphed 𝑛·1·3 ≔ 𝑛·1·2"+                       , "      boxed 𝑛·1·4 ≔ 𝑛·1·3.φ"+                       , "      normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"+                       , "      𝕄(𝑛·1·4):"+                       , "        normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes"+                       , "        𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"+                       , "        𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ"+                       , "        morphed 𝑛·1·9 ≔ 𝑛·1·8"+                       , "      boxed 𝑛·1·10 ≔ 𝑛·1·9.φ"+                       , "      normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"+                       , "      𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0"+                       , "    𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)"+                       , "    𝔻(ξ.x):"+                       , "      𝕄(ξ.x):"+                       , "        𝑛·1·12 ≔ 6.0"+                       , "        𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "        normalized 𝑛·1·14 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·13.plus"+                       , "        𝑛·1·15 ≔ 𝑛·1·12.plus( x ↦ 7.0 )"+                       , "        𝑛·1·16 ≔ ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"+                       , "        morphed 𝑛·1·17 ≔ 𝑛·1·16"+                       , "      𝔼(L_number_plus):"+                       , "        𝔻(ξ.ρ):"+                       , "          𝕄(ξ.ρ):"+                       , "            𝑛·2·1 ≔ 6.0"+                       , "            𝑛·2·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "            morphed 𝑛·2·3 ≔ 𝑛·2·2"+                       , "          boxed 𝑛·2·4 ≔ 𝑛·2·3.φ"+                       , "          normalized 𝑛·2·5 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·2·4"+                       , "          𝕄(𝑛·2·4):"+                       , "            𝑛·2·6 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"+                       , "            𝑛·2·7 ≔ 40-18-00-00-00-00-00-00:Δ:φ"+                       , "            morphed 𝑛·2·8 ≔ 𝑛·2·7"+                       , "          boxed 𝑛·2·9 ≔ 𝑛·2·8.φ"+                       , "          normalized 𝑛·2·10 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·2·9"+                       , "          𝛿·2·1 ≔ 40-18-00-00-00-00-00-00  # 6.0"+                       , "        𝛿1·2 ≔ 𝛿·2·1  # 𝔻(ξ.ρ)"+                       , "        𝔻(ξ.x):"+                       , "          𝕄(ξ.x):"+                       , "            𝑛·2·11 ≔ 7.0"+                       , "            𝑛·2·12 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                       , "            morphed 𝑛·2·13 ≔ 𝑛·2·12"+                       , "          boxed 𝑛·2·14 ≔ 𝑛·2·13.φ"+                       , "          normalized 𝑛·2·15 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )  # 𝑛·2·14"+                       , "          𝕄(𝑛·2·14):"+                       , "            𝑛·2·16 ≔ Φ.bytes( φ ↦ 40-1C-00-00-00-00-00-00:Δ )"+                       , "            𝑛·2·17 ≔ 40-1C-00-00-00-00-00-00:Δ:φ"+                       , "            morphed 𝑛·2·18 ≔ 𝑛·2·17"+                       , "          boxed 𝑛·2·19 ≔ 𝑛·2·18.φ"+                       , "          normalized 𝑛·2·20 ≔ 40-1C-00-00-00-00-00-00:Δ  # 𝑛·2·19"+                       , "          𝛿·2·2 ≔ 40-1C-00-00-00-00-00-00  # 7.0"+                       , "        𝛿2·2 ≔ 𝛿·2·2  # 𝔻(ξ.x)"+                       , "        𝑛·2·21 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"+                       , "        𝕄(𝑛·2·21):"+                       , "          𝑛·2·22 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                       , "          𝑛·2·23 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"+                       , "          morphed 𝑛·2·24 ≔ 𝑛·2·23"+                       , "        𝑛·2·25 ≔ 𝑛·2·24  # 𝕄(𝑛·2·21)"+                       , "        evaluated 𝑛·2·26 ≔ 𝑛·2·25  # 𝑛·1·16"+                       , "      boxed 𝑛·1·18 ≔ 𝑛·2·26.φ"+                       , "      normalized 𝑛·1·19 ≔ 𝜎1:λ  # 𝑛·1·18"+                       , "      𝛿·1·2 ≔ 𝔻(𝜎1:λ)"+                       , "    𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)"+                       , "    𝑛·1·20 ≔ Φ.number( φ ↦ 𝜎2:λ )  # 𝑛 of L_number_plus"+                       , "    𝕄(𝑛·1·20):"+                       , "      𝑛·1·21 ≔ Φ.number( φ ↦ 𝜎2:λ )"+                       , "      𝑛·1·22 ≔ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧"+                       , "      morphed 𝑛·1·23 ≔ 𝑛·1·22"+                       , "    𝑛·1·24 ≔ 𝑛·1·23  # 𝕄(𝑛·1·20)"+                       , "    evaluated 𝑛·1·25 ≔ 𝑛·1·24  # 𝑛·0·8"+                       , "  boxed 𝑛·0·10 ≔ 𝑛·1·25.φ"+                       , "  normalized 𝑛·0·11 ≔ 𝜎2:λ  # 𝑛·0·10"+                       , "  𝛿·0·1 ≔ 𝔻(𝜎2:λ)"+                       ]++      it "writes a stuck firing to the XML protocol" $+        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withLambdasOf (T.pack "- λ: L_outer\n  dataize:\n    𝛿1: ξ.arg\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \outer ->+            withStdin "⟦ x ↦ ⟦ arg ↦ ⟦ λ ⤍ L_absent ⟧, λ ⤍ L_outer ⟧.φ ⟧" $+              testCLISucceeded ["morph", "--symbolic=" ++ outer, "--locator=Q.x", "--partial", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          lines records `shouldContain` ["    <stuck λ=\"L_absent\"/>"]++      it "writes a starved step budget to the XML protocol" $+        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withLambdasOf (T.pack "- λ: L_outer\n  dataize:\n    𝛿1: ξ.arg\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \outer ->+            withStdin "⟦ x ↦ ⟦ arg ↦ ⟦ φ ↦ ⟦ φ ↦ ⟦ Δ ⤍ 07- ⟧ ⟧ ⟧, λ ⤍ L_outer ⟧ ⟧" $+              testCLISucceeded ["dataize", "--symbolic=" ++ outer, "--locator=Q.x", "--partial", "--max-steps=3", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho", "--flat"] []+          records <- readProtocol path+          lines records `shouldContain` ["      <starved limit=\"3\" by=\"dataize\" at=\"𝑛·1·3\"/>"]++      forM_+        [("XMLXXXXXX.xml", "<exceeded limit=\"7\" by=\"dataize\" at="), ("textXXXXXX.txt", "exceeded 7  # 𝔻(")]+        $ \(template, record) ->+          it ("writes the reached --max-cycles to the protocol " ++ template) $+            withTempFile template $ \(path, stream) -> do+              hClose stream+              withStdin "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( tup ↦ ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( tup ↦ ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( p ↦ 𝜎1:λ ) ⟧" $+                testCLISucceeded ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-cycles=7", "--partial", "--locator=Q.x", recording path, "--quiet", "--sweet", "--hide-rho"] []+              records <- readProtocol path+              any (isPrefixOf record . dropWhile (== ' ')) (lines records) `shouldBe` True++      forM_+        [("XMLXXXXXX.xml", "<oversized limit=\"60\" by=\"morph\" at="), ("textXXXXXX.txt", "oversized 60")]+        $ \(template, record) ->+          it ("writes the reached --max-nodes to the protocol " ++ template) $+            withTempFile template $ \(path, stream) -> do+              hClose stream+              withStdin "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( tup ↦ ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( tup ↦ ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( p ↦ 𝜎1:λ ) ⟧" $+                testCLISucceeded ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-nodes=60", "--partial", "--locator=Q.x", recording path, "--quiet", "--sweet", "--hide-rho"] []+              records <- readProtocol path+              any (isPrefixOf record . dropWhile (== ' ')) (lines records) `shouldBe` True++      forM_+        [("XMLXXXXXX.xml", "<blown limit=\"1K\" by="), ("textXXXXXX.txt", "blown 1K")]+        $ \(template, record) ->+          it ("writes the reached --max-memory to the protocol " ++ template) $+            withTempFile template $ \(path, stream) -> do+              hClose stream+              withStdin "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( tup ↦ ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( tup ↦ ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( p ↦ 𝜎1:λ ) ⟧" $+                testCLISucceeded ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-memory=1K", "--partial", "--locator=Q.x", recording path, "--quiet", "--sweet", "--hide-rho"] []+              records <- readProtocol path+              any (isPrefixOf record . dropWhile (== ' ')) (lines records) `shouldBe` True++      forM_+        [("XMLXXXXXX.xml", "<spent limit=\"5\" by="), ("textXXXXXX.txt", "  spent 5")]+        ( \(template, record) ->+            it ("writes a spent firing budget to the protocol as " ++ record) $+              withTempFile template $ \(path, stream) -> do+                hClose stream+                loopingLambdas $ \endless ->+                  withStdin "⟦ @ ↦ ⟦ λ ⤍ L_loop ⟧ ⟧" $+                    testCLIFailed ["dataize", "--symbolic=" ++ endless, "--max-steps=400", "--max-firings=5", recording path] ["--max-firings=5"]+                records <- readProtocol path+                any (record `isInfixOf`) (lines records) `shouldBe` True+        )++      it "keeps the lines of a run that fails" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]], nope -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> 5.plus(x -> 6).nope ]]" $+            testCLIFailed+              ["dataize", symbolic, "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"]+              ["No entry of --symbolic answers the λ function 'L_number_nope'"]+          records <- readProtocol path+          lines records+            `shouldBe` [ "𝔻(Φ):"+                       , "  boxed 𝑛·0·1 ≔ Φ.φ"+                       , "  normalized 𝑛·0·2 ≔ 5.0.plus( x ↦ 6.0 ).nope  # Φ.φ"+                       , "  𝕄(𝑛·0·1):"+                       , "    normalized 𝑛·0·3 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧  # Φ.number"+                       , "    𝑛·0·4 ≔ 5.0"+                       , "    𝑛·0·5 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧"+                       , "    normalized 𝑛·0·6 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·5.plus"+                       , "    𝑛·0·7 ≔ 𝑛·0·4.plus( x ↦ 6.0 )"+                       , "    𝑛·0·8 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"+                       , "    𝔼(L_number_plus):"+                       , "      𝔻(ξ.ρ):"+                       , "        𝕄(ξ.ρ):"+                       , "          𝑛·1·1 ≔ 5.0"+                       , "          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧"+                       , "          morphed 𝑛·1·3 ≔ 𝑛·1·2"+                       , "        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ"+                       , "        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"+                       , "        𝕄(𝑛·1·4):"+                       , "          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes"+                       , "          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"+                       , "          𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ"+                       , "          morphed 𝑛·1·9 ≔ 𝑛·1·8"+                       , "        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ"+                       , "        normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"+                       , "        𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0"+                       , "      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)"+                       , "      𝔻(ξ.x):"+                       , "        𝕄(ξ.x):"+                       , "          𝑛·1·12 ≔ 6.0"+                       , "          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧"+                       , "          morphed 𝑛·1·14 ≔ 𝑛·1·13"+                       , "        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ"+                       , "        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"+                       , "        𝕄(𝑛·1·15):"+                       , "          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"+                       , "          𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ"+                       , "          morphed 𝑛·1·19 ≔ 𝑛·1·18"+                       , "        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ"+                       , "        normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"+                       , "        𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0"+                       , "      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)"+                       , "      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"+                       , "      𝕄(𝑛·1·22):"+                       , "        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                       , "        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ, nope ↦ L_number_nope:λ ⟧"+                       , "        morphed 𝑛·1·25 ≔ 𝑛·1·24"+                       , "      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)"+                       , "      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·8"+                       , "    normalized 𝑛·0·9 ≔ L_number_nope:λ  # 𝑛·1·27.nope"+                       , "    morphed 𝑛·0·10 ≔ L_number_nope:λ"+                       , "  unanswered L_number_nope  # 𝔻(L_number_nope:λ)"+                       ]++      it "truncates the lines left over from the previous run" $+        withTempFileContent "protocolXXXXXX.txt" "𝔼(L_number_gt)\n" $ \path -> do+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []+          records <- readProtocol path+          records `shouldBe` "𝔻(Φ):\n  𝛿·0·1 ≔ 01-\n"++      it "writes the lines in 𝜑 even with --output=xmir" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin sum' $+            testCLISucceeded ["dataize", symbolic, "--minutes=" ++ path, "--output=xmir", "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          records `shouldEndWith` "    𝕄(𝑛·1·22):\n      𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )\n      𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧\n      morphed 𝑛·1·25 ≔ 𝑛·1·24\n    𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)\n    evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·8\n  boxed 𝑛·0·10 ≔ 𝑛·1·27.φ\n  normalized 𝑛·0·11 ≔ 𝜎1:λ  # 𝑛·0·10\n  𝛿·0·1 ≔ 𝔻(𝜎1:λ)\n"++      it "numbers every step in the text as the XML of the same run numbers it" $+        withTempFile "protocolXXXXXX.txt" $ \(text, one) ->+          withTempFile "protocolXXXXXX.xml" $ \(xml, two) -> do+            hClose one+            hClose two+            withStdin nested $+              testCLISucceeded ["dataize", symbolic, "--minutes=" ++ text, "--quiet", "--sweet", "--hide-rho"] []+            withStdin nested $+              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ xml, "--quiet", "--sweet", "--hide-rho"] []+            lined <- readProtocol text+            marked <- readProtocol xml+            [meta | meta : "≔" : _ <- map (dropWhile (`elem` ["boxed", "morphed", "normalized", "fabricated", "evaluated", "shared"]) . words) (lines lined), "𝑛·" `isPrefixOf` meta]+              `shouldBe` [takeWhile (/= '"') (drop 6 token) | token <- words marked, "meta=\"𝑛·" `isPrefixOf` token]++      describe "as XML" $ do+        it "writes the document when the file is named .xml" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin sum' $+              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<dataize at=\"Φ\">"+                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"+                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "  <applied meta=\"𝑒·0·5\" of=\"𝑒·0·2.plus\"><meta attr=\"x\">𝑒·0·4</meta><ref attr=\"ρ\">Φ</ref></applied>"+                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·5</normalized>"+                         , "  <morph at=\"𝑛·0·1\">"+                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"+                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.plus\">𝑛·0·4.plus</normalized>"+                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑒·0·4</meta></applied>"+                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑒·0·4</meta></formed>"+                         , "    <morphed meta=\"𝑛·0·9\">𝑛·0·8</morphed>"+                         , "  </morph>"+                         , "  <evaluate λ=\"L_number_plus\" by=\"dataize\" at=\"𝑛·0·1\">"+                         , "    <dataize at=\"ξ.ρ\">"+                         , "      <morph at=\"ξ.ρ\">"+                         , "        <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "        <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "        <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"+                         , "      <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"+                         , "      <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"+                         , "      <morph at=\"𝑛·1·4\">"+                         , "        <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"+                         , "        <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"+                         , "        <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></formed>"+                         , "        <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"+                         , "      <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-14-00-00-00-00-00-00</normalized>"+                         , "      <dataized meta=\"𝛿·1·1\" number=\"5.0\">40-14-00-00-00-00-00-00</dataized>"+                         , "    </dataize>"+                         , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"+                         , "    <dataize at=\"ξ.x\">"+                         , "      <morph at=\"ξ.x\">"+                         , "        <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "        <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"+                         , "        <morphed meta=\"𝑛·1·14\">𝑛·1·13</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·1·15\">𝑛·1·14.φ</boxed>"+                         , "      <applied meta=\"𝑒·1·2\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·1·12</meta></applied>"+                         , "      <normalized meta=\"𝑛·1·16\" of=\"𝑛·1·15\">𝑒·1·2</normalized>"+                         , "      <morph at=\"𝑛·1·15\">"+                         , "        <applied meta=\"𝑛·1·17\" by=\"morph\" at=\"𝑛·1·15\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"+                         , "        <formed meta=\"𝑛·1·18\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></formed>"+                         , "        <morphed meta=\"𝑛·1·19\">𝑛·1·18</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·1·20\">𝑛·1·19.φ</boxed>"+                         , "      <normalized meta=\"𝑛·1·21\" of=\"𝑛·1·20\">40-18-00-00-00-00-00-00</normalized>"+                         , "      <dataized meta=\"𝛿·1·2\" number=\"6.0\">40-18-00-00-00-00-00-00</dataized>"+                         , "    </dataize>"+                         , "    <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"+                         , "    <minted symbol=\"𝜎1\">40-14-00-00-00-00-00-00 40-18-00-00-00-00-00-00</minted>"+                         , "    <applied meta=\"𝑒·1·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "    <built meta=\"𝑛·1·22\">𝑒·1·3</built>"+                         , "    <morph at=\"𝑛·1·22\">"+                         , "      <applied meta=\"𝑛·1·23\" by=\"morph\" at=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "      <formed meta=\"𝑛·1·24\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"+                         , "      <morphed meta=\"𝑛·1·25\">𝑛·1·24</morphed>"+                         , "    </morph>"+                         , "    <answered meta=\"𝑛·1·26\">𝑛·1·25</answered>"+                         , "    <evaluated meta=\"𝑛·1·27\" of=\"𝑛·0·8\">𝑛·1·26</evaluated>"+                         , "  </evaluate>"+                         , "  <boxed meta=\"𝑛·0·10\">𝑛·1·27.φ</boxed>"+                         , "  <normalized meta=\"𝑛·0·11\" of=\"𝑛·0·10\">𝜎1</normalized>"+                         , "  <manufactured meta=\"𝛿·0·1\">𝜎1</manufactured>"+                         , "</dataize>"+                         ]++        it "nests the judgment right inside the '<protocol>' root" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ D> 01- ]]" $+              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []+            records <- readUtf8 path+            take 2 (dropWhile (not . isPrefixOf "  <dataize ") (lines records))+              `shouldBe` [ "  <dataize at=\"Φ\">"+                         , "    <dataized meta=\"𝛿·0·1\">01-</dataized>"+                         ]++        it "opens the '<protocol>' root right under the declaration" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ D> 01- ]]" $+              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []+            records <- readUtf8 path+            take 2 (lines records) `shouldBe` ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<protocol>"]++        it "closes the '<protocol>' root with its msec" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ D> 01- ]]" $+              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []+            records <- readUtf8 path+            (reverse (lines records) !! 3) `shouldSatisfy` isPrefixOf "  <msec>"++        it "closes the '<protocol>' root with its firings" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ D> 01- ]]" $+              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []+            records <- readUtf8 path+            lines records `shouldContain` ["  <firings>0</firings>"]++        it "closes the '<protocol>' root with its fps, then '</protocol>' itself" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ D> 01- ]]" $+              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []+            records <- readUtf8 path+            reverse (take 2 (reverse (lines records))) `shouldBe` ["  <fps>0</fps>", "</protocol>"]++        it "nests what a φ body dataizes inside the element of the box rule that entered it" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin sum' $+              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+            records <- readProtocol path+            filter (\line -> not (any (`isInfixOf` line) ["<applied ", "<formed ", "<morph ", "<morphed ", "<normalized ", "</morph>"])) (lines records)+              `shouldContain` [ "    <dataize at=\"ξ.ρ\">"+                              , "      <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"+                              , "      <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"+                              , "      <dataized meta=\"𝛿·1·1\" number=\"5.0\">40-14-00-00-00-00-00-00</dataized>"+                              , "    </dataize>"+                              ]++        it "closes the document even when nothing fires" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ D> 01- ]]" $+              testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<dataize at=\"Φ\">"+                         , "  <dataized meta=\"𝛿·0·1\">01-</dataized>"+                         , "</dataize>"+                         ]++        it "tells a manufactured datum from data by the name of the element" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin chained $+              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<dataize at=\"Φ\">"+                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"+                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "  <applied meta=\"𝑒·0·5\" of=\"𝑒·0·2.plus\"><meta attr=\"x\">𝑒·0·4</meta></applied>"+                         , "  <applied meta=\"𝑒·0·6\" of=\"Φ.bytes\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·7\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·6</meta></applied>"+                         , "  <applied meta=\"𝑒·0·8\" of=\"𝑒·0·5.plus\"><meta attr=\"x\">𝑒·0·7</meta><ref attr=\"ρ\">Φ</ref></applied>"+                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·8</normalized>"+                         , "  <morph at=\"𝑛·0·1\">"+                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"+                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.plus\">𝑛·0·4.plus</normalized>"+                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑒·0·4</meta></applied>"+                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑒·0·4</meta></formed>"+                         , "    <evaluate λ=\"L_number_plus\" by=\"morph\" at=\"𝑛·0·1\">"+                         , "      <dataize at=\"ξ.ρ\">"+                         , "        <morph at=\"ξ.ρ\">"+                         , "          <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "          <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "          <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"+                         , "        <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"+                         , "        <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"+                         , "        <morph at=\"𝑛·1·4\">"+                         , "          <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"+                         , "          <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"+                         , "          <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></formed>"+                         , "          <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"+                         , "        <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-14-00-00-00-00-00-00</normalized>"+                         , "        <dataized meta=\"𝛿·1·1\" number=\"5.0\">40-14-00-00-00-00-00-00</dataized>"+                         , "      </dataize>"+                         , "      <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"+                         , "      <dataize at=\"ξ.x\">"+                         , "        <morph at=\"ξ.x\">"+                         , "          <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "          <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"+                         , "          <morphed meta=\"𝑛·1·14\">𝑛·1·13</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·15\">𝑛·1·14.φ</boxed>"+                         , "        <applied meta=\"𝑒·1·2\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·1·12</meta></applied>"+                         , "        <normalized meta=\"𝑛·1·16\" of=\"𝑛·1·15\">𝑒·1·2</normalized>"+                         , "        <morph at=\"𝑛·1·15\">"+                         , "          <applied meta=\"𝑛·1·17\" by=\"morph\" at=\"𝑛·1·15\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"+                         , "          <formed meta=\"𝑛·1·18\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></formed>"+                         , "          <morphed meta=\"𝑛·1·19\">𝑛·1·18</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·20\">𝑛·1·19.φ</boxed>"+                         , "        <normalized meta=\"𝑛·1·21\" of=\"𝑛·1·20\">40-18-00-00-00-00-00-00</normalized>"+                         , "        <dataized meta=\"𝛿·1·2\" number=\"6.0\">40-18-00-00-00-00-00-00</dataized>"+                         , "      </dataize>"+                         , "      <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"+                         , "      <minted symbol=\"𝜎1\">40-14-00-00-00-00-00-00 40-18-00-00-00-00-00-00</minted>"+                         , "      <applied meta=\"𝑒·1·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "      <built meta=\"𝑛·1·22\">𝑒·1·3</built>"+                         , "      <morph at=\"𝑛·1·22\">"+                         , "        <applied meta=\"𝑛·1·23\" by=\"morph\" at=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "        <formed meta=\"𝑛·1·24\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"+                         , "        <morphed meta=\"𝑛·1·25\">𝑛·1·24</morphed>"+                         , "      </morph>"+                         , "      <answered meta=\"𝑛·1·26\">𝑛·1·25</answered>"+                         , "      <evaluated meta=\"𝑛·1·27\" of=\"𝑛·0·8\">𝑛·1·26</evaluated>"+                         , "    </evaluate>"+                         , "    <normalized meta=\"𝑛·0·9\" of=\"𝑛·1·27.plus\">𝑛·1·23.plus</normalized>"+                         , "    <applied meta=\"𝑛·0·10\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·1·23.plus\"><meta attr=\"x\">𝑒·0·7</meta></applied>"+                         , "    <formed meta=\"𝑛·0·11\" of=\"𝑛·1·23.plus\"><meta attr=\"x\">𝑒·0·7</meta></formed>"+                         , "    <morphed meta=\"𝑛·0·12\">𝑛·0·11</morphed>"+                         , "  </morph>"+                         , "  <evaluate λ=\"L_number_plus\" by=\"dataize\" at=\"𝑛·0·1\">"+                         , "    <dataize at=\"ξ.ρ\">"+                         , "      <morph at=\"ξ.ρ\">"+                         , "        <applied meta=\"𝑛·2·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "        <formed meta=\"𝑛·2·2\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"+                         , "        <morphed meta=\"𝑛·2·3\">𝑛·2·2</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·2·4\">𝑛·2·3.φ</boxed>"+                         , "      <normalized meta=\"𝑛·2·5\" of=\"𝑛·2·4\">𝜎1</normalized>"+                         , "      <manufactured meta=\"𝛿·2·1\">𝜎1</manufactured>"+                         , "    </dataize>"+                         , "    <bound meta=\"𝛿1·2\">𝛿·2·1</bound>"+                         , "    <dataize at=\"ξ.x\">"+                         , "      <morph at=\"ξ.x\">"+                         , "        <applied meta=\"𝑛·2·6\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·6</meta></applied>"+                         , "        <formed meta=\"𝑛·2·7\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·6</meta></formed>"+                         , "        <morphed meta=\"𝑛·2·8\">𝑛·2·7</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·2·9\">𝑛·2·8.φ</boxed>"+                         , "      <applied meta=\"𝑒·2·1\" of=\"𝑒·0·6\"><meta attr=\"ρ\">𝑛·2·6</meta></applied>"+                         , "      <normalized meta=\"𝑛·2·10\" of=\"𝑛·2·9\">𝑒·2·1</normalized>"+                         , "      <morph at=\"𝑛·2·9\">"+                         , "        <applied meta=\"𝑛·2·11\" by=\"morph\" at=\"𝑛·2·9\" of=\"Φ.bytes\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></applied>"+                         , "        <formed meta=\"𝑛·2·12\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></formed>"+                         , "        <morphed meta=\"𝑛·2·13\">𝑛·2·12</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·2·14\">𝑛·2·13.φ</boxed>"+                         , "      <normalized meta=\"𝑛·2·15\" of=\"𝑛·2·14\">40-1C-00-00-00-00-00-00</normalized>"+                         , "      <dataized meta=\"𝛿·2·2\" number=\"7.0\">40-1C-00-00-00-00-00-00</dataized>"+                         , "    </dataize>"+                         , "    <bound meta=\"𝛿2·2\">𝛿·2·2</bound>"+                         , "    <minted symbol=\"𝜎2\">𝜎1 40-1C-00-00-00-00-00-00</minted>"+                         , "    <applied meta=\"𝑒·2·2\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></applied>"+                         , "    <built meta=\"𝑛·2·16\">𝑒·2·2</built>"+                         , "    <morph at=\"𝑛·2·16\">"+                         , "      <applied meta=\"𝑛·2·17\" by=\"morph\" at=\"𝑛·2·16\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></applied>"+                         , "      <formed meta=\"𝑛·2·18\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></formed>"+                         , "      <morphed meta=\"𝑛·2·19\">𝑛·2·18</morphed>"+                         , "    </morph>"+                         , "    <answered meta=\"𝑛·2·20\">𝑛·2·19</answered>"+                         , "    <evaluated meta=\"𝑛·2·21\" of=\"𝑛·0·11\">𝑛·2·20</evaluated>"+                         , "  </evaluate>"+                         , "  <boxed meta=\"𝑛·0·13\">𝑛·2·21.φ</boxed>"+                         , "  <normalized meta=\"𝑛·0·14\" of=\"𝑛·0·13\">𝜎2</normalized>"+                         , "  <manufactured meta=\"𝛿·0·1\">𝜎2</manufactured>"+                         , "</dataize>"+                         ]++        it "writes a firing whose two sides do not join as diverged, naming both sides" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withLambdasOf (T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.c\n  join:\n    on: 𝛿1\n    left: $.a\n    right: $.b\n") $ \joins ->+              withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ ⟦ Δ ⤍ 01- ⟧ ⟧, b ↦ ⟦ φ ↦ ⟦ Δ ⤍ 02- ⟧ ⟧, λ ⤍ L_fork ⟧.φ ⟧" $+                testCLIFailed ["morph", "--symbolic=" ++ joins, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] ["No entry of --symbolic answers the λ function 'L_fork'"]+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<morph at=\"Φ.y\">"+                         , "  <evaluate λ=\"L_fork\" by=\"morph\" at=\"Φ.y\">"+                         , "    <dataize at=\"ξ.c\">"+                         , "      <manufactured meta=\"𝛿·1·1\">𝜎1</manufactured>"+                         , "    </dataize>"+                         , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"+                         , "    <morph at=\"ξ.a\">"+                         , "      <formed meta=\"𝑒·1·1\"><datum attr=\"φ\">01-</datum></formed>"+                         , "      <morphed meta=\"𝑛·1·1\">𝑒·1·1</morphed>"+                         , "    </morph>"+                         , "    <morph at=\"ξ.b\">"+                         , "      <formed meta=\"𝑒·1·2\"><datum attr=\"φ\">02-</datum></formed>"+                         , "      <morphed meta=\"𝑛·1·2\">𝑒·1·2</morphed>"+                         , "    </morph>"+                         , "    <diverged left=\"𝑛·1·1\" right=\"𝑛·1·2\" at=\".φ.Δ\" reason=\"the join names no otherwise\"><left Δ=\"01-\"/><right Δ=\"02-\"/></diverged>"+                         , "  </evaluate>"+                         , "</morph>"+                         ]++        it "writes the symbol a join minted for two sides that differ only in their symbols as an element of its own" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withLambdasOf (T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.c\n  join:\n    on: 𝛿1\n    left: $.a\n    right: $.b\n") $ \joins ->+              withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, b ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ⟧, λ ⤍ L_fork ⟧.φ ⟧" $+                testCLISucceeded ["morph", "--symbolic=" ++ joins, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<morph at=\"Φ.y\">"+                         , "  <evaluate λ=\"L_fork\" by=\"morph\" at=\"Φ.y\">"+                         , "    <dataize at=\"ξ.c\">"+                         , "      <manufactured meta=\"𝛿·1·1\">𝜎1</manufactured>"+                         , "    </dataize>"+                         , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"+                         , "    <morph at=\"ξ.a\">"+                         , "      <formed meta=\"𝑒·1·1\"><symbol attr=\"φ\">𝜎2</symbol></formed>"+                         , "      <morphed meta=\"𝑛·1·1\">𝑒·1·1</morphed>"+                         , "    </morph>"+                         , "    <morph at=\"ξ.b\">"+                         , "      <formed meta=\"𝑒·1·2\"><symbol attr=\"φ\">𝜎3</symbol></formed>"+                         , "      <morphed meta=\"𝑛·1·2\">𝑒·1·2</morphed>"+                         , "    </morph>"+                         , "    <joined symbol=\"𝜎4\" on=\"𝛿1·1\" left=\"𝜎2\" right=\"𝜎3\"/>"+                         , "    <formed meta=\"𝑒·1·3\"><symbol attr=\"φ\">𝜎4</symbol></formed>"+                         , "    <answered meta=\"𝑛·1·3\">𝑒·1·3</answered>"+                         , "    <formed meta=\"𝑒·1·4\" λ=\"L_fork\"><symbol attr=\"c\">𝜎1</symbol><meta attr=\"a\">𝑛·1·1</meta><meta attr=\"b\">𝑛·1·2</meta></formed>"+                         , "    <evaluated meta=\"𝑛·1·4\" of=\"𝑒·1·4\">𝑛·1·3</evaluated>"+                         , "  </evaluate>"+                         , "  <normalized meta=\"𝑛·0·1\" of=\"𝑛·1·4.φ\">𝜎4</normalized>"+                         , "  <morphed meta=\"𝑛·0·2\">𝜎4</morphed>"+                         , "</morph>"+                         ]++        it "writes one 'minted' element per symbol the answer asked for" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withLambdasOf (T.pack "- λ: L_pair\n  morph:\n    𝑛1: $.x\n  𝑛: ⟦ left ↦ ⟦ λ ⤍ 𝜎 ⟧, right ↦ ⟦ λ ⤍ 𝜎 ⟧ ⟧\n") $ \pairs ->+              withStdin "⟦ y ↦ ⟦ x ↦ ⟦ Δ ⤍ 01- ⟧, λ ⤍ L_pair ⟧.left ⟧" $+                testCLISucceeded ["morph", "--symbolic=" ++ pairs, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<morph at=\"Φ.y\">"+                         , "  <evaluate λ=\"L_pair\" by=\"morph\" at=\"Φ.y\">"+                         , "    <morph at=\"ξ.x\">"+                         , "      <morphed meta=\"𝑛·1·1\">01-</morphed>"+                         , "    </morph>"+                         , "    <bound meta=\"𝑛1·1\">01-</bound>"+                         , "    <minted symbol=\"𝜎1\"/>"+                         , "    <minted symbol=\"𝜎2\"/>"+                         , "    <formed meta=\"𝑒·1·1\"><symbol attr=\"left\">𝜎1</symbol><symbol attr=\"right\">𝜎2</symbol></formed>"+                         , "    <built meta=\"𝑛·1·2\">𝑒·1·1</built>"+                         , "    <morph at=\"𝑛·1·2\">"+                         , "      <morphed meta=\"𝑛·1·3\">𝑒·1·1</morphed>"+                         , "    </morph>"+                         , "    <answered meta=\"𝑛·1·4\">𝑛·1·3</answered>"+                         , "    <formed meta=\"𝑒·1·2\" λ=\"L_pair\"><datum attr=\"x\">01-</datum></formed>"+                         , "    <evaluated meta=\"𝑛·1·5\" of=\"𝑒·1·2\">𝑛·1·4</evaluated>"+                         , "  </evaluate>"+                         , "  <normalized meta=\"𝑛·0·1\" of=\"𝑛·1·5.left\">𝜎1</normalized>"+                         , "  <morphed meta=\"𝑛·0·2\">𝜎1</morphed>"+                         , "</morph>"+                         ]++        it "writes no 'minted' element for a firing minting nothing" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withLambdasOf (T.pack "- λ: L_keep\n  morph:\n    𝑛1: $.x\n  𝑛: ⟦ z ↦ 𝑛1 ⟧\n") $ \keeps ->+              withStdin "⟦ y ↦ ⟦ x ↦ ⟦ Δ ⤍ 01- ⟧, λ ⤍ L_keep ⟧.z ⟧" $+                testCLISucceeded ["morph", "--symbolic=" ++ keeps, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<morph at=\"Φ.y\">"+                         , "  <evaluate λ=\"L_keep\" by=\"morph\" at=\"Φ.y\">"+                         , "    <morph at=\"ξ.x\">"+                         , "      <morphed meta=\"𝑛·1·1\">01-</morphed>"+                         , "    </morph>"+                         , "    <bound meta=\"𝑛1·1\">01-</bound>"+                         , "    <formed meta=\"𝑒·1·1\"><datum attr=\"z\">01-</datum></formed>"+                         , "    <built meta=\"𝑛·1·2\">𝑒·1·1</built>"+                         , "    <morph at=\"𝑛·1·2\">"+                         , "      <morphed meta=\"𝑛·1·3\">𝑒·1·1</morphed>"+                         , "    </morph>"+                         , "    <answered meta=\"𝑛·1·4\">𝑛·1·3</answered>"+                         , "    <formed meta=\"𝑒·1·2\" λ=\"L_keep\"><datum attr=\"x\">01-</datum></formed>"+                         , "    <evaluated meta=\"𝑛·1·5\" of=\"𝑒·1·2\">𝑛·1·4</evaluated>"+                         , "  </evaluate>"+                         , "  <normalized meta=\"𝑛·0·1\" of=\"𝑛·1·5.z\">01-</normalized>"+                         , "  <morphed meta=\"𝑛·0·2\">01-</morphed>"+                         , "</morph>"+                         ]++        it "nests a firing an operand took inside the firing that asked" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin nested $+              testCLISucceeded ["dataize", symbolic, "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<dataize at=\"Φ\">"+                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"+                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "  <applied meta=\"𝑒·0·5\" of=\"Φ.bytes\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·6\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·5</meta></applied>"+                         , "  <applied meta=\"𝑒·0·7\" of=\"𝑒·0·4.plus\"><meta attr=\"x\">𝑒·0·6</meta></applied>"+                         , "  <applied meta=\"𝑒·0·8\" of=\"𝑒·0·2.plus\"><meta attr=\"x\">𝑒·0·7</meta><ref attr=\"ρ\">Φ</ref></applied>"+                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·8</normalized>"+                         , "  <morph at=\"𝑛·0·1\">"+                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"+                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.plus\">𝑛·0·4.plus</normalized>"+                         , "    <applied meta=\"𝑒·0·9\" of=\"𝑒·0·4.plus\"><meta attr=\"x\">𝑒·0·6</meta></applied>"+                         , "    <shared meta=\"𝑛·1\">𝑒·0·9</shared>"+                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑛·1</meta></applied>"+                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.plus\"><meta attr=\"x\">𝑛·1</meta></formed>"+                         , "    <morphed meta=\"𝑛·0·9\">𝑛·0·8</morphed>"+                         , "  </morph>"+                         , "  <evaluate λ=\"L_number_plus\" by=\"dataize\" at=\"𝑛·0·1\">"+                         , "    <dataize at=\"ξ.ρ\">"+                         , "      <morph at=\"ξ.ρ\">"+                         , "        <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "        <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "        <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"+                         , "      <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"+                         , "      <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"+                         , "      <morph at=\"𝑛·1·4\">"+                         , "        <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"+                         , "        <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></applied>"+                         , "        <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-14-00-00-00-00-00-00</datum></formed>"+                         , "        <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"+                         , "      </morph>"+                         , "      <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"+                         , "      <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-14-00-00-00-00-00-00</normalized>"+                         , "      <dataized meta=\"𝛿·1·1\" number=\"5.0\">40-14-00-00-00-00-00-00</dataized>"+                         , "    </dataize>"+                         , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"+                         , "    <dataize at=\"ξ.x\">"+                         , "      <morph at=\"ξ.x\">"+                         , "        <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "        <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"+                         , "        <normalized meta=\"𝑛·1·14\" of=\"𝑛·1·13.plus\">𝑛·1·12.plus</normalized>"+                         , "        <applied meta=\"𝑛·1·15\" by=\"morph\" at=\"ξ.x\" of=\"𝑛·1·12.plus\"><meta attr=\"x\">𝑒·0·6</meta></applied>"+                         , "        <formed meta=\"𝑛·1·16\" of=\"𝑛·1·12.plus\"><meta attr=\"x\">𝑒·0·6</meta></formed>"+                         , "        <morphed meta=\"𝑛·1·17\">𝑛·1·16</morphed>"+                         , "      </morph>"+                         , "      <evaluate λ=\"L_number_plus\" by=\"dataize\" at=\"ξ.x\">"+                         , "        <dataize at=\"ξ.ρ\">"+                         , "          <morph at=\"ξ.ρ\">"+                         , "            <applied meta=\"𝑛·2·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "            <formed meta=\"𝑛·2·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"+                         , "            <morphed meta=\"𝑛·2·3\">𝑛·2·2</morphed>"+                         , "          </morph>"+                         , "          <boxed meta=\"𝑛·2·4\">𝑛·2·3.φ</boxed>"+                         , "          <applied meta=\"𝑒·2·1\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·2·1</meta></applied>"+                         , "          <normalized meta=\"𝑛·2·5\" of=\"𝑛·2·4\">𝑒·2·1</normalized>"+                         , "          <morph at=\"𝑛·2·4\">"+                         , "            <applied meta=\"𝑛·2·6\" by=\"morph\" at=\"𝑛·2·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></applied>"+                         , "            <formed meta=\"𝑛·2·7\"><datum attr=\"φ\">40-18-00-00-00-00-00-00</datum></formed>"+                         , "            <morphed meta=\"𝑛·2·8\">𝑛·2·7</morphed>"+                         , "          </morph>"+                         , "          <boxed meta=\"𝑛·2·9\">𝑛·2·8.φ</boxed>"+                         , "          <normalized meta=\"𝑛·2·10\" of=\"𝑛·2·9\">40-18-00-00-00-00-00-00</normalized>"+                         , "          <dataized meta=\"𝛿·2·1\" number=\"6.0\">40-18-00-00-00-00-00-00</dataized>"+                         , "        </dataize>"+                         , "        <bound meta=\"𝛿1·2\">𝛿·2·1</bound>"+                         , "        <dataize at=\"ξ.x\">"+                         , "          <morph at=\"ξ.x\">"+                         , "            <applied meta=\"𝑛·2·11\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·5</meta></applied>"+                         , "            <formed meta=\"𝑛·2·12\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·5</meta></formed>"+                         , "            <morphed meta=\"𝑛·2·13\">𝑛·2·12</morphed>"+                         , "          </morph>"+                         , "          <boxed meta=\"𝑛·2·14\">𝑛·2·13.φ</boxed>"+                         , "          <applied meta=\"𝑒·2·2\" of=\"𝑒·0·5\"><meta attr=\"ρ\">𝑛·2·11</meta></applied>"+                         , "          <normalized meta=\"𝑛·2·15\" of=\"𝑛·2·14\">𝑒·2·2</normalized>"+                         , "          <morph at=\"𝑛·2·14\">"+                         , "            <applied meta=\"𝑛·2·16\" by=\"morph\" at=\"𝑛·2·14\" of=\"Φ.bytes\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></applied>"+                         , "            <formed meta=\"𝑛·2·17\"><datum attr=\"φ\">40-1C-00-00-00-00-00-00</datum></formed>"+                         , "            <morphed meta=\"𝑛·2·18\">𝑛·2·17</morphed>"+                         , "          </morph>"+                         , "          <boxed meta=\"𝑛·2·19\">𝑛·2·18.φ</boxed>"+                         , "          <normalized meta=\"𝑛·2·20\" of=\"𝑛·2·19\">40-1C-00-00-00-00-00-00</normalized>"+                         , "          <dataized meta=\"𝛿·2·2\" number=\"7.0\">40-1C-00-00-00-00-00-00</dataized>"+                         , "        </dataize>"+                         , "        <bound meta=\"𝛿2·2\">𝛿·2·2</bound>"+                         , "        <minted symbol=\"𝜎1\">40-18-00-00-00-00-00-00 40-1C-00-00-00-00-00-00</minted>"+                         , "        <applied meta=\"𝑒·2·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "        <built meta=\"𝑛·2·21\">𝑒·2·3</built>"+                         , "        <morph at=\"𝑛·2·21\">"+                         , "          <applied meta=\"𝑛·2·22\" by=\"morph\" at=\"𝑛·2·21\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "          <formed meta=\"𝑛·2·23\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"+                         , "          <morphed meta=\"𝑛·2·24\">𝑛·2·23</morphed>"+                         , "        </morph>"+                         , "        <answered meta=\"𝑛·2·25\">𝑛·2·24</answered>"+                         , "        <evaluated meta=\"𝑛·2·26\" of=\"𝑛·1·16\">𝑛·2·25</evaluated>"+                         , "      </evaluate>"+                         , "      <boxed meta=\"𝑛·1·18\">𝑛·2·26.φ</boxed>"+                         , "      <normalized meta=\"𝑛·1·19\" of=\"𝑛·1·18\">𝜎1</normalized>"+                         , "      <manufactured meta=\"𝛿·1·2\">𝜎1</manufactured>"+                         , "    </dataize>"+                         , "    <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"+                         , "    <minted symbol=\"𝜎2\">40-14-00-00-00-00-00-00 𝜎1</minted>"+                         , "    <applied meta=\"𝑒·1·2\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></applied>"+                         , "    <built meta=\"𝑛·1·20\">𝑒·1·2</built>"+                         , "    <morph at=\"𝑛·1·20\">"+                         , "      <applied meta=\"𝑛·1·21\" by=\"morph\" at=\"𝑛·1·20\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></applied>"+                         , "      <formed meta=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎2</symbol></formed>"+                         , "      <morphed meta=\"𝑛·1·23\">𝑛·1·22</morphed>"+                         , "    </morph>"+                         , "    <answered meta=\"𝑛·1·24\">𝑛·1·23</answered>"+                         , "    <evaluated meta=\"𝑛·1·25\" of=\"𝑛·0·8\">𝑛·1·24</evaluated>"+                         , "  </evaluate>"+                         , "  <boxed meta=\"𝑛·0·10\">𝑛·1·25.φ</boxed>"+                         , "  <normalized meta=\"𝑛·0·11\" of=\"𝑛·0·10\">𝜎2</normalized>"+                         , "  <manufactured meta=\"𝛿·0·1\">𝜎2</manufactured>"+                         , "</dataize>"+                         ]++        it "records a λ function no entry answers as a childless element" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ times(^, x) -> [[ L> L_number_times ]], nope -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> 2.times(x -> 3).nope ]]" $+              testCLISucceeded ["dataize", symbolic, "--partial", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<dataize at=\"Φ\">"+                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"+                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "  <applied meta=\"𝑒·0·5\" of=\"𝑒·0·2.times\"><meta attr=\"x\">𝑒·0·4</meta></applied>"+                         , "  <applied meta=\"𝑒·0·6\" of=\"𝑒·0·5.nope\"><ref attr=\"ρ\">Φ</ref></applied>"+                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·6</normalized>"+                         , "  <morph at=\"𝑛·0·1\">"+                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"+                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.times\">𝑛·0·4.times</normalized>"+                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.times\"><meta attr=\"x\">𝑒·0·4</meta></applied>"+                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.times\"><meta attr=\"x\">𝑒·0·4</meta></formed>"+                         , "    <evaluate λ=\"L_number_times\" by=\"morph\" at=\"𝑛·0·1\">"+                         , "      <dataize at=\"ξ.ρ\">"+                         , "        <morph at=\"ξ.ρ\">"+                         , "          <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "          <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "          <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"+                         , "        <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"+                         , "        <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"+                         , "        <morph at=\"𝑛·1·4\">"+                         , "          <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"+                         , "          <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></applied>"+                         , "          <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></formed>"+                         , "          <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"+                         , "        <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-00-00-00-00-00-00-00</normalized>"+                         , "        <dataized meta=\"𝛿·1·1\" number=\"2.0\">40-00-00-00-00-00-00-00</dataized>"+                         , "      </dataize>"+                         , "      <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"+                         , "      <dataize at=\"ξ.x\">"+                         , "        <morph at=\"ξ.x\">"+                         , "          <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "          <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"+                         , "          <morphed meta=\"𝑛·1·14\">𝑛·1·13</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·15\">𝑛·1·14.φ</boxed>"+                         , "        <applied meta=\"𝑒·1·2\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·1·12</meta></applied>"+                         , "        <normalized meta=\"𝑛·1·16\" of=\"𝑛·1·15\">𝑒·1·2</normalized>"+                         , "        <morph at=\"𝑛·1·15\">"+                         , "          <applied meta=\"𝑛·1·17\" by=\"morph\" at=\"𝑛·1·15\" of=\"Φ.bytes\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></applied>"+                         , "          <formed meta=\"𝑛·1·18\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></formed>"+                         , "          <morphed meta=\"𝑛·1·19\">𝑛·1·18</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·20\">𝑛·1·19.φ</boxed>"+                         , "        <normalized meta=\"𝑛·1·21\" of=\"𝑛·1·20\">40-08-00-00-00-00-00-00</normalized>"+                         , "        <dataized meta=\"𝛿·1·2\" number=\"3.0\">40-08-00-00-00-00-00-00</dataized>"+                         , "      </dataize>"+                         , "      <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"+                         , "      <minted symbol=\"𝜎1\">40-00-00-00-00-00-00-00 40-08-00-00-00-00-00-00</minted>"+                         , "      <applied meta=\"𝑒·1·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "      <built meta=\"𝑛·1·22\">𝑒·1·3</built>"+                         , "      <morph at=\"𝑛·1·22\">"+                         , "        <applied meta=\"𝑛·1·23\" by=\"morph\" at=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "        <formed meta=\"𝑛·1·24\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"+                         , "        <morphed meta=\"𝑛·1·25\">𝑛·1·24</morphed>"+                         , "      </morph>"+                         , "      <answered meta=\"𝑛·1·26\">𝑛·1·25</answered>"+                         , "      <evaluated meta=\"𝑛·1·27\" of=\"𝑛·0·8\">𝑛·1·26</evaluated>"+                         , "    </evaluate>"+                         , "    <normalized meta=\"𝑛·0·9\" of=\"𝑛·1·27.nope\">𝑛·1·23.nope</normalized>"+                         , "    <morphed meta=\"𝑛·0·10\">𝑛·1·23.nope</morphed>"+                         , "  </morph>"+                         , "  <unanswered λ=\"L_number_nope\" by=\"dataize\">𝑛·1·23.nope</unanswered>"+                         , "</dataize>"+                         ]++        it "names the root after the judgment a morphing ran" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ x -> [[ L> L_number_nope ]].foo ]]" $+              testCLISucceeded ["morph", "--locator=Q.x", "--partial", "--protocol=" ++ path, "--quiet"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<morph at=\"Φ.x\">"+                         , "  <formed meta=\"𝑒·0·1\" λ=\"L_number_nope\"/>"+                         , "  <unanswered λ=\"L_number_nope\" by=\"morph\">𝑒·0·1.foo</unanswered>"+                         , "</morph>"+                         ]++        it "closes the document even when the run fails" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ times(^, x) -> [[ L> L_number_times ]], nope -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> 2.times(x -> 3).nope ]]" $+              testCLIFailed ["dataize", symbolic, "--protocol=" ++ path] ["No entry of --symbolic answers"]+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<dataize at=\"Φ\">"+                         , "  <boxed meta=\"𝑛·0·1\">Φ.φ</boxed>"+                         , "  <applied meta=\"𝑒·0·1\" of=\"Φ.bytes\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "  <applied meta=\"𝑒·0·3\" of=\"Φ.bytes\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></applied>"+                         , "  <applied meta=\"𝑒·0·4\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "  <applied meta=\"𝑒·0·5\" of=\"𝑒·0·2.times\"><meta attr=\"x\">𝑒·0·4</meta></applied>"+                         , "  <applied meta=\"𝑒·0·6\" of=\"𝑒·0·5.nope\"><ref attr=\"ρ\">Φ</ref></applied>"+                         , "  <normalized meta=\"𝑛·0·2\" of=\"Φ.φ\">𝑒·0·6</normalized>"+                         , "  <morph at=\"𝑛·0·1\">"+                         , "    <normalized meta=\"𝑛·0·3\" of=\"Φ.number\">Φ.number</normalized>"+                         , "    <applied meta=\"𝑛·0·4\" by=\"morph\" at=\"𝑛·0·1\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "    <formed meta=\"𝑛·0·5\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "    <normalized meta=\"𝑛·0·6\" of=\"𝑛·0·5.times\">𝑛·0·4.times</normalized>"+                         , "    <applied meta=\"𝑛·0·7\" by=\"morph\" at=\"𝑛·0·1\" of=\"𝑛·0·4.times\"><meta attr=\"x\">𝑒·0·4</meta></applied>"+                         , "    <formed meta=\"𝑛·0·8\" of=\"𝑛·0·4.times\"><meta attr=\"x\">𝑒·0·4</meta></formed>"+                         , "    <evaluate λ=\"L_number_times\" by=\"morph\" at=\"𝑛·0·1\">"+                         , "      <dataize at=\"ξ.ρ\">"+                         , "        <morph at=\"ξ.ρ\">"+                         , "          <applied meta=\"𝑛·1·1\" by=\"morph\" at=\"ξ.ρ\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></applied>"+                         , "          <formed meta=\"𝑛·1·2\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·1</meta></formed>"+                         , "          <morphed meta=\"𝑛·1·3\">𝑛·1·2</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·4\">𝑛·1·3.φ</boxed>"+                         , "        <applied meta=\"𝑒·1·1\" of=\"𝑒·0·1\"><meta attr=\"ρ\">𝑛·1·1</meta></applied>"+                         , "        <normalized meta=\"𝑛·1·5\" of=\"𝑛·1·4\">𝑒·1·1</normalized>"+                         , "        <morph at=\"𝑛·1·4\">"+                         , "          <normalized meta=\"𝑛·1·6\" of=\"Φ.bytes\">Φ.bytes</normalized>"+                         , "          <applied meta=\"𝑛·1·7\" by=\"morph\" at=\"𝑛·1·4\" of=\"Φ.bytes\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></applied>"+                         , "          <formed meta=\"𝑛·1·8\"><datum attr=\"φ\">40-00-00-00-00-00-00-00</datum></formed>"+                         , "          <morphed meta=\"𝑛·1·9\">𝑛·1·8</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·10\">𝑛·1·9.φ</boxed>"+                         , "        <normalized meta=\"𝑛·1·11\" of=\"𝑛·1·10\">40-00-00-00-00-00-00-00</normalized>"+                         , "        <dataized meta=\"𝛿·1·1\" number=\"2.0\">40-00-00-00-00-00-00-00</dataized>"+                         , "      </dataize>"+                         , "      <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"+                         , "      <dataize at=\"ξ.x\">"+                         , "        <morph at=\"ξ.x\">"+                         , "          <applied meta=\"𝑛·1·12\" by=\"morph\" at=\"ξ.x\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></applied>"+                         , "          <formed meta=\"𝑛·1·13\" of=\"Φ.number\"><meta attr=\"φ\">𝑒·0·3</meta></formed>"+                         , "          <morphed meta=\"𝑛·1·14\">𝑛·1·13</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·15\">𝑛·1·14.φ</boxed>"+                         , "        <applied meta=\"𝑒·1·2\" of=\"𝑒·0·3\"><meta attr=\"ρ\">𝑛·1·12</meta></applied>"+                         , "        <normalized meta=\"𝑛·1·16\" of=\"𝑛·1·15\">𝑒·1·2</normalized>"+                         , "        <morph at=\"𝑛·1·15\">"+                         , "          <applied meta=\"𝑛·1·17\" by=\"morph\" at=\"𝑛·1·15\" of=\"Φ.bytes\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></applied>"+                         , "          <formed meta=\"𝑛·1·18\"><datum attr=\"φ\">40-08-00-00-00-00-00-00</datum></formed>"+                         , "          <morphed meta=\"𝑛·1·19\">𝑛·1·18</morphed>"+                         , "        </morph>"+                         , "        <boxed meta=\"𝑛·1·20\">𝑛·1·19.φ</boxed>"+                         , "        <normalized meta=\"𝑛·1·21\" of=\"𝑛·1·20\">40-08-00-00-00-00-00-00</normalized>"+                         , "        <dataized meta=\"𝛿·1·2\" number=\"3.0\">40-08-00-00-00-00-00-00</dataized>"+                         , "      </dataize>"+                         , "      <bound meta=\"𝛿2·1\">𝛿·1·2</bound>"+                         , "      <minted symbol=\"𝜎1\">40-00-00-00-00-00-00-00 40-08-00-00-00-00-00-00</minted>"+                         , "      <applied meta=\"𝑒·1·3\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "      <built meta=\"𝑛·1·22\">𝑒·1·3</built>"+                         , "      <morph at=\"𝑛·1·22\">"+                         , "        <applied meta=\"𝑛·1·23\" by=\"morph\" at=\"𝑛·1·22\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></applied>"+                         , "        <formed meta=\"𝑛·1·24\" of=\"Φ.number\"><symbol attr=\"φ\">𝜎1</symbol></formed>"+                         , "        <morphed meta=\"𝑛·1·25\">𝑛·1·24</morphed>"+                         , "      </morph>"+                         , "      <answered meta=\"𝑛·1·26\">𝑛·1·25</answered>"+                         , "      <evaluated meta=\"𝑛·1·27\" of=\"𝑛·0·8\">𝑛·1·26</evaluated>"+                         , "    </evaluate>"+                         , "    <normalized meta=\"𝑛·0·9\" of=\"𝑛·1·27.nope\">𝑛·1·23.nope</normalized>"+                         , "    <morphed meta=\"𝑛·0·10\">𝑛·1·23.nope</morphed>"+                         , "  </morph>"+                         , "  <unanswered λ=\"L_number_nope\" by=\"dataize\">𝑛·1·23.nope</unanswered>"+                         , "</dataize>"+                         ]++        it "writes the terminator as the term a meta was bound to" $+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            withLambdasOf (T.pack "- λ: L_pick\n  morph:\n    𝑛1: ξ.absent\n  𝑛: ⟦ λ ⤍ 𝜎 ⟧\n") $ \picks ->+              withStdin "[[ x -> [[ here -> [[ ]], L> L_pick ]].foo ]]" $+                testCLISucceeded ["morph", "--symbolic=" ++ picks, "--locator=Q.x", "--protocol=" ++ path, "--quiet", "--hide-rho"] []+            records <- readProtocol path+            lines records+              `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                         , "<morph at=\"Φ.x\">"+                         , "  <evaluate λ=\"L_pick\" by=\"morph\" at=\"Φ.x\">"+                         , "    <morph at=\"ξ.absent\">"+                         , "      <morphed meta=\"𝑛·1·1\">⊥</morphed>"+                         , "    </morph>"+                         , "    <bound meta=\"𝑛1·1\">⊥</bound>"+                         , "    <minted symbol=\"𝜎1\"/>"+                         , "    <built meta=\"𝑛·1·2\">𝜎1</built>"+                         , "    <morph at=\"𝑛·1·2\">"+                         , "      <morphed meta=\"𝑛·1·3\">𝜎1</morphed>"+                         , "    </morph>"+                         , "    <answered meta=\"𝑛·1·4\">𝜎1</answered>"+                         , "    <formed meta=\"𝑒·1·1\"/>"+                         , "    <formed meta=\"𝑒·1·2\" λ=\"L_pick\"><meta attr=\"here\">𝑒·1·1</meta></formed>"+                         , "    <evaluated meta=\"𝑛·1·5\" of=\"𝑒·1·2\">𝜎1</evaluated>"+                         , "  </evaluate>"+                         , "  <opaque symbol=\"𝜎2\" of=\"𝜎1.foo\"/>"+                         , "  <morphed meta=\"𝑛·0·1\">𝜎2</morphed>"+                         , "</morph>"+                         ]++      it "writes XML into a file named .txt" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--protocol=" ++ path, "--quiet"] []+          records <- readUtf8 path+          records `shouldSatisfy` isPrefixOf "<?xml"++    describe "--minutes" $ do+      let sum' = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6) ]]"+      it "writes the indented text into a file named .xml" $+        withTempFile "minutesXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--minutes=" ++ path, "--quiet"] []+          records <- readProtocol path+          records `shouldBe` "𝔻(Φ):\n  𝛿·0·1 ≔ 01-\n"++      it "writes the same text beside --protocol as alone" $+        withTempFile "minutesXXXXXX.txt" $ \(alone, one) ->+          withTempFile "minutesXXXXXX.txt" $ \(beside, two) ->+            withTempFile "protocolXXXXXX.xml" $ \(xml, three) -> do+              mapM_ hClose [one, two, three]+              withStdin sum' $+                testCLISucceeded ["dataize", symbolic, "--minutes=" ++ alone, "--quiet", "--sweet", "--hide-rho"] []+              withStdin sum' $+                testCLISucceeded ["dataize", symbolic, "--protocol=" ++ xml, "--minutes=" ++ beside, "--quiet", "--sweet", "--hide-rho"] []+              first <- readProtocol alone+              second <- readProtocol beside+              second `shouldBe` first++      it "writes the same XML beside --minutes as alone" $+        withTempFile "protocolXXXXXX.xml" $ \(alone, one) ->+          withTempFile "protocolXXXXXX.xml" $ \(beside, two) ->+            withTempFile "minutesXXXXXX.txt" $ \(text, three) -> do+              mapM_ hClose [one, two, three]+              withStdin sum' $+                testCLISucceeded ["dataize", symbolic, "--protocol=" ++ alone, "--quiet", "--sweet", "--hide-rho"] []+              withStdin sum' $+                testCLISucceeded ["dataize", symbolic, "--protocol=" ++ beside, "--minutes=" ++ text, "--quiet", "--sweet", "--hide-rho"] []+              first <- readProtocol alone+              second <- readProtocol beside+              second `shouldBe` first++      it "abridges the text without --protocol" $+        withTempFile "minutesXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "[[ D> 01- ]]" $+            testCLISucceeded ["dataize", "--minutes=" ++ path, "--abridged", "--quiet"] []+          records <- readProtocol path+          records `shouldBe` "𝔻(Φ):\n  𝛿·0·1 ≔ 01-\n"++    describe "--partial" $ do+      let stuck = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ times(^, x) -> [[ L> L_number_times ]], nope -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> 2.times(x -> 3).nope ]]"+          dispatched = "[[ foo -> [[ bar -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> Q.foo.bar ]]"+          wrapped = "[[ app -> [[ foo -> [[ bar -> [[ ^ -> ?, L> L_number_nope ]] ]], @ -> Q.app.foo.bar ]] ]]"+      it "fails on a λ function that cannot fire without the flag" $+        withStdin stuck $+          testCLIFailed+            ["dataize", symbolic, "--sweet", "--hide-rho"]+            ["No entry of --symbolic answers the λ function 'L_number_nope'"]++      it "prints the residue with the stuck application intact and exits successfully" $+        withStdin stuck $+          testCLISucceeded+            ["dataize", symbolic, "--partial", "--sweet", "--hide-rho"]+            ["L_number_nope:λ"]++      it "keeps what was evaluated before the stuck site in the residue" $+        withStdin stuck $+          testCLISucceeded+            ["dataize", symbolic, "--partial", "--sweet"]+            ["φ ↦ 𝜎1:λ"]++      it "records every firing before the stuck site in --protocol" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin stuck $+            testCLISucceeded ["dataize", symbolic, "--partial", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          lines records+            `shouldBe` [ "𝔻(Φ):"+                       , "  boxed 𝑛·0·1 ≔ Φ.φ"+                       , "  normalized 𝑛·0·2 ≔ 2.0.times( x ↦ 3.0 ).nope  # Φ.φ"+                       , "  𝕄(𝑛·0·1):"+                       , "    normalized 𝑛·0·3 ≔ ⟦ φ ↦ ∅, times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧  # Φ.number"+                       , "    𝑛·0·4 ≔ 2.0"+                       , "    𝑛·0·5 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧"+                       , "    normalized 𝑛·0·6 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_times ⟧  # 𝑛·0·5.times"+                       , "    𝑛·0·7 ≔ 𝑛·0·4.times( x ↦ 3.0 )"+                       , "    𝑛·0·8 ≔ ⟦ x ↦ 3.0, λ ⤍ L_number_times ⟧"+                       , "    𝔼(L_number_times):"+                       , "      𝔻(ξ.ρ):"+                       , "        𝕄(ξ.ρ):"+                       , "          𝑛·1·1 ≔ 2.0"+                       , "          𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧"+                       , "          morphed 𝑛·1·3 ≔ 𝑛·1·2"+                       , "        boxed 𝑛·1·4 ≔ 𝑛·1·3.φ"+                       , "        normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )  # 𝑛·1·4"+                       , "        𝕄(𝑛·1·4):"+                       , "          normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes"+                       , "          𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )"+                       , "          𝑛·1·8 ≔ 40-00-00-00-00-00-00-00:Δ:φ"+                       , "          morphed 𝑛·1·9 ≔ 𝑛·1·8"+                       , "        boxed 𝑛·1·10 ≔ 𝑛·1·9.φ"+                       , "        normalized 𝑛·1·11 ≔ 40-00-00-00-00-00-00-00:Δ  # 𝑛·1·10"+                       , "        𝛿·1·1 ≔ 40-00-00-00-00-00-00-00  # 2.0"+                       , "      𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)"+                       , "      𝔻(ξ.x):"+                       , "        𝕄(ξ.x):"+                       , "          𝑛·1·12 ≔ 3.0"+                       , "          𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧"+                       , "          morphed 𝑛·1·14 ≔ 𝑛·1·13"+                       , "        boxed 𝑛·1·15 ≔ 𝑛·1·14.φ"+                       , "        normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )  # 𝑛·1·15"+                       , "        𝕄(𝑛·1·15):"+                       , "          𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )"+                       , "          𝑛·1·18 ≔ 40-08-00-00-00-00-00-00:Δ:φ"+                       , "          morphed 𝑛·1·19 ≔ 𝑛·1·18"+                       , "        boxed 𝑛·1·20 ≔ 𝑛·1·19.φ"+                       , "        normalized 𝑛·1·21 ≔ 40-08-00-00-00-00-00-00:Δ  # 𝑛·1·20"+                       , "        𝛿·1·2 ≔ 40-08-00-00-00-00-00-00  # 3.0"+                       , "      𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)"+                       , "      𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_times"+                       , "      𝕄(𝑛·1·22):"+                       , "        𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                       , "        𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, times(x) ↦ L_number_times:λ, nope ↦ L_number_nope:λ ⟧"+                       , "        morphed 𝑛·1·25 ≔ 𝑛·1·24"+                       , "      𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)"+                       , "      evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·8"+                       , "    normalized 𝑛·0·9 ≔ L_number_nope:λ  # 𝑛·1·27.nope"+                       , "    morphed 𝑛·0·10 ≔ L_number_nope:λ"+                       , "  unanswered L_number_nope  # 𝔻(L_number_nope:λ)"+                       ]++      it "still prints bytes when nothing gets stuck" $+        withStdin "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6) ]]" $+          testCLISucceeded ["dataize", symbolic, "--partial"] ["40-45-00-00-00-00-00-00"]++      it "prints the residual at --locator as XMIR, with ρ hidden" $+        withStdin wrapped $+          testCLISucceeded+            ["dataize", symbolic, "--partial", "--locator=Q.app", "--output=xmir", "--hide-rho"]+            ["<o name=\"λ\">L_number_nope</o>"]++      it "prints the residual at --locator, not the whole program" $+        withStdin wrapped $ do+          (out, _) <- withStdout (runCLI ["dataize", symbolic, "--partial", "--locator=Q.app", "--hide-rho", "--flat"])+          lines out `shouldBe` ["⟦ λ ⤍ L_number_nope ⟧"]++      it "prints a residual of several top bindings as XMIR" $+        withStdin dispatched $+          testCLISucceeded+            ["dataize", symbolic, "--partial", "--output=xmir"]+            ["<o base=\"Φ.foo\" name=\"ρ\"/>", "<o name=\"λ\">L_number_nope</o>"]++      it "prints the chain of steps ending in the residue with --sequence" $+        withStdin stuck $+          testCLISucceeded+            ["dataize", symbolic, "--partial", "--sequence", "--sweet", "--hide-rho", "--flat"]+            ["2.0.times( x ↦ 3.0 ).nope", "L_number_nope:λ"]++      it "prints the terminator ⊥ the object reduces to as the residue" $+        withStdin "[[ ]]" $+          testCLISucceeded ["dataize", "--partial"] ["⊥"]++      describe "--focus under --locator" $ do+        it "finds the same object for the steps and for the answer when --locator has no matching child" $+          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $+            testCLISucceeded+              ["dataize", "--partial", "--locator=Q.t", "--focus=Q.a", "--flat"]+              ["⟦ Δ ⤍ 02- ⟧"]+        it "finds the same object for the steps and for the answer even when --locator also binds that attribute" $+          withStdin "⟦ t ↦ ⟦ a ↦ ⟦ Δ ⤍ 01- ⟧, λ ⤍ L_nope ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $ do+            (out, _) <- withStdout (runCLI ["dataize", "--partial", "--locator=Q.t", "--focus=Q.a", "--flat", "--sequence"])+            filter (not . null) (lines out) `shouldSatisfy` (not . null)+            filter (not . null) (lines out) `shouldSatisfy` all (== "⟦ Δ ⤍ 02- ⟧")+        it "prints the residual when --focus names the object at --locator" $+          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $+            testCLISucceeded+              ["dataize", "--partial", "--locator=Q.t", "--focus=Q.t", "--flat"]+              ["⟦ λ ⤍ L_nope ⟧"]+        it "respects --hide together with --focus and --locator" $+          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧, a ↦ ⟦ x ↦ ⟦ Δ ⤍ 01- ⟧, y ↦ ⟦ Δ ⤍ 02- ⟧ ⟧ ⟧" $+            testCLISucceeded+              ["dataize", "--partial", "--locator=Q.t", "--focus=Q.a", "--hide=Q.a.x", "--flat"]+              ["⟦ y ↦ ⟦ Δ ⤍ 02- ⟧ ⟧"]+        it "fails on a --focus it cannot find before it prints any step" $+          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧ ⟧" $ do+            (out, _) <- withStdout (try (runCLI ["dataize", "--partial", "--locator=Q.t", "--focus=Q.nope", "--flat", "--sequence"]) :: IO (Either ExitCode ()))+            out `shouldNotContain` "⟦ λ ⤍"+        it "prints the answer at --focus in LaTeX format under --locator" $+          withStdin "⟦ t ↦ ⟦ λ ⤍ L_nope ⟧, a ↦ ⟦ Δ ⤍ 02- ⟧ ⟧" $+            testCLISucceeded+              ["dataize", "--partial", "--locator=Q.t", "--focus=Q.a", "--flat", "--output=latex"]+              ["\\begin{phiquation}", "[[ D> |02-| ]]{.}", "\\end{phiquation}"]++    describe "--symbolic" $ do+      let sum' = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6) ]]"+      it "fires the λ function an entry of the file answers" $+        withStdin sum' $+          testCLISucceeded ["dataize", symbolic] ["40-45-00-00-00-00-00-00"]++      it "reports the progress of the run with --log-level=INFO" $+        withStdin sum' $+          testCLISucceeded ["dataize", symbolic, "--log-level=INFO", "--quiet"] ["[INFO]: Started "]++      it "gets stuck on every λ function when it is not given" $+        withStdin sum' $+          testCLIFailed ["dataize"] ["No entry of --symbolic answers the λ function 'L_number_plus'"]++      it "fails when the file is not there" $+        withStdin sum' $+          testCLIFailed ["dataize", "--symbolic=no-such-file.yaml"] ["no-such-file.yaml"]++      it "fails on a file that carries no entries at all, before dataizing anything" $+        withTempFileContent "symbolicXXXXXX.yaml" "nope: true\n" $ \path ->+          withStdin sum' $+            testCLIFailed ["dataize", "--symbolic=" ++ path] ["cannot be read"]++    describe "a join on a condition nobody decided" $ do+      let joining = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.c\n  join:\n    on: 𝛿1\n    left: $.a\n    right: $.b\n"+          dataized :: String -> IO String+          dataized program =+            withLambdasOf joining $ \joins ->+              withStdin program $+                fst <$> withStdout (runCLI ["dataize", "--symbolic=" ++ joins, "--locator=Q.y"])+      it "gets stuck on two sides that do not join, instead of splitting the run" $+        withLambdasOf joining $ \joins ->+          withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ ⟦ Δ ⤍ 02- ⟧, λ ⤍ L_fork ⟧ ⟧" $+            testCLIFailed ["dataize", "--symbolic=" ++ joins, "--locator=Q.y"] ["No entry of --symbolic answers the λ function 'L_fork'"]++      it "gets stuck on a side whose morph got stuck" $+        withLambdasOf joining $ \joins ->+          withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ Δ ⤍ 05- ⟧, b ↦ ⟦ λ ⤍ L_none ⟧.x, λ ⤍ L_fork ⟧ ⟧" $+            testCLIFailed ["dataize", "--symbolic=" ++ joins, "--locator=Q.y"] ["No entry of --symbolic answers the λ function 'L_none'"]++      it "dataizes two sides that come to the same term" $ do+        printed <- dataized "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ Δ ⤍ 07- ⟧, b ↦ ⟦ Δ ⤍ 07- ⟧, λ ⤍ L_fork ⟧ ⟧"+        lines printed `shouldBe` ["07-"]++      it "dataizes two sides that differ only in their symbols" $ do+        printed <- dataized "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎2 ⟧ ⟧, b ↦ ⟦ φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ⟧, λ ⤍ L_fork ⟧ ⟧"+        length (lines printed) `shouldBe` 1++      it "dataizes a side and ⊥ into the symbol the join minted for both" $ do+        printed <- dataized "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ λ ⤍ 𝜎2 ⟧, b ↦ ⊥, λ ⤍ L_fork ⟧ ⟧"+        lines printed `shouldBe` ["40-45-00-00-00-00-00-00"]++      it "writes the symbol a join minted for a side and ⊥ beside a symbol standing for ⊥" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withLambdasOf joining $ \joins ->+            withStdin "⟦ y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎1 ⟧, a ↦ ⟦ λ ⤍ 𝜎2 ⟧, b ↦ ⊥, λ ⤍ L_fork ⟧ ⟧" $+              testCLISucceeded ["dataize", "--symbolic=" ++ joins, "--locator=Q.y", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+          records <- readProtocol path+          lines records `shouldContain` ["    joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥"]++    describe "--inside" $ do+      let universe = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> [[ D> 01- ]] ]]"+      it "dataizes an expression the input does not contain" $+        withStdin universe $+          testCLISucceeded ["dataize", symbolic, "--inside=5.plus( x -> 6 )"] ["40-45-00-00-00-00-00-00"]++      it "normalizes what it is handed before dataizing it" $+        withStdin universe $+          testCLISucceeded ["dataize", "--inside=[[ x -> [[ D> 2A- ]] ]].x"] ["2A-"]++      it "hides an object of the universe from the answer it morphs inside it" $+        withStdin universe $+          testCLISucceeded ["morph", "--inside=[[ x -> [[ D> 2A- ]] ]].x", "--hide=Q.bytes", "--flat", "--hide-rho"] ["⟦ Δ ⤍ 2A- ⟧"]++      it "morphs inside the universe just as it dataizes inside it" $+        withStdin universe $+          testCLISucceeded ["morph", symbolic, "--inside=5.plus( x ↦ 6 )", "--sweet", "--hide-rho", "--flat"] ["⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"]++      it "opens the text protocol before the objects it made while aiming" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin universe $+            testCLISucceeded ["morph", symbolic, "--inside=5.plus( x -> 6 )", "--minutes=" ++ path, "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          takeWhile (/= '(') (concat (take 1 (lines records))) `shouldBe` "𝕄"++      it "opens the XML protocol before the objects it made while aiming" $+        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withStdin universe $+            testCLISucceeded ["dataize", symbolic, "--inside=5.plus( x -> 6 )", "--protocol=" ++ path, "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          take 1 (lines records) `shouldBe` ["<?xml version=\"1.0\" encoding=\"UTF-8\"?>"]++      it "sites what it made while aiming at the place it put the expression at" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin universe $+            testCLISucceeded ["dataize", "--inside=[[ x -> ? ]]( x -> [[ D> 2A- ]] ).x", "--minutes=" ++ path, "--sweet", "--quiet"] []+          records <- readProtocol path+          take 2 (lines records) `shouldBe` ["𝔻(Φ.a🌵0):", "  𝑛·0·1 ≔ ∅:x( x ↦ 2A-:Δ )"]++      it "opens a single morph block in the text protocol it aims inside" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin "⟦ app ↦ ⟦ x ↦ ∅, φ ↦ ξ.x ⟧ ⟧" $+            testCLISucceeded ["morph", "--inside=Φ.app( x ↦ ⟦ Δ ⤍ 02- ⟧ )", "--minutes=" ++ path, "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          length (filter ("𝕄(Φ.a🌵0):" `isInfixOf`) (lines records)) `shouldBe` 1+          take 2 (drop 1 (lines records)) `shouldBe` ["  remembered 𝑛·0·1 ≡ Φ.app  # ⟦ x ↦ ∅, φ ↦ x ⟧", "  𝑛·0·2 ≔ Φ.app( x ↦ 02-:Δ )"]++      it "opens a single dataize element in the XML protocol it aims inside" $+        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withStdin "⟦ app ↦ ⟦ x ↦ ∅, φ ↦ ξ.x ⟧ ⟧" $+            testCLISucceeded ["dataize", "--inside=⟦ Δ ⤍ 02- ⟧", "--protocol=" ++ path, "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          length (filter (isInfixOf "<dataize at=\"Φ.a🌵0\">") (lines records)) `shouldBe` 1++      it "keeps opening the block of a judgment nested in the universe it aims inside" $+        withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+          hClose stream+          withStdin universe $+            testCLISucceeded ["dataize", symbolic, "--inside=5.plus( x -> 6 )", "--minutes=" ++ path, "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          take 3 (lines records) `shouldBe` ["𝔻(Φ.a🌵0):", "  𝕄(Φ.a🌵0):", "    normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"]++      it "opens a single morph element in the XML protocol it aims inside" $+        withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+          hClose stream+          withStdin "⟦ app ↦ ⟦ x ↦ ∅, φ ↦ ξ.x ⟧ ⟧" $+            testCLISucceeded ["morph", "--inside=Φ.app( x ↦ ⟦ Δ ⤍ 02- ⟧ )", "--protocol=" ++ path, "--sweet", "--hide-rho", "--quiet"] []+          records <- readProtocol path+          length (filter (isInfixOf "<morph at=\"Φ.a🌵0\">") (lines records)) `shouldBe` 1++      it "cannot be used together with --locator" $+        withStdin universe $+          testCLIFailed ["dataize", "--inside=Q.@", "--locator=Q.@"] ["--inside and --locator cannot be used together"]++      it "accepts --locator=Φ with --inside, since Φ and Q both name the root" $+        withStdin universe $+          testCLISucceeded ["dataize", "--inside=[[ x -> [[ D> 2A- ]] ]].x", "--locator=Φ"] ["2A-"]++      it "accepts --locator=Φ with morph --inside, since Φ and Q both name the root" $+        withStdin universe $+          testCLISucceeded ["morph", symbolic, "--inside=5.plus( x ↦ 6 )", "--locator=Φ", "--sweet", "--hide-rho", "--flat"] ["⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"]++      it "fails when the input expression is not a formation" $+        withStdin "Q.x" $+          testCLIFailed ["dataize", "--inside=Q.x"] ["--inside requires the input expression to be a formation"]++    describe "fails" $ do+      it "with --output != latex and --nonumber" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--nonumber", "--output=xmir"]+            ["The --nonumber option can stay together with --output=latex only"]++      it "with --omit-listing and --output != xmir" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--omit-listing", "--output=phi"]+            ["--omit-listing"]++      it "with --omit-comments and --output != xmir" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--omit-comments", "--output=phi"]+            ["--omit-comments"]++      it "with --expression and --output != latex" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--expression=foo", "--output=phi"]+            ["--expression option can stay together with --output=latex only"]++      it "with --label and --output != latex" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--label=foo", "--output=phi"]+            ["--label option can stay together with --output=latex only"]++      it "with wrong --hide option" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--hide=Q.x(k -> Q.y)"]+            ["[ERROR]: Invalid set of arguments: Only dispatch expression", "but given: Φ.x( k ↦ Φ.y )"]++      it "with wrong --show option" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--show=Q.x(k -> Q.y)"]+            ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --show"]++      it "with wrong --locator option" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--locator=Q.x(k -> Q.y)"]+            ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --locator"]++      it "with wrong --focus option" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--focus=Q.x(k -> Q.y)"]+            ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --focus"]++      it "with wrong --locator option written through ξ, keeping ξ in the error" $+        withStdin "" $+          testCLIFailed+            ["dataize", "--locator=ξ.x"]+            ["[ERROR]:", "but given: ξ.x"]++    it "accepts --depth-sensitive" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded ["dataize", "--depth-sensitive"] ["01-"]++    it "finishes exactly on --max-cycles without reporting the limit" $+      withStdin "⟦ φ ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $+        testCLISucceeded ["dataize", "--max-cycles=1"] ["01-"]++    it "reports --max-cycles exceeded when a rule still applies at the limit" $+      withStdin "[[ @ -> $.f(y -> [[ ]]), f -> [[ D> 00-, y -> ? ]] ]]" $+        testCLIFailed+          ["dataize", "--max-cycles=1"]+          ["[ERROR]: Normalization did not finish before reaching the limit of cycles: --max-cycles=1"]++  describe "morph" $ do+    let chained = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6).plus(x -> 7) ]]"+    it "prints help" $+      testCLISucceeded ["morph", "--help"] ["Morph the 𝜑-expression"]++    it "hands the top formation back untouched under the default locator" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded ["morph", "--flat", "--hide-rho"] ["⟦ Δ ⤍ 01- ⟧"]++    it "stops at the bare saturated λ-formation" $+      withStdin chained $+        testCLISucceeded+          ["morph", symbolic, "--locator=Q.@", "--sweet", "--hide-rho", "--flat"]+          ["⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"]++    it "leaves to dataize the firing that takes the same term to bytes" $+      withStdin chained $+        testCLISucceeded ["dataize", symbolic] ["40-45-00-00-00-00-00-00"]++    it "morphs the subterm --locator aims at" $+      withStdin "[[ ex -> Q.x, x -> [[ D> 42- ]] ]]" $+        testCLISucceeded ["morph", "--locator=Q.ex", "--flat", "--hide-rho"] ["⟦ Δ ⤍ 42- ⟧"]++    it "canonizes the answer it prints" $+      withStdin "[[ x -> [[ L> Foo ]], y -> [[ L> Bar ]] ]]" $+        testCLISucceeded ["morph", "--canonize", "--flat", "--sweet"] ["⟦ x ↦ Fn1:λ, y ↦ Fn2:λ ⟧"]++    it "hides a binding of the answer it prints" $+      withStdin "[[ x -> [[ L> Foo ]], y -> [[ L> Bar ]] ]]" $+        testCLISucceeded ["morph", "--hide=Q.x", "--flat", "--sweet"] ["Bar:λ:y"]++    it "shows only one binding of the answer it prints" $+      withStdin "[[ x -> [[ L> Foo ]], y -> [[ L> Bar ]] ]]" $+        testCLISucceeded ["morph", "--show=Q.x", "--flat", "--sweet"] ["Foo:λ:x"]++    it "hides an object outside the answer --locator aims at" $+      withStdin "[[ t -> [[ a -> [[ D> 01- ]], b -> [[ D> 02- ]] ]], o -> [[ D> 03- ]] ]]" $+        testCLISucceeded ["morph", "--locator=Q.t", "--hide=Q.o", "--flat", "--hide-rho"] ["⟦ a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ ⟦ Δ ⤍ 02- ⟧ ⟧"]++    it "hides a binding of the answer --locator aims at" $+      withStdin "[[ t -> [[ a -> [[ D> 01- ]], b -> [[ D> 02- ]] ]], o -> [[ D> 03- ]] ]]" $+        testCLISucceeded ["morph", "--locator=Q.t", "--hide=Q.t.a", "--flat", "--hide-rho"] ["⟦ b ↦ ⟦ Δ ⤍ 02- ⟧ ⟧"]++    it "shows only one binding of the answer --locator aims at" $+      withStdin "[[ t -> [[ a -> [[ D> 01- ]], b -> [[ D> 02- ]] ]], o -> [[ D> 03- ]] ]]" $+        testCLISucceeded ["morph", "--locator=Q.t", "--show=Q.t.b", "--flat", "--hide-rho"] ["⟦ b ↦ ⟦ Δ ⤍ 02- ⟧ ⟧"]++    it "prints ⊥ instead of failing the run" $+      withStdin "[[ x -> $ ]]" $+        testCLISucceeded ["morph", "--locator=Q.x"] ["⊥"]++    it "fails to dataize what it morphs to ⊥" $+      withStdin "[[ x -> $ ]]" $+        testCLIFailed ["dataize", "--locator=Q.x"] ["terminator ⊥"]++    it "prints the chain of morphing steps with --sequence" $+      withStdin chained $+        testCLISucceeded+          ["morph", symbolic, "--locator=Q.@", "--sequence", "--headers", "--sweet", "--hide-rho", "--flat"]+          [ "Rule 'ma'"+          , "Rule 'copy'"+          , "Rule 'mf'"+          , "⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"+          ]++    it "writes every step of a LaTeX --sequence with the arrow of its judgment" $+      withStdin "[[ q -> [[ ]], k -> Q.q ]]" $+        testCLISucceeded+          ["morph", "--locator=Q.k", "--sequence", "--output=latex", "--flat", "--sweet", "--quiet"]+          [ intercalate+              "\n"+              [ "\\begin{phiquation}"+              , "[[ |q| -> [[]], |k| -> Q . |q| ]] \\phiMorph[\\nameref{r:md}]"+              , "  \\phiMorph [[ |q| -> [[]], |k| -> [[ |q| -> [[]], |k| -> Q . |q| ]] . |q| ]] \\phiNormalize[\\nameref{r:dot}]"+              , "  \\phiNormalize [[ |q| -> [[]], |k| -> [[]] ( \\phiTerminal{\\rho} -> Q ) ]] \\phiNormalize[\\nameref{r:skip}]"+              , "  \\phiNormalize [[ |q| -> [[]], |k| -> [[]] ]] \\phiMorph[\\nameref{r:mf}]"+              , "  \\phiMorph [[ |q| -> [[]], |k| -> [[]] ]]{.}"+              , "\\end{phiquation}"+              ]+          ]++    it "does not print the result with --quiet" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded ["morph", "--quiet"] []++    it "records the λ functions it fires with --protocol" $+      withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+        hClose stream+        withStdin chained $+          testCLISucceeded ["morph", symbolic, "--locator=Q.@", "--minutes=" ++ path, "--quiet", "--sweet", "--hide-rho"] []+        records <- readProtocol path+        lines records+          `shouldBe` [ "𝕄(Φ.φ):"+                     , "  normalized 𝑛·0·1 ≔ ⟦ φ ↦ ∅, plus(x) ↦ L_number_plus:λ ⟧  # Φ.number"+                     , "  𝑛·0·2 ≔ 5.0"+                     , "  𝑛·0·3 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                     , "  normalized 𝑛·0·4 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·0·3.plus"+                     , "  𝑛·0·5 ≔ 𝑛·0·2.plus( x ↦ 6.0 )"+                     , "  𝑛·0·6 ≔ ⟦ x ↦ 6.0, λ ⤍ L_number_plus ⟧"+                     , "  𝔼(L_number_plus):"+                     , "    𝔻(ξ.ρ):"+                     , "      𝕄(ξ.ρ):"+                     , "        𝑛·1·1 ≔ 5.0"+                     , "        𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                     , "        morphed 𝑛·1·3 ≔ 𝑛·1·2"+                     , "      boxed 𝑛·1·4 ≔ 𝑛·1·3.φ"+                     , "      normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )  # 𝑛·1·4"+                     , "      𝕄(𝑛·1·4):"+                     , "        normalized 𝑛·1·6 ≔ ∅:φ  # Φ.bytes"+                     , "        𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-14-00-00-00-00-00-00:Δ )"+                     , "        𝑛·1·8 ≔ 40-14-00-00-00-00-00-00:Δ:φ"+                     , "        morphed 𝑛·1·9 ≔ 𝑛·1·8"+                     , "      boxed 𝑛·1·10 ≔ 𝑛·1·9.φ"+                     , "      normalized 𝑛·1·11 ≔ 40-14-00-00-00-00-00-00:Δ  # 𝑛·1·10"+                     , "      𝛿·1·1 ≔ 40-14-00-00-00-00-00-00  # 5.0"+                     , "    𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)"+                     , "    𝔻(ξ.x):"+                     , "      𝕄(ξ.x):"+                     , "        𝑛·1·12 ≔ 6.0"+                     , "        𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ ), plus(x) ↦ L_number_plus:λ ⟧"+                     , "        morphed 𝑛·1·14 ≔ 𝑛·1·13"+                     , "      boxed 𝑛·1·15 ≔ 𝑛·1·14.φ"+                     , "      normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )  # 𝑛·1·15"+                     , "      𝕄(𝑛·1·15):"+                     , "        𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-18-00-00-00-00-00-00:Δ )"+                     , "        𝑛·1·18 ≔ 40-18-00-00-00-00-00-00:Δ:φ"+                     , "        morphed 𝑛·1·19 ≔ 𝑛·1·18"+                     , "      boxed 𝑛·1·20 ≔ 𝑛·1·19.φ"+                     , "      normalized 𝑛·1·21 ≔ 40-18-00-00-00-00-00-00:Δ  # 𝑛·1·20"+                     , "      𝛿·1·2 ≔ 40-18-00-00-00-00-00-00  # 6.0"+                     , "    𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)"+                     , "    𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_plus"+                     , "    𝕄(𝑛·1·22):"+                     , "      𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )"+                     , "      𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, plus(x) ↦ L_number_plus:λ ⟧"+                     , "      morphed 𝑛·1·25 ≔ 𝑛·1·24"+                     , "    𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)"+                     , "    evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·6"+                     , "  normalized 𝑛·0·7 ≔ ⟦ x ↦ ∅, λ ⤍ L_number_plus ⟧  # 𝑛·1·27.plus"+                     , "  𝑛·0·8 ≔ 𝑛·1·23.plus( x ↦ 7.0 )"+                     , "  𝑛·0·9 ≔ ⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"+                     , "  morphed 𝑛·0·10 ≔ 𝑛·0·9"+                     ]++    it "saves morphing steps to dir with --steps-dir" $+      withTempDirectory "phino-steps-morph" $ \dir ->+        withStdin chained $ do+          testCLISucceeded+            ["morph", symbolic, "--locator=Q.@", "--steps-dir=" ++ dir, "--sweet", "--hide-rho", "--flat"]+            ["⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"]+          steps <- sort <$> listDirectory dir+          steps `shouldBe` map (\n -> printf "%05d.phi" (n :: Int)) [1 .. length steps]+          length steps `shouldSatisfy` (> 0)++    it "accepts --seed, --shuffle and --depth-sensitive" $+      withStdin "[[ D> 01- ]]" $+        testCLISucceeded ["morph", "--seed=7", "--shuffle", "--depth-sensitive", "--flat", "--hide-rho"] ["⟦ Δ ⤍ 01- ⟧"]++    it "returns the λ-formation dataize cannot finish on" $+      withStdin "⟦ @ ↦ ⟦ λ ⤍ L_number_div, ρ ↦ ⟦ Δ ⤍ 40-45-00-00-00-00-00-00 ⟧, x ↦ ⟦ Δ ⤍ 40-00-00-00-00-00-00-00 ⟧ ⟧ ⟧" $+        testCLISucceeded+          ["morph", "--locator=Q.@", "--max-steps=40", "--flat", "--hide-rho"]+          ["⟦ λ ⤍ L_number_div"]++    it "fails once the --max-steps budget is spent" $+      withStdin chained $+        testCLIFailed+          ["morph", "--locator=Q.@", "--max-steps=3"]+          ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=3"]++    it "names morphing, not dataization, when the budget is spent before dataization starts" $+      withStdin "⟦ x ↦ Φ.x.y ⟧" $+        testCLIFailed+          ["morph", "--locator=Q.x", "--max-steps=5"]+          ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=5"]++    describe "--max-firings" $ do+      let splitting = withLambdasOf (T.pack "- λ: L_split\n  morph:\n    𝑛1: Φ.s.foo\n    𝑛2: Φ.s.foo\n  𝑛: ⟦ l ↦ 𝑛1, r ↦ 𝑛2 ⟧\n")+          split = "⟦ s ↦ ⟦ λ ⤍ L_split ⟧, x ↦ Φ.s.foo ⟧"+      it "fails with non-positive --max-firings" $+        withStdin split $+          testCLIFailed ["morph", "--max-firings=0"] ["--max-firings must be positive"]++      it "fails once the --max-firings budget is spent on a widening recursion" $+        splitting $ \table ->+          withStdin split $+            testCLIFailed+              ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-firings=64"]+              ["[ERROR]: Evaluation did not finish before reaching the limit of firings: --max-firings=64"]++      it "ends the widening recursion with --partial" $+        splitting $ \table ->+          withStdin split $+            testCLISucceeded+              ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-firings=64", "--partial", "--flat", "--hide-rho", "--sweet"]+              ["L_split:λ.foo"]++      it "fires no more λ functions than --max-firings allows" $+        splitting $ \table ->+          withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+            hClose stream+            withStdin split $+              testCLISucceeded+                ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-firings=64", "--partial", "--minutes=" ++ path, "--quiet"]+                []+            records <- readProtocol path+            length (filter (isInfixOf "𝔼(L_split)") (lines records)) `shouldBe` 64++    describe "--max-nodes" $ do+      let growing = "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( tup ↦ ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( tup ↦ ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( p ↦ 𝜎1:λ ) ⟧"+      it "fails with non-positive --max-nodes" $+        withStdin growing $+          testCLIFailed ["dataize", "--max-nodes=0"] ["--max-nodes must be positive"]++      it "fails once the term grows over --max-nodes" $+        withStdin growing $+          testCLIFailed+            ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-nodes=60", "--locator=Q.x"]+            ["[ERROR]: Evaluation did not finish before reaching the limit of nodes: --max-nodes=60"]++      it "ends the growing term with --partial" $+        withStdin growing $+          testCLISucceeded+            ["morph", "--acyclic=plausible", "--max-loops=2", "--max-nodes=60", "--partial", "--locator=Q.x", "--flat", "--hide-rho", "--sweet"]+            ["Φ.m( p ↦ 𝜎1:λ )"]++      it "passes a small run in a large program under --max-nodes" $+        withStdin ("⟦ x ↦ ⟦ φ ↦ ξ.y, y ↦ ⟦ Δ ⤍ 05- ⟧ ⟧, junk ↦ ⟦ " ++ intercalate ", " [printf "a%d ↦ ⟦ b ↦ ⟦ c ↦ ⟦ Δ ⤍ 01- ⟧ ⟧ ⟧" index | index <- [0 .. 999 :: Int]] ++ " ⟧ ⟧") $+          testCLISucceeded ["dataize", "--max-nodes=50", "--locator=Q.x"] ["05-"]++    describe "--max-memory" $ do+      let growing = "⟦ m(p) ↦ ⟦ φ ↦ ξ.a( tup ↦ ξ.p ).φ, a(ρ, tup) ↦ ⟦ φ ↦ ρ.a( tup ↦ ξ.tup.tail ).φ ⟧ ⟧, x ↦ Φ.m( p ↦ 𝜎1:λ ) ⟧"+      it "fails with non-positive --max-memory" $+        withStdin growing $+          testCLIFailed ["dataize", "--max-memory=0G"] ["--max-memory must be positive"]++      it "fails with --max-memory of an unknown unit" $+        withStdin growing $+          testCLIFailed ["dataize", "--max-memory=8Q"] ["--max-memory must be a number of bytes, optionally ending with K, M, G or T"]++      it "fails once the heap grows over --max-memory" $+        withStdin growing $+          testCLIFailed+            ["dataize", "--acyclic=plausible", "--max-loops=2", "--max-memory=1K", "--locator=Q.x"]+            ["[ERROR]: Evaluation did not finish before reaching the limit of memory: --max-memory=1K"]++      it "ends the growing term with --partial under --max-memory" $+        withStdin growing $+          testCLISucceeded+            ["morph", "--acyclic=plausible", "--max-loops=2", "--max-memory=1K", "--partial", "--locator=Q.x", "--flat", "--hide-rho", "--sweet"]+            ["Φ.m( p ↦ 𝜎1:λ )"]++      it "passes a small run in a large program under --max-memory" $+        withStdin ("⟦ x ↦ ⟦ φ ↦ ξ.y, y ↦ ⟦ Δ ⤍ 05- ⟧ ⟧, junk ↦ ⟦ " ++ intercalate ", " [printf "a%d ↦ ⟦ b ↦ ⟦ c ↦ ⟦ Δ ⤍ 01- ⟧ ⟧ ⟧" index | index <- [0 .. 999 :: Int]] ++ " ⟧ ⟧") $+          testCLISucceeded ["dataize", "--max-memory=1G", "--locator=Q.x"] ["05-"]++    describe "--max-seconds" $ do+      let ladder = withLambdasOf (T.pack "- λ: L_split\n  morph:\n    𝑛1: ξ.n.foo\n    𝑛2: ξ.n.foo\n  𝑛: ⟦ l ↦ 𝑛1, r ↦ 𝑛2 ⟧\n")+          rungs = "⟦ " ++ intercalate ", " [printf "l%d ↦ ⟦ λ ⤍ L_split, n ↦ Φ.l%d ⟧" rung (rung + 1) | rung <- [0 .. 23 :: Int]] ++ ", l24 ↦ ⟦⟧, x ↦ Φ.l0.foo ⟧"+          bounded :: Expectation -> Expectation+          bounded check = timeout 60000000 check >>= (`shouldBe` Just ())+      it "fails with non-positive --max-seconds" $+        withStdin rungs $+          testCLIFailed ["morph", "--max-seconds=0"] ["--max-seconds must be positive"]++      forM_ ["0.0", "-0.5", "-1"] $ \given ->+        it ("fails with non-positive --max-seconds=" ++ given) $+          withStdin rungs $+            testCLIFailed ["morph", "--max-seconds=" ++ given] ["--max-seconds must be positive"]++      forM_ ["NaN", "Infinity"] $ \given ->+        it ("fails with --max-seconds=" ++ given) $+          withStdin rungs $+            testCLIFailed ["morph", "--max-seconds=" ++ given] ["--max-seconds must be a finite number"]++      it "fails with a --max-seconds value that is no number" $+        withStdin rungs $+          testCLIFailed ["morph", "--max-seconds=1,5"] ["cannot parse '1,5' as a number of seconds"]++      it "fails with a fractional --max-seconds value above maxBound Int, naming the limit" $+        withStdin rungs $+          testCLIFailed+            ["morph", "--max-seconds=9223372036854775808.5"]+            ["value must be between", "9223372036854775807"]++      it "accepts a fractional --max-seconds a run fits in" $+        withStdin "⟦ x ↦ ⟦ Δ ⤍ 01- ⟧ ⟧" $+          testCLISucceeded ["morph", "--locator=Q.x", "--max-seconds=2.5", "--flat"] ["01-"]++      it "fails with a --max-seconds value above maxBound Int, naming the limit" $+        withStdin rungs $+          testCLIFailed+            ["morph", "--max-seconds=9223372036854775808"]+            ["value must be between", "9223372036854775807"]++      it "fails once the --max-seconds budget is spent" $+        ladder $ \table ->+          bounded $+            withStdin rungs $+              testCLIFailed+                ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-seconds=0.01"]+                ["[ERROR]: Evaluation did not finish before reaching the limit of seconds: --max-seconds=0.01"]++      it "fails dataize once the --max-seconds budget is spent" $+        ladder $ \table ->+          bounded $+            withStdin rungs $+              testCLIFailed+                ["dataize", "--symbolic=" ++ table, "--locator=Q.x", "--max-seconds=0.01"]+                ["[ERROR]: Evaluation did not finish before reaching the limit of seconds: --max-seconds=0.01"]++      it "prints the residue once the --max-seconds budget is spent with --partial" $+        ladder $ \table ->+          bounded $+            withStdin rungs $+              testCLISucceeded+                ["morph", "--symbolic=" ++ table, "--max-seconds=0.01", "--locator=Q.x", "--partial", "--flat", "--hide-rho", "--sweet"]+                ["⟦ λ ⤍ L_split, n ↦ Φ.l1 ⟧.foo"]++      it "prints the residue of a dataization once the --max-seconds budget is spent with --partial" $+        ladder $ \table ->+          bounded $+            withStdin rungs $+              testCLISucceeded+                ["dataize", "--symbolic=" ++ table, "--max-seconds=0.01", "--locator=Q.x", "--partial", "--flat", "--hide-rho", "--sweet"]+                ["⟦ λ ⤍ L_split, n ↦ Φ.l1 ⟧.foo"]++      forM_ [(testCLIFailed, ["--max-seconds=0.01"], ["--locator=Q.x"]), (testCLISucceeded, [], ["--locator=Q.x", "--partial"])] $ \(run, outputs, opts) ->+        it ("writes the timeout as the last line of the protocol with " ++ unwords opts) $+          ladder $ \table ->+            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+              hClose stream+              bounded $+                withStdin rungs $+                  run+                    (["morph", "--symbolic=" ++ table, "--max-seconds=0.01", "--minutes=" ++ path, "--quiet"] ++ opts)+                    outputs+              records <- readProtocol path+              take 2 (words (last (lines records))) `shouldBe` ["timeout", "0.01"]++      it "writes the timeout once to the XML protocol" $+        ladder $ \table ->+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            bounded $+              withStdin rungs $+                testCLISucceeded+                  ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--partial", "--max-seconds=0.01", "--protocol=" ++ path, "--quiet"]+                  []+            records <- readProtocol path+            length (filter (isInfixOf "<timeout limit=\"0.01\" by=\"morph\" at=\"") (lines records)) `shouldBe` 1++      it "closes the XML protocol of a run out of time" $+        ladder $ \table ->+          withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+            hClose stream+            bounded $+              withStdin rungs $+                testCLIFailed+                  ["morph", "--symbolic=" ++ table, "--locator=Q.x", "--max-seconds=0.01", "--protocol=" ++ path, "--quiet"]+                  ["--max-seconds=0.01"]+            document <- X.readFile X.def path+            X.nameLocalName (X.elementName (X.documentRoot document)) `shouldBe` T.pack "protocol"++    it "parks the spent budget as a residual with --partial" $+      withStdin "⟦ φ ↦ 5.gt(b ↦ Φ.nan) ⟧" $+        testCLISucceeded+          ["morph", "--locator=Q.@", "--max-steps=10", "--partial", "--flat", "--hide-rho", "--sweet"]+          ["5.0.gt( b ↦ Φ.nan )"]++    describe "--partial" $ do+      let stuck = "[[ @ -> [[ L> Sym_arg_0 ]].foo ]]"+      it "fails on a λ function that cannot fire without the flag" $+        withStdin stuck $+          testCLIFailed ["morph", "--locator=Q.@"] ["No entry of --symbolic answers the λ function 'Sym_arg_0'"]++      it "prints the residue with the stuck application intact and exits successfully" $+        withStdin stuck $+          testCLISucceeded+            ["morph", "--locator=Q.@", "--partial", "--flat", "--hide-rho"]+            ["⟦ λ ⤍ Sym_arg_0 ⟧.foo"]++    describe "a copy a 'defer' line of a join defers" $ do+      let joining = T.pack "- λ: L_fork\n  dataize:\n    𝛿1: $.c\n  morph:\n    𝑛1: $.a\n    𝑛2: $.b\n  defer:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  join:\n    on: 𝛿1\n    left: 𝑛3\n    right: 𝑛4\n"+          counting = T.pack "- λ: L_inc\n  dataize:\n    𝛿1: $.x\n  𝑛: Φ.num( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )\n"+          recordedWith :: T.Text -> [String] -> String -> IO [String]+          recordedWith entries options program =+            withTempFile "protocolXXXXXX.xml" $ \(path, stream) -> do+              hClose stream+              withLambdasOf entries $ \joins ->+                withStdin program $+                  testCLISucceeded (["dataize", "--symbolic=" ++ joins, "--locator=Q.y", "--protocol=" ++ path, "--quiet", "--sweet", "--hide-rho"] ++ options) []+              lines <$> readProtocol path+          deferred :: [String] -> String -> IO [String]+          deferred = recordedWith joining+      it "writes the copy it deferred to the XML protocol as a call of the object it was made of" $ do+        records <- deferred [] "⟦ step(tup) ↦ ⟦ φ ↦ tup.next ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.step( tup ↦ Φ.items.tail ), λ ⤍ L_fork ⟧ ⟧"+        records+          `shouldBe` [ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+                     , "<dataize at=\"Φ.y\">"+                     , "  <evaluate λ=\"L_fork\" by=\"dataize\" at=\"Φ.y\">"+                     , "    <dataize at=\"ξ.c\">"+                     , "      <manufactured meta=\"𝛿·1·1\">𝜎2</manufactured>"+                     , "    </dataize>"+                     , "    <bound meta=\"𝛿1·1\">𝛿·1·1</bound>"+                     , "    <morph at=\"ξ.a\">"+                     , "      <morphed meta=\"𝑛·1·1\">01-</morphed>"+                     , "    </morph>"+                     , "    <bound meta=\"𝑛1·1\">01-</bound>"+                     , "    <morph at=\"ξ.b\">"+                     , "      <remembered meta=\"𝑛·1·2\" as=\"Φ.step\"/>"+                     , "      <applied meta=\"𝑛·1·3\" by=\"morph\" at=\"ξ.b\" of=\"Φ.step\"><ref attr=\"tup\">Φ.items.tail</ref></applied>"+                     , "      <formed meta=\"𝑛·1·4\" of=\"Φ.step\"><ref attr=\"tup\">Φ.items.tail</ref></formed>"+                     , "      <applied meta=\"𝑒·1·1\" of=\"𝑛·1·2\"><ref attr=\"tup\">Φ.items.tail</ref></applied>"+                     , "      <remembered of=\"𝑛·1·4\" as=\"𝑒·1·1\"/>"+                     , "      <morphed meta=\"𝑛·1·5\">𝑛·1·4</morphed>"+                     , "    </morph>"+                     , "    <bound meta=\"𝑛2·1\">𝑛·1·5</bound>"+                     , "    <recalled of=\"𝑛·1·4\" as=\"𝑒·1·1\"/>"+                     , "    <recalled of=\"𝑛·1·2\" as=\"Φ.step\"/>"+                     , "    <deferred symbol=\"𝜎3\" by=\"morph\" at=\"𝑛2.φ\" of=\"Φ.step\"><with><symbol attr=\"tup\">𝜎1</symbol></with></deferred>"+                     , "    <assumed symbol=\"𝜎3\" as=\"01-\"/>"+                     , "    <answered meta=\"𝑛·1·6\">01-</answered>"+                     , "    <evaluated meta=\"𝑛·1·7\" of=\"Φ.y\">01-</evaluated>"+                     , "  </evaluate>"+                     , "  <dataized meta=\"𝛿·0·1\">01-</dataized>"+                     , "</dataize>"+                     ]++      it "names the object a deferred copy was made of through the formation its ρ holds" $ do+        records <- deferred [] "⟦ joined(items) ↦ ⟦ φ ↦ step( tup ↦ items ), step(ρ, tup) ↦ ⟦ φ ↦ tup.next ⟧ ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.joined( items ↦ Φ.items.tail ).φ, λ ⤍ L_fork ⟧ ⟧"+        records `shouldContain` ["    <deferred symbol=\"𝜎3\" by=\"morph\" at=\"𝑛2.φ\" of=\"Φ.joined.step\"><with><symbol attr=\"tup\">𝜎1</symbol></with></deferred>"]++      it "names an argument of a deferred copy that is no bare symbol by the meta its morph bound, though an element formed it" $ do+        records <- deferred [] "⟦ box(x, w) ↦ ⟦ φ ↦ x.next ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.box( x ↦ Φ.items.tail, w ↦ ⟦ z ↦ Φ ⟧ ), λ ⤍ L_fork ⟧ ⟧"+        records `shouldContain` ["    <deferred symbol=\"𝜎3\" by=\"morph\" at=\"𝑛2.φ\" of=\"Φ.box\"><with><symbol attr=\"x\">𝜎1</symbol><meta attr=\"w\">𝑛·1·8</meta></with></deferred>"]++      it "names a deferred copy of a formation the world does not declare by the element that formed it" $ do+        records <- deferred [] "⟦ wrap(v) ↦ ⟦⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.wrap( v ↦ ⟦ inner(x) ↦ ⟦ φ ↦ x.next ⟧ ⟧ ).v.inner( x ↦ Φ.items.tail ), λ ⤍ L_fork ⟧ ⟧"+        records `shouldContain` ["    <formed meta=\"𝑒·1·3\"><symbol attr=\"x\">𝜎1</symbol><ref attr=\"φ\">x.next</ref></formed>", "    <deferred symbol=\"𝜎3\" by=\"morph\" at=\"𝑛2.φ\" of=\"𝑒·1·3\"/>"]++      it "names an argument of a deferred copy by the object its morph answered" $ do+        records <- recordedWith (joining <> counting) [] "⟦ box(x, w) ↦ ⟦ φ ↦ x.next ⟧, num(φ) ↦ ⟦⟧, inc(x) ↦ ⟦ λ ⤍ L_inc ⟧, items ↦ ⟦ tail ↦ ⟦ λ ⤍ 𝜎1 ⟧ ⟧, y ↦ ⟦ c ↦ ⟦ λ ⤍ 𝜎2 ⟧, a ↦ ⟦ Δ ⤍ 01- ⟧, b ↦ Φ.box( x ↦ Φ.items.tail, w ↦ Φ.inc( x ↦ ⟦ Δ ⤍ 2A- ⟧ ) ), λ ⤍ L_fork ⟧ ⟧"+        filter (isInfixOf "<deferred") records `shouldBe` ["    <deferred symbol=\"𝜎4\" by=\"morph\" at=\"𝑛2.φ\" of=\"Φ.box\"><with><symbol attr=\"x\">𝜎1</symbol><meta attr=\"w\">𝑛·2·7</meta></with></deferred>"]++    describe "--acyclic=plausible" $ do+      let twins = "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], pair(a, b) -> [[ L> L_pair ]], t -> Φ.pair( a -> 7.plus( x -> 5.plus( x -> 6 ) ), b -> 7.plus( x -> 5.plus( x -> 6 ) ) ).φ ]]"+          pairs = T.pack "- λ: L_number_plus\n  dataize:\n    𝛿1: $.ρ\n    𝛿2: $.x\n  𝑛: Φ.number( φ ↦ ⟦ λ ⤍ 𝜎 ⟧ )\n- λ: L_pair\n  morph:\n    𝑛1: $.a\n    𝑛2: $.b\n  evaluate:\n    𝑛3: 𝑛1\n    𝑛4: 𝑛2\n  𝑛: ⟦ φ ↦ ⟦ a ↦ 𝑛3, b ↦ 𝑛4 ⟧ ⟧\n"+          recorded :: String -> IO [String]+          recorded mode =+            withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+              hClose stream+              withLambdasOf pairs $ \file ->+                withStdin twins $+                  testCLISucceeded+                    ["morph", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=" ++ mode, "--minutes=" ++ path, "--quiet"]+                    []+              lines <$> readProtocol path+      it "charges a formation once per argument spelling it under proven" $+        withLambdasOf pairs $ \file ->+          withStdin twins $+            testCLIFailed+              ["morph", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=proven", "--max-firings=4"]+              ["[ERROR]: Evaluation did not finish before reaching the limit of firings: --max-firings=4"]++      it "charges a firing the memo answers under plausible" $+        withLambdasOf pairs $ \file ->+          withStdin twins $+            testCLIFailed+              ["morph", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-firings=3"]+              ["[ERROR]: Evaluation did not finish before reaching the limit of firings: --max-firings=3"]++      it "answers every firing within the budget under plausible" $+        withLambdasOf pairs $ \file ->+          withStdin twins $+            testCLISucceeded+              ["morph", "--symbolic=" ++ file, "--locator=Q.t", "--acyclic=plausible", "--max-firings=4", "--flat", "--hide-rho", "--sweet"]+              ["b ↦ ⟦ φ ↦ 𝜎2:λ, plus(x) ↦ L_number_plus:λ ⟧"]++      it "reduces the operands of a formation once per argument spelling it under proven" $+        recorded "proven" >>= (`shouldSatisfy` ((== 4) . length . filter (isInfixOf "𝛿1·")))++      it "reduces the operands of a formation once for the run under plausible" $+        recorded "plausible" >>= (`shouldSatisfy` ((== 2) . length . filter (isInfixOf "𝛿1·")))++      it "writes a recalled firing at its own site under plausible" $+        recorded "plausible" >>= (`shouldSatisfy` ((== 3) . length . filter (isInfixOf "𝔼(L_number_plus)")))++      it "answers a recalled firing with the line of the first under plausible" $+        recorded "plausible" >>= (`shouldContain` ["      𝑛·4·1 ≔ 𝑛·2·21  # 𝑛 of L_number_plus"])++      it "dataizes to the same datum under plausible" $+        withStdin chained $+          testCLISucceeded+            ["dataize", symbolic, "--acyclic=plausible", "--locator=Q.@"]+            ["40-45-00-00-00-00-00-00"]++    describe "--acyclic=proven" $ do+      let looping = "⟦ x ↦ ⟦ λ ⤍ L_loop ⟧.foo ⟧"+      it "spends the whole budget and fails on the limit without the flag" $+        loopingLambdas $ \endless ->+          withStdin looping $+            testCLIFailed+              ["morph", "--symbolic=" ++ endless, "--locator=Q.x", "--max-steps=40"]+              ["[ERROR]: Morphing did not finish before reaching the limit of steps: --max-steps=40"]++      it "answers the looping dispatch with a symbol and exits successfully with the flag" $+        loopingLambdas $ \endless ->+          withStdin looping $+            testCLISucceeded+              ["morph", "--symbolic=" ++ endless, "--locator=Q.x", "--acyclic=proven", "--max-steps=4000", "--flat", "--hide-rho"]+              ["⟦ λ ⤍ 𝜎1 ⟧"]++      it "answers a terminating program the same way with the flag" $+        withStdin chained $+          testCLISucceeded+            ["morph", symbolic, "--acyclic=proven", "--locator=Q.@", "--sweet", "--hide-rho", "--flat"]+            ["⟦ x ↦ 7.0, λ ⤍ L_number_plus ⟧"]++    describe "--max-loops" $ do+      it "fires a looping λ function once more with --max-loops=1" $+        loopingLambdas $ \endless ->+          withTempFile "protocolXXXXXX.txt" $ \(path, stream) -> do+            hClose stream+            withStdin "⟦ x ↦ ⟦ λ ⤍ L_loop ⟧.foo ⟧" $+              testCLISucceeded+                ["morph", "--symbolic=" ++ endless, "--locator=Q.x", "--acyclic=proven", "--max-loops=1", "--minutes=" ++ path, "--quiet"]+                []+            records <- readProtocol path+            length (filter (isInfixOf "𝔼(L_loop)") (lines records)) `shouldBe` 2++      it "refuses the flag without --acyclic" $+        withStdin "⟦ x ↦ ⟦ λ ⤍ L_loop ⟧.foo ⟧" $+          testCLIFailed ["morph", "--locator=Q.x", "--max-loops=3"] ["The option --max-loops requires --acyclic, since only --acyclic cuts a loop"]++    it "prints a top formation of several bindings as XMIR" $+      withStdin "[[ x -> [[ D> 01- ]], y -> [[ D> 02- ]] ]]" $+        testCLISucceeded+          ["morph", "--output=xmir"]+          ["<o name=\"x\">01-</o>", "<o name=\"y\">02-</o>"]++    describe "fails" $ do+      it "with --output != latex and --nonumber" $+        withStdin "" $+          testCLIFailed+            ["morph", "--nonumber", "--output=xmir"]+            ["The --nonumber option can stay together with --output=latex only"]++      it "with --show used more than once" $+        withStdin "" $+          testCLIFailed+            ["morph", "--show=Q.a", "--show=Q.b"]+            ["The option --show can be used only once"]++      it "with wrong --locator option" $+        withStdin "" $+          testCLIFailed+            ["morph", "--locator=Q.x(k -> Q.y)"]+            ["[ERROR]:", "Only dispatch expression started with Φ (or Q) can be used in --locator"]++  describe "explain" $ do+    forM_+      ["--morph", "--dataize", "--contextualize"]+      ( \judgment ->+          it ("refuses --normalize together with " ++ judgment) $+            testCLIFailed ["explain", judgment, "--normalize"] ["The --normalize option cannot be used together with"]+      )++    it "prints help" $+      testCLISucceeded+        ["explain", "--help"]+        ["Explain built-in morphing rules", "Explain built-in dataization rules", "Explain built-in contextualization rules"]++    it "explains single rule" $ do+      latex <- explainPack "test-resources/explain-packs/normalize/copy.yaml"+      testCLISucceeded ["explain", "--rule=resources/normalize/copy.yaml"] [latex <> "\n"]++    it "explains single rule with a label" $+      testCLISucceeded+        ["explain", rule "labeled.yaml"]+        [ unlines+            [ "\\phinoNormalizationRule[\\lambda]{copy}"+            , "  { [[ B_1, \\tau -> ?, B_2 ]] ( \\tau -> k ) }"+            , "  { [[ B_1, \\tau -> k, B_2 ]] }"+            , "  { }"+            , "  { }"+            ]+        ]++    it "explains multiple rules" $+      testCLISucceeded+        ["explain", "--rule=resources/normalize/copy.yaml", "--rule=resources/normalize/stay.yaml"]+        ["\\phinoNormalizationRule{copy}", "\\phinoNormalizationRule{stay}"]++    it "reproduces the same shuffle order for the same --seed" $ do+      let args =+            [ "explain"+            , "--shuffle"+            , "--seed=42"+            , rule "swap-a.yaml"+            , rule "swap-b.yaml"+            ]+      (firstRun, _) <- withStdout (runCLI args)+      (secondRun, _) <- withStdout (runCLI args)+      firstRun `shouldBe` secondRun++    it "shuffles the normalization rules away from their file order" $ do+      (plain, _) <- withStdout (runCLI ["explain", "--normalize"])+      (mixed, _) <- withStdout (runCLI ["explain", "--normalize", "--shuffle", "--seed=1"])+      mixed `shouldNotBe` plain++    it "accepts --seed flag" $+      testCLISucceeded+        ["explain", "--seed=7", "--normalize"]+        ["\\phinoNormalizationRule{copy}"]++    forM_+      [ ("normalization", "--normalize", "normalize")+      , ("morphing", "--morph", "morphing")+      , ("dataization", "--dataize", "dataization")+      , ("contextualization", "--contextualize", "contextualization")+      ]+      ( \(judgment, option, dir) -> it ("explains " <> judgment <> " rules") $ do+          packs <- allPathsIn ("test-resources/explain-packs" </> dir)+          latex <- mapM explainPack (sort packs)+          testCLISucceeded ["explain", option] [unlines latex]+      )++    it "fails with no rules specified" $+      testCLIFailed+        ["explain"]+        ["Either --rule, --normalize, --morph, --dataize or --contextualize must be specified"]++    it "fails when more than one rule set is specified" $+      testCLIFailed+        ["explain", "--morph", "--dataize"]+        ["Only one of --morph, --dataize or --contextualize can be specified"]++    it "allows --normalize together with --rule" $+      testCLISucceeded+        ["explain", "--normalize", "--rule=resources/normalize/copy.yaml"]+        ["\\phinoNormalizationRule{copy}"]++    it "allows --shuffle together with --morph" $+      testCLISucceeded+        ["explain", "--morph", "--shuffle"]+        ["\\begin{phinoMorphingInference}"]++    it "writes to target file" $+      bracket+        ( do+            tmp <- getTemporaryDirectory+            stamp <- getPOSIXTime+            let dir = tmp </> ("phino-test-" ++ show (floor stamp :: Integer))+            createDirectoryIfMissing True dir+            pure (dir </> "explain.tex", dir)+        )+        (\(_, dir) -> removeDirectoryRecursive dir)+        ( \(path, _) -> do+            testCLISucceeded ["explain", "--normalize", printf "--target=%s" path] []+            content <- readFile path+            _ <- evaluate (length content)+            content `shouldContain` "\\phinoNormalizationRule{copy}"         )    describe "merge" $ do
test/CSTSpec.hs view
@@ -82,7 +82,7 @@     let number = BaseObject "number"         again = ExPhiAgain Nothing 1         bts = BaseObject "bytes"-        bt = ArAlpha (Alpha 0)+        bt = ArTau AtPhi         app = ExApplication         form = ExFormation [BiDelta (BtMany ["40", "18", "00", "00", "00", "00", "00", "00"])]         isCSTNumber (EX_NUMBER{}) = True@@ -289,7 +289,7 @@       "dispatch on Xi becomes a bare attribute"       (expressionToCST (ExDispatch ExXi (AtLabel "foo")) `shouldBe` EX_ATTR (AT_LABEL "foo")) -  describe "expressionToCST on non-primitive applications" $ do+  describe "expressionToCST on non-primitive applications" $     it       "an application with only named (tau) arguments and no primitive base"       ( expressionToCST@@ -299,15 +299,6 @@           )           `shouldSatisfy` isApplicationWithTaus       )-    it-      "an application with positional (alpha) arguments and no primitive base"-      ( expressionToCST-          ( ExApplication-              (ExApplication (ExDispatch ExRoot (AtLabel "bar")) (ArAlpha (Alpha 0) ExRoot))-              (ArAlpha (Alpha 1) ExXi)-          )-          `shouldSatisfy` isApplicationWithExprs-      )    describe "conditionToCST on every Y.Condition constructor" $ do     let voidYBinding :: BINDING@@ -378,17 +369,11 @@    describe "numberToCST on every Y.Number constructor" $     forM_-      [ ("MetaIndex", Y.MetaIndex "i1", IDX_META (META NO_EXCL I "1"))-      ,+      [         ( "Length"         , Y.Length (BiVoid (AtLabel "y"))         , LENGTH (BI_PAIR (PA_VOID (AT_LABEL "y") ARROW EMPTY) (BDS_EMPTY (TAB 0)) (TAB 0))         )-      ,-        ( "Domain"-        , Y.Domain (BiVoid (AtLabel "y"))-        , DOMAIN (BI_PAIR (PA_VOID (AT_LABEL "y") ARROW EMPTY) (BDS_EMPTY (TAB 0)) (TAB 0))-        )       , ("Literal", Y.Literal 5, LITERAL 5)       ]       (\(desc, number, expected) -> it desc (numberToCST number `shouldBe` expected))@@ -479,30 +464,12 @@       shouldShowAndEqSelf "TAB'" TAB'       shouldShowAndEqSelf "NO_TAB" NO_TAB -  describe "ALPHA field accessors" $-    it "exposes every ALPHA field via its accessor" $ do-      let idxAlpha = AL_IDX{sym = ALPHA, idx = 2}-          metaAlpha = AL_META{sym = ALPHA', meta = META EXCL TAU "x"}-      case idxAlpha of-        actual@AL_IDX{} -> do-          actual.sym `shouldBe` ALPHA-          actual.idx `shouldBe` 2-        _ -> expectationFailure "Expected AL_IDX"-      case metaAlpha of-        actual@AL_META{} -> do-          actual.sym `shouldBe` ALPHA'-          actual.meta `shouldBe` META EXCL TAU "x"-        _ -> expectationFailure "Expected AL_META"-      shouldShowAndEqSelf "AL_IDX" idxAlpha-      shouldShowAndEqSelf "AL_META" metaAlpha-   describe "PAIR field accessors" $     it "exposes every PAIR constructor's fields via their accessors" $ do       let attrLabel = AT_LABEL "x"           exprGlobal = EX_GLOBAL Φ           metaVal = META EXCL TAU "x"           pairTau = PA_TAU{attr = attrLabel, arrow = ARROW, expr = exprGlobal}-          pairAlpha = PA_ALPHA{alpha = AL_IDX ALPHA 0, arrow = ARROW, expr = exprGlobal}           pairFormation = PA_FORMATION{attr = attrLabel, voids = [AT_RHO RHO], arrow = ARROW, expr = exprGlobal}           pairVoid = PA_VOID{attr = attrLabel, arrow = ARROW, void = EMPTY}           pairLambda = PA_LAMBDA{func = "fn"}@@ -519,12 +486,6 @@           actual.arrow `shouldBe` ARROW           actual.expr `shouldBe` exprGlobal         _ -> expectationFailure "Expected PA_TAU"-      case pairAlpha of-        actual@PA_ALPHA{} -> do-          actual.alpha `shouldBe` AL_IDX ALPHA 0-          actual.arrow `shouldBe` ARROW-          actual.expr `shouldBe` exprGlobal-        _ -> expectationFailure "Expected PA_ALPHA"       case pairFormation of         actual@PA_FORMATION{} -> do           actual.attr `shouldBe` attrLabel@@ -571,7 +532,6 @@           actual.meta `shouldBe` metaVal         _ -> expectationFailure "Expected PA_META_DELTA'"       shouldShowAndEqSelf "PA_TAU" pairTau-      shouldShowAndEqSelf "PA_ALPHA" pairAlpha       shouldShowAndEqSelf "PA_FORMATION" pairFormation       shouldShowAndEqSelf "PA_VOID" pairVoid       shouldShowAndEqSelf "PA_LAMBDA" pairLambda@@ -636,42 +596,18 @@       shouldShowAndEqSelf "BDS_PAIR" bdsPair       shouldShowAndEqSelf "BDS_META" bdsMeta -  describe "APP_ARG field accessors" $-    it "exposes every APP_ARG field via its accessor" $ do-      let exprGlobal = EX_GLOBAL Φ-          appArgsEmpty = AAS_EMPTY-          appArg = APP_ARG{expr = exprGlobal, args = appArgsEmpty}-      appArg.expr `shouldBe` exprGlobal-      appArg.args `shouldBe` appArgsEmpty-      shouldShowAndEqSelf "APP_ARG" appArg--  describe "APP_ARGS field accessors" $-    it "exposes every APP_ARGS constructor's fields via their accessors" $ do-      let exprGlobal = EX_GLOBAL Φ-          appArgsEmpty = AAS_EMPTY-          appArgsExpr = AAS_EXPR{eol = EOL, tab = TAB 1, expr = exprGlobal, args = appArgsEmpty}-      case appArgsExpr of-        actual@AAS_EXPR{} -> do-          actual.eol `shouldBe` EOL-          actual.tab `shouldBe` TAB 1-          actual.expr `shouldBe` exprGlobal-          actual.args `shouldBe` appArgsEmpty-        _ -> expectationFailure "Expected AAS_EXPR"-      shouldShowAndEqSelf "AAS_EXPR" appArgsExpr-   describe "APP_ARGUMENT derived instances" $     it "derives Eq and Show for every APP_ARGUMENT constructor" $ do       let pairTau = PA_TAU{attr = AT_LABEL "x", arrow = ARROW, expr = EX_GLOBAL Φ}       shouldShowAndEqSelf "AA_TAU" (AA_TAU (APP_BINDING pairTau))       shouldShowAndEqSelf "AA_TAUS" (AA_TAUS (BI_EMPTY (TAB 0)))-      shouldShowAndEqSelf "AA_EXPRS" (AA_EXPRS (APP_ARG (EX_GLOBAL Φ) AAS_EMPTY))    describe "EXPRESSION field accessors" $     it "exposes every EXPRESSION constructor's fields via their accessors" $ do       let attrLabel = AT_LABEL "x"           bindingEmpty = BI_EMPTY{tab = TAB 1}           metaVal = META EXCL TAU "x"-          argumentVal = AA_EXPRS (APP_ARG (EX_GLOBAL Φ) AAS_EMPTY)+          argumentVal = AA_TAUS (BI_PAIR (PA_TAU (AT_LABEL "k") ARROW (EX_GLOBAL Φ)) (BDS_EMPTY (TAB 0)) (TAB 0))           exGlobal = EX_GLOBAL{global = Φ}           exXi = EX_XI{xi = XI}           exAttr = EX_ATTR{attr = attrLabel}@@ -875,15 +811,9 @@    describe "NUMBER field accessors" $     it "exposes every NUMBER constructor's fields via their accessors" $ do-      let metaVal = META EXCL TAU "x"-          bindingEmpty = BI_EMPTY{tab = TAB 0}-          idxMeta = IDX_META{meta = metaVal}+      let bindingEmpty = BI_EMPTY{tab = TAB 0}           lengthVal = LENGTH{binding = bindingEmpty}           literalVal = LITERAL{num = 5}-      case idxMeta of-        actual@IDX_META{} ->-          actual.meta `shouldBe` metaVal-        _ -> expectationFailure "Expected IDX_META"       case lengthVal of         actual@LENGTH{} ->           actual.binding `shouldBe` bindingEmpty@@ -892,7 +822,6 @@         actual@LITERAL{} ->           actual.num `shouldBe` 5         _ -> expectationFailure "Expected LITERAL"-      shouldShowAndEqSelf "IDX_META" idxMeta       shouldShowAndEqSelf "LENGTH" lengthVal       shouldShowAndEqSelf "LITERAL" literalVal @@ -1029,6 +958,3 @@     isApplicationWithTaus :: EXPRESSION -> Bool     isApplicationWithTaus EX_APPLICATION{argument = AA_TAUS{}} = True     isApplicationWithTaus _ = False-    isApplicationWithExprs :: EXPRESSION -> Bool-    isApplicationWithExprs EX_APPLICATION{argument = AA_EXPRS{}} = True-    isApplicationWithExprs _ = False
test/CanonizerSpec.hs view
@@ -79,11 +79,6 @@         , ExDispatch (ExFormation [BiLambda (Function "Fn1")]) (AtLabel "attr")         )       ,-        ( "recurses through ExApplication's alpha argument"-        , ExApplication ExRoot (ArAlpha (Alpha 0) (ExFormation [BiLambda (Function "Wrapped")]))-        , ExApplication ExRoot (ArAlpha (Alpha 0) (ExFormation [BiLambda (Function "Fn1")]))-        )-      ,         ( "recurses through ExPhiMeet"         , ExPhiMeet (Just "p") 1 (ExFormation [BiLambda (Function "Meet")])         , ExPhiMeet (Just "p") 1 (ExFormation [BiLambda (Function "Fn1")])
test/CompiledSpec.hs view
@@ -107,7 +107,7 @@     term metas seed = fst (grown metas (4 :: Int) (mkStdGen seed))     grown :: Bool -> Int -> StdGen -> (Expression, StdGen)     grown metas depth gen =-      let (pick, gen') = randomR (0, if depth == 0 then 3 else 9 :: Int) gen+      let (pick, gen') = randomR (0, if depth == 0 then 3 else 8 :: Int) gen        in case pick of             0 -> (ExXi, gen')             1 -> (ExRoot, gen')@@ -124,11 +124,6 @@                   (attr, gen''') = attribute gen''                   (arg, gen'''') = grown metas (depth - 1) gen'''                in (ExApplication expr (ArTau attr arg), gen'''')-            8 ->-              let (expr, gen'') = grown metas (depth - 1) gen'-                  (idx, gen''') = randomR (0, 2) gen''-                  (arg, gen'''') = grown metas (depth - 1) gen'''-               in (ExApplication expr (ArAlpha (Alpha idx) arg), gen'''')             _ -> formation metas depth gen'     formation :: Bool -> Int -> StdGen -> (Expression, StdGen)     formation metas depth gen =
test/ConditionSpec.hs view
@@ -21,8 +21,8 @@       [ "in (!t, !B)"       , " not   (in (!t1,   !B))   "       , "eq(1, 1)"-      , "gt(domain(!B), !i)"-      , "or(eq(!i,1),eq(length(!B),-2),eq(!e1,!e2),eq(!t1,x),eq(Q.org.eolang,[[ x -> 2 ]]))"+      , "gt(length(!B), 1)"+      , "or(eq(1,1),eq(length(!B),-2),eq(!e1,!e2),eq(!t1,x),eq(Q.org.eolang,[[ x -> 2 ]]))"       , "nf([[ x -> !e ]].x)"       , "absolute(!e1)"       , "matches(\"hello(\\\"\\u0000)\", !e)"@@ -36,9 +36,8 @@       [ ("in(!t1, !B1)", Y.In [AtMeta "t1"] [BiMeta "B1"])       , ("not(in(!t1,!B1))", Y.Not (Y.In [AtMeta "t1"] [BiMeta "B1"]))       , ("eq(1,-2)", Y.Eq (Y.CmpNum (Y.Literal 1)) (Y.CmpNum (Y.Literal (-2))))-      , ("eq(!i1,length(!B1))", Y.Eq (Y.CmpNum (Y.MetaIndex "i1")) (Y.CmpNum (Y.Length (BiMeta "B1"))))-      , ("eq(!i2,domain(!B1))", Y.Eq (Y.CmpNum (Y.MetaIndex "i2")) (Y.CmpNum (Y.Domain (BiMeta "B1"))))-      , ("gt(domain(!B1),!i1)", Y.Gt (Y.CmpNum (Y.Domain (BiMeta "B1"))) (Y.CmpNum (Y.MetaIndex "i1")))+      , ("eq(2,length(!B1))", Y.Eq (Y.CmpNum (Y.Literal 2)) (Y.CmpNum (Y.Length (BiMeta "B1"))))+      , ("gt(length(!B1),1)", Y.Gt (Y.CmpNum (Y.Length (BiMeta "B1"))) (Y.CmpNum (Y.Literal 1)))       , ("or(absolute(!e1), nf(Q.x))", Y.Or [Y.Absolute (ExMeta "e1"), Y.NF (ExDispatch ExRoot (AtLabel "x"))])       , ("and(matches(\"hi\", !e1),part-of(!e1, !B1))", Y.And [Y.Matches "hi" (ExMeta "e1"), Y.PartOf (ExMeta "e1") (BiMeta "B1")])       , ("not(formation(!n1))", Y.Not (Y.IsFormation (ExMeta "n1")))@@ -54,6 +53,10 @@       , "in(!t, !t)"       , "or(or(), or())"       , "eq(!t1, !e2)"+      , "eq(!i1, 1)"+      , "gt(length(!B), 𝑖1)"+      , "eq(3, domain(!B))"+      , "gt(domain(!B), 1)"       ]       (\expr -> it expr (parseCondition expr `shouldSatisfy` isLeft)) 
test/ContextualizeSpec.hs view
@@ -40,12 +40,6 @@             , commonContext             , ExApplication commonContext (ArTau (AtLabel "x") commonContext)             )-          ,-            ( "recurses into both sides of an application with an alpha argument"-            , ExApplication ExXi (ArAlpha (Alpha 0) ExXi)-            , commonContext-            , ExApplication commonContext (ArAlpha (Alpha 0) commonContext)-            )           ]           (\(desc, expr, context, expected) -> it desc (contextualize expr context `shouldReturn` expected))   describe "contextualize a term no rule matches" $ do
test/DataizeSpec.hs view
@@ -201,16 +201,16 @@   describe "partially evaluates around a λ function that cannot fire (--partial)" $ do     let placeholder = ExFormation [BiLambda (Function "Sym_arg_0")]     it "fails on it without the flag, naming the λ function" $ do-      expr <- parseExpressionThrows (primitives "2.times(3).nope")+      expr <- parseExpressionThrows (primitives "2.times(x -> 3).nope")       (dataize expr emptyState . withLambdas known =<< defaultReduceContext ExRoot)         `shouldThrow` (\e -> "No entry of --symbolic answers the λ function 'L_number_nope'" `isInfixOf` show (e :: SomeException))     it "leaves the application of the unanswered λ function in place" $ do-      ((outcome, _), _) <- partially known "2.times(3).nope"+      ((outcome, _), _) <- partially known "2.times(x -> 3).nope"       case outcome of         Residual (ExFormation bds) -> bds `shouldContain` [BiLambda (Function "L_number_nope")]         other -> expectationFailure ("expected a residual formation, got " ++ show other)     it "keeps what was evaluated before the stuck site in the residue" $ do-      ((outcome, _), _) <- partially known "2.times(3).nope"+      ((outcome, _), _) <- partially known "2.times(x -> 3).nope"       case outcome of         Residual (ExFormation bds) -> do           let rho = [value | BiTau AtRho value <- bds]@@ -218,87 +218,87 @@           [() | ExApplication (ExDispatch ExRoot (AtLabel "number")) (ArTau AtPhi _) <- rho] `shouldBe` [()]         other -> expectationFailure ("expected a residual formation, got " ++ show other)     it "writes the firing that answered into the protocol and stops at the stuck one" $ do-      (_, protocol) <- partially known "2.times(3).nope"+      (_, protocol) <- partially known "2.times(x -> 3).nope"       protocol         `shouldBe` unlines           [ "  𝔻(Φ):"-          , "    boxed 𝑛·0·1 := Φ.φ"-          , "    normalized 𝑛·0·2 := 2.0.times( 3.0 ).nope( ρ ↦ Φ )  # Φ.φ"+          , "    boxed 𝑛·0·1 ≔ Φ.φ"+          , "    normalized 𝑛·0·2 ≔ 2.0.times( x ↦ 3.0 ).nope( ρ ↦ Φ )  # Φ.φ"           , "    𝕄(𝑛·0·1):"-          , "      normalized 𝑛·0·3 := ⟦ φ ↦ ∅, as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧  # Φ.number"-          , "      𝑛·0·4 := 2.0"-          , "      𝑛·0·5 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧"-          , "      normalized 𝑛·0·6 := ⟦ ρ ↦ 𝑛·0·4, x ↦ ∅, λ ⤍ L_number_times ⟧  # 𝑛·0·5.times"-          , "      𝑛·0·7 := 𝑛·0·4.times( x ↦ 3.0 )"-          , "      𝑛·0·8 := ⟦ ρ ↦ 𝑛·0·4, x ↦ 3.0, λ ⤍ L_number_times ⟧"+          , "      normalized 𝑛·0·3 ≔ ⟦ φ ↦ ∅, as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( b ↦ x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧  # Φ.number"+          , "      𝑛·0·4 ≔ 2.0"+          , "      𝑛·0·5 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( b ↦ x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧"+          , "      normalized 𝑛·0·6 ≔ ⟦ ρ ↦ 𝑛·0·4, x ↦ ∅, λ ⤍ L_number_times ⟧  # 𝑛·0·5.times"+          , "      𝑛·0·7 ≔ 𝑛·0·4.times( x ↦ 3.0 )"+          , "      𝑛·0·8 ≔ ⟦ ρ ↦ 𝑛·0·4, x ↦ 3.0, λ ⤍ L_number_times ⟧"           , "      𝔼(L_number_times):"           , "        𝔻(ξ.ρ):"           , "          𝕄(ξ.ρ):"-          , "            𝑛·1·1 := 2.0"-          , "            𝑛·1·2 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧"-          , "            morphed 𝑛·1·3 := 𝑛·1·2"-          , "          boxed 𝑛·1·4 := 𝑛·1·3.φ"-          , "          normalized 𝑛·1·5 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ, ρ ↦ 𝑛·1·1 )  # 𝑛·1·4"+          , "            𝑛·1·1 ≔ 2.0"+          , "            𝑛·1·2 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ ), as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( b ↦ x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧"+          , "            morphed 𝑛·1·3 ≔ 𝑛·1·2"+          , "          boxed 𝑛·1·4 ≔ 𝑛·1·3.φ"+          , "          normalized 𝑛·1·5 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ, ρ ↦ 𝑛·1·1 )  # 𝑛·1·4"           , "          𝕄(𝑛·1·4):"-          , "            normalized 𝑛·1·6 := ⟦ φ ↦ ∅, not(ρ) ↦ L_bytes_not:λ, eq(ρ, b) ↦ L_bytes_eq:λ ⟧  # Φ.bytes"-          , "            𝑛·1·7 := Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )"-          , "            𝑛·1·8 := ⟦ φ ↦ 40-00-00-00-00-00-00-00:Δ, not(ρ) ↦ L_bytes_not:λ, eq(ρ, b) ↦ L_bytes_eq:λ ⟧"-          , "            morphed 𝑛·1·9 := 𝑛·1·8"-          , "          boxed 𝑛·1·10 := 𝑛·1·9.φ"-          , "          normalized 𝑛·1·11 := 40-00-00-00-00-00-00-00:Δ  # 𝑛·1·10"-          , "          𝛿·1·1 := 40-00-00-00-00-00-00-00  # 2.0"-          , "        𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.ρ)"+          , "            normalized 𝑛·1·6 ≔ ⟦ φ ↦ ∅, not(ρ) ↦ L_bytes_not:λ, eq(ρ, b) ↦ L_bytes_eq:λ ⟧  # Φ.bytes"+          , "            𝑛·1·7 ≔ Φ.bytes( φ ↦ 40-00-00-00-00-00-00-00:Δ )"+          , "            𝑛·1·8 ≔ ⟦ φ ↦ 40-00-00-00-00-00-00-00:Δ, not(ρ) ↦ L_bytes_not:λ, eq(ρ, b) ↦ L_bytes_eq:λ ⟧"+          , "            morphed 𝑛·1·9 ≔ 𝑛·1·8"+          , "          boxed 𝑛·1·10 ≔ 𝑛·1·9.φ"+          , "          normalized 𝑛·1·11 ≔ 40-00-00-00-00-00-00-00:Δ  # 𝑛·1·10"+          , "          𝛿·1·1 ≔ 40-00-00-00-00-00-00-00  # 2.0"+          , "        𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.ρ)"           , "        𝔻(ξ.x):"           , "          𝕄(ξ.x):"-          , "            𝑛·1·12 := 3.0"-          , "            𝑛·1·13 := ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧"-          , "            morphed 𝑛·1·14 := 𝑛·1·13"-          , "          boxed 𝑛·1·15 := 𝑛·1·14.φ"-          , "          normalized 𝑛·1·16 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ, ρ ↦ 𝑛·1·12 )  # 𝑛·1·15"+          , "            𝑛·1·12 ≔ 3.0"+          , "            𝑛·1·13 ≔ ⟦ φ ↦ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ ), as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( b ↦ x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧"+          , "            morphed 𝑛·1·14 ≔ 𝑛·1·13"+          , "          boxed 𝑛·1·15 ≔ 𝑛·1·14.φ"+          , "          normalized 𝑛·1·16 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ, ρ ↦ 𝑛·1·12 )  # 𝑛·1·15"           , "          𝕄(𝑛·1·15):"-          , "            𝑛·1·17 := Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )"-          , "            𝑛·1·18 := ⟦ φ ↦ 40-08-00-00-00-00-00-00:Δ, not(ρ) ↦ L_bytes_not:λ, eq(ρ, b) ↦ L_bytes_eq:λ ⟧"-          , "            morphed 𝑛·1·19 := 𝑛·1·18"-          , "          boxed 𝑛·1·20 := 𝑛·1·19.φ"-          , "          normalized 𝑛·1·21 := 40-08-00-00-00-00-00-00:Δ  # 𝑛·1·20"-          , "          𝛿·1·2 := 40-08-00-00-00-00-00-00  # 3.0"-          , "        𝛿2·1 := 𝛿·1·2  # 𝔻(ξ.x)"-          , "        𝑛·1·22 := Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_times"+          , "            𝑛·1·17 ≔ Φ.bytes( φ ↦ 40-08-00-00-00-00-00-00:Δ )"+          , "            𝑛·1·18 ≔ ⟦ φ ↦ 40-08-00-00-00-00-00-00:Δ, not(ρ) ↦ L_bytes_not:λ, eq(ρ, b) ↦ L_bytes_eq:λ ⟧"+          , "            morphed 𝑛·1·19 ≔ 𝑛·1·18"+          , "          boxed 𝑛·1·20 ≔ 𝑛·1·19.φ"+          , "          normalized 𝑛·1·21 ≔ 40-08-00-00-00-00-00-00:Δ  # 𝑛·1·20"+          , "          𝛿·1·2 ≔ 40-08-00-00-00-00-00-00  # 3.0"+          , "        𝛿2·1 ≔ 𝛿·1·2  # 𝔻(ξ.x)"+          , "        𝑛·1·22 ≔ Φ.number( φ ↦ 𝜎1:λ )  # 𝑛 of L_number_times"           , "        𝕄(𝑛·1·22):"-          , "          𝑛·1·23 := Φ.number( φ ↦ 𝜎1:λ )"-          , "          𝑛·1·24 := ⟦ φ ↦ 𝜎1:λ, as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧"-          , "          morphed 𝑛·1·25 := 𝑛·1·24"-          , "        𝑛·1·26 := 𝑛·1·25  # 𝕄(𝑛·1·22)"-          , "        evaluated 𝑛·1·27 := 𝑛·1·26  # 𝑛·0·8"-          , "      normalized 𝑛·0·9 := ⟦ ρ ↦ 𝑛·1·23, λ ⤍ L_number_nope ⟧  # 𝑛·1·27.nope"-          , "      morphed 𝑛·0·10 := ⟦ ρ ↦ 𝑛·1·23, λ ⤍ L_number_nope ⟧"+          , "          𝑛·1·23 ≔ Φ.number( φ ↦ 𝜎1:λ )"+          , "          𝑛·1·24 ≔ ⟦ φ ↦ 𝜎1:λ, as-bytes ↦ φ, plus(ρ, x) ↦ L_number_plus:λ, times(ρ, x) ↦ L_number_times:λ, div(ρ, x) ↦ L_number_div:λ, gt(ρ, x) ↦ L_number_gt:λ, eq(ρ, x) ↦ ρ.as-bytes.eq( b ↦ x.as-bytes ):φ, nope(ρ) ↦ L_number_nope:λ ⟧"+          , "          morphed 𝑛·1·25 ≔ 𝑛·1·24"+          , "        𝑛·1·26 ≔ 𝑛·1·25  # 𝕄(𝑛·1·22)"+          , "        evaluated 𝑛·1·27 ≔ 𝑛·1·26  # 𝑛·0·8"+          , "      normalized 𝑛·0·9 ≔ ⟦ ρ ↦ 𝑛·1·23, λ ⤍ L_number_nope ⟧  # 𝑛·1·27.nope"+          , "      morphed 𝑛·0·10 ≔ ⟦ ρ ↦ 𝑛·1·23, λ ⤍ L_number_nope ⟧"           , "    unanswered L_number_nope  # 𝔻(⟦ ρ ↦ 𝑛·1·23, λ ⤍ L_number_nope ⟧)"           ]     it "leaves an unanswered λ function dataized directly as the whole residue" $ do       ((outcome, chain), protocol) <- partially known "[[ L> Sym_arg_0 ]]"       outcome `shouldBe` Residual placeholder-      protocol `shouldBe` "  𝔻(Φ):\n    boxed 𝑛·0·1 := Φ.φ\n    normalized 𝑛·0·2 := Sym_arg_0:λ  # Φ.φ\n    unanswered Sym_arg_0  # 𝔻(Sym_arg_0:λ)\n"+      protocol `shouldBe` "  𝔻(Φ):\n    boxed 𝑛·0·1 ≔ Φ.φ\n    normalized 𝑛·0·2 ≔ Sym_arg_0:λ  # Φ.φ\n    unanswered Sym_arg_0  # 𝔻(Sym_arg_0:λ)\n"       map fst chain `shouldEndWith` [placeholder]     it "closes a dataization with the datum the delta rule found" $ do       (_, protocol) <- partially known "[[ @ -> [[ D> 01-02 ]] ]]"-      protocol `shouldBe` "  𝔻(Φ):\n    boxed 𝑛·0·1 := Φ.φ\n    normalized 𝑛·0·2 := 01-02:Δ:φ  # Φ.φ\n    boxed 𝑛·0·3 := 𝑛·0·2.φ\n    normalized 𝑛·0·4 := 01-02:Δ  # 𝑛·0·3\n    𝛿·0·1 := 01-02\n"+      protocol `shouldBe` "  𝔻(Φ):\n    boxed 𝑛·0·1 ≔ Φ.φ\n    normalized 𝑛·0·2 ≔ 01-02:Δ:φ  # Φ.φ\n    boxed 𝑛·0·3 ≔ 𝑛·0·2.φ\n    normalized 𝑛·0·4 ≔ 01-02:Δ  # 𝑛·0·3\n    𝛿·0·1 ≔ 01-02\n"     it "continues the block of a dataization the box rule enters again at the same site" $ do       (_, protocol) <- partially known "[[ @ -> [[ @ -> [[ D> 0A- ]] ]] ]]"-      protocol `shouldBe` "  𝔻(Φ):\n    boxed 𝑛·0·1 := Φ.φ\n    normalized 𝑛·0·2 := 0A-:Δ:φ:φ  # Φ.φ\n    boxed 𝑛·0·3 := 𝑛·0·2.φ\n    normalized 𝑛·0·4 := 0A-:Δ:φ  # 𝑛·0·3\n    boxed 𝑛·0·5 := 𝑛·0·4.φ\n    normalized 𝑛·0·6 := 0A-:Δ  # 𝑛·0·5\n    𝛿·0·1 := 0A-\n"+      protocol `shouldBe` "  𝔻(Φ):\n    boxed 𝑛·0·1 ≔ Φ.φ\n    normalized 𝑛·0·2 ≔ 0A-:Δ:φ:φ  # Φ.φ\n    boxed 𝑛·0·3 ≔ 𝑛·0·2.φ\n    normalized 𝑛·0·4 ≔ 0A-:Δ:φ  # 𝑛·0·3\n    boxed 𝑛·0·5 ≔ 𝑛·0·4.φ\n    normalized 𝑛·0·6 ≔ 0A-:Δ  # 𝑛·0·5\n    𝛿·0·1 ≔ 0A-\n"     it "writes the two morphings of one dataization as two blocks" $ do       (_, protocol) <- partially known "73.25"       length (filter (isPrefixOf "    𝕄(") (lines protocol)) `shouldBe` 2     it "writes every box step of a dataization into the protocol" $ do       (_, protocol) <- partially known "73.25"-      filter (isInfixOf "boxed") (lines protocol) `shouldBe` ["    boxed 𝑛·0·1 := Φ.φ", "    boxed 𝑛·0·7 := 𝑛·0·6.φ", "    boxed 𝑛·0·13 := 𝑛·0·12.φ"]+      filter (isInfixOf "boxed") (lines protocol) `shouldBe` ["    boxed 𝑛·0·1 ≔ Φ.φ", "    boxed 𝑛·0·7 ≔ 𝑛·0·6.φ", "    boxed 𝑛·0·13 ≔ 𝑛·0·12.φ"]     it "names the morphing that follows a box step by the meta the box step bound" $ do       (_, protocol) <- partially known "73.25"-      lines protocol `shouldContain` ["    boxed 𝑛·0·1 := Φ.φ", "    normalized 𝑛·0·2 := 73.25  # Φ.φ", "    𝕄(𝑛·0·1):"]+      lines protocol `shouldContain` ["    boxed 𝑛·0·1 ≔ Φ.φ", "    normalized 𝑛·0·2 ≔ 73.25  # Φ.φ", "    𝕄(𝑛·0·1):"]     it "still reaches the manufactured datum when nothing is stuck" $ do-      ((outcome, _), _) <- partially known "2.times(3)"+      ((outcome, _), _) <- partially known "2.times(x -> 3)"       outcome `shouldBe` Dataized (BtMany ["40", "45", "00", "00", "00", "00", "00", "00"])     it "parks a firing whose operand dataizes the terminator ⊥" $ do-      ((outcome, _), protocol) <- partially known "5.plus( ⟦ ⟧ )"+      ((outcome, _), protocol) <- partially known "5.plus( x -> ⟦ ⟧ )"       case outcome of         Residual (ExFormation bds) -> bds `shouldContain` [BiLambda (Function "L_number_plus")]         other -> expectationFailure ("expected a residual formation, got " ++ show other)@@ -308,7 +308,7 @@       outcome `shouldBe` Residual ExTermination     it "writes the terminator ⊥ the object reduces to into the protocol" $ do       (_, protocol) <- partially known "⊥"-      protocol `shouldBe` "  𝔻(Φ):\n    boxed 𝑛·0·1 := Φ.φ\n    normalized 𝑛·0·2 := ⊥  # Φ.φ\n  unanswered ⊥  # 𝔻(⊥)\n"+      protocol `shouldBe` "  𝔻(Φ):\n    boxed 𝑛·0·1 ≔ Φ.φ\n    normalized 𝑛·0·2 ≔ ⊥  # Φ.φ\n  unanswered ⊥  # 𝔻(⊥)\n"    describe "ReduceContext's --max-depth/--max-cycles reach into the normalization it splices in" $ do     let wrapped = "[[ @ -> [[ D> 00- ]] ]]"@@ -357,7 +357,7 @@             ++ concatMap (map (verb . (.operation)) . (.premises)) Yaml.morphingRules             ++ concatMap (map (verb . (.operation)) . (.premises)) Yaml.dataizationRules     it "uses no step label without a defining rule or operation" $ do-      expr <- parseExpressionThrows (primitives "5.plus(6)")+      expr <- parseExpressionThrows (primitives "5.plus(x -> 6)")       loc <- parseExpressionThrows "Q"       (_, chain, _) <- dataize expr emptyState . withLambdas known =<< defaultReduceContext loc       let orphans = nub [label | (_, Just (_, label)) <- chain, label `notElem` allowed, label /= "symbol"]@@ -365,7 +365,7 @@         (null orphans)         (expectationFailure ("Dataization emitted step labels with no defining rule or operation: " ++ show orphans))     it "takes the step of a firing by evaluation" $ do-      expr <- parseExpressionThrows (primitives "5.plus(6)")+      expr <- parseExpressionThrows (primitives "5.plus(x -> 6)")       loc <- parseExpressionThrows "Q"       (_, chain, _) <- dataize expr emptyState . withLambdas known =<< defaultReduceContext loc       map snd chain `shouldContain` [Just (Evaluation, "evaluate")]@@ -394,11 +394,11 @@           loc' <- parseExpressionThrows loc           (_, chain, _) <- dataize expr emptyState . withLambdas known =<< defaultReduceContext loc'           pure [label | (_, Just (_, label)) <- chain]-    it "dataizes 5.plus(6) through the expected rules" $ do+    it "dataizes 5.plus(x -> 6) through the expected rules" $ do       labels <-         labelsOf           "Q"-          "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6) ]]"+          "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6) ]]"       labels         `shouldBe` [ "box"                    , "dot"@@ -414,8 +414,8 @@     it "dataizes a located reference through the expected rules" $ do       labels <- labelsOf "Q.foo.bar" "[[ foo -> [[ bar -> [[ @ -> Q.x ]] ]], x -> [[ D> 42- ]] ]]"       labels `shouldBe` ["box", "dot", "ma", "skip", "mf", "delta"]-    it "takes every step of 5.plus(6) by the judgment of its rule" $ do-      expr <- parseExpressionThrows "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(6) ]]"+    it "takes every step of 5.plus(x -> 6) by the judgment of its rule" $ do+      expr <- parseExpressionThrows "[[ bytes ↦ ⟦ φ ↦ ∅ ⟧, number(φ) -> [[ plus(^, x) -> [[ L> L_number_plus ]] ]], @ -> 5.plus(x -> 6) ]]"       (_, chain, _) <- dataize expr emptyState . withLambdas known =<< defaultReduceContext ExRoot       [judgment | (_, Just (judgment, _)) <- chain]         `shouldBe` [ Dataization
test/DepsSpec.hs view
@@ -12,7 +12,7 @@ import Data.List (isInfixOf, isPrefixOf) import Data.Time (LocalTime (LocalTime), TimeOfDay (TimeOfDay), ZonedTime (ZonedTime), fromGregorian, hoursToTimeZone) import Data.Time.Clock.POSIX (getPOSIXTime)-import Deps (Acyclic (Proven), Evaluation (EvAnswer, EvApplied, EvBound, EvBoxed, EvBuilt, EvCast, EvData, EvDeferred, EvDelta, EvDiverged, EvEvaluated, EvFabricated, EvFiring, EvGuarded, EvHeader, EvJoined, EvLooped, EvManufactured, EvMemoized, EvMorphed, EvNormalized, EvOpaque, EvPassed, EvRecalled, EvRemembered, EvRenamed, EvReshaped, EvRun, EvShared, EvStarted, EvStuck, EvStuckOn, EvSymbolized, EvTaken, EvTerm, EvUndressed, EvUnripe, EvWorld), Header (Header), Judgment (Dataization, Evaluation, Morphing), Nesting (..), Protocol (..), World (World), dontSaveEval, dontSaveStep, emptyNesting, emptyProgress, emptyProtocol, endEval, endEvalXml, perSecond, progressed, resited, saveStep)+import Deps (Acyclic (Proven), Evaluation (EvAnswer, EvApplied, EvAssumed, EvBound, EvBoxed, EvBuilt, EvCast, EvData, EvDeferred, EvDelta, EvDiverged, EvEvaluated, EvFabricated, EvFed, EvFiring, EvGuarded, EvHeader, EvJoined, EvLooped, EvManufactured, EvMemoized, EvMorphed, EvNormalized, EvOpaque, EvOpaqued, EvPassed, EvRecalled, EvRemembered, EvRenamed, EvReshaped, EvRun, EvShared, EvStarted, EvStuck, EvStuckOn, EvSymbolized, EvTaken, EvTerm, EvUndressed, EvUnripe, EvWorld), Header (Header), Judgment (Dataization, Evaluation, Morphing), Nesting (..), Protocol (..), World (World), dontSaveEval, dontSaveStep, emptyNesting, emptyProgress, emptyProtocol, endEval, endEvalXml, perSecond, progressed, resited, saveStep) import Fixtures (readUtf8, recorded, recordedWhole, recordedXml) import Forks (Refusal (..), Side (..)) import GHC.Clock (getMonotonicTime)@@ -137,109 +137,112 @@       filter (isInfixOf "ёж") (lines written) `shouldBe` []     it "writes an application as a line binding its call to a fresh 𝑛" $ do       (_, written) <- recorded (\record -> record (EvApplied 1 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "w"))))-      take 1 (lines written) `shouldBe` ["  𝑛·0·1 := Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ.w)"]+      take 1 (lines written) `shouldBe` ["  𝑛·0·1 ≔ Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ.w)"]     it "writes a symbol nothing can fire as opaque, with the attribute taken off it" $ do       (_, written) <- recorded (\record -> record (EvOpaque 1 7 Morphing (ExDispatch (ExFormation [BiLambda (FnSymbol 7)]) (AtLabel "ёж"))))       lines written `shouldBe` ["  opaque 𝜎7  # 𝕄(𝜎7:λ.ёж)"]+    it "writes the symbol a dispatch off a bare symbol gave" $ do+      (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing ExRoot, EvOpaqued 1 8 (ExDispatch (ExFormation [BiLambda (FnSymbol 7)]) (AtLabel "ёж"))])+      last (lines written) `shouldBe` "  opaque 𝜎8:λ ≔ 𝜎7:λ.ёж"     it "writes a λ function no entry answers as unanswered, with the attribute taken off it" $ do       (_, written) <- recorded (\record -> record (EvStuck 1 "L_ёж" Morphing (ExDispatch (ExFormation [BiLambda (Function "L_ёж")]) (AtLabel "уж"))))       lines written `shouldBe` ["  unanswered L_ёж  # 𝕄(L_ёж:λ.уж)"]     it "writes the formation an application made on a line of its own after the line of the application" $ do       (_, written) <- recorded (\record -> record (EvApplied 1 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "сом")) (ArTau (AtLabel "ус") (ExFormation []))) (ExFormation [BiTau (AtLabel "ус") (ExFormation []), BiTau (AtLabel "хвост") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "пруд"))))-      last (lines written) `shouldBe` "  𝑛·0·2 := ⟦ ус ↦ ⟦⟧, хвост ↦ ⟦⟧ ⟧"+      last (lines written) `shouldBe` "  𝑛·0·2 ≔ ⟦ ус ↦ ⟦⟧, хвост ↦ ⟦⟧ ⟧"     it "spells an object an application made by its name on a later line" $ do       (_, written) <- recorded (\record -> mapM_ record [EvFiring 1 "L_щ" Morphing ExRoot, EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) ExRoot, EvTerm 2 "𝑛1" Morphing (ExDispatch ExXi (AtLabel "z")) (ExFormation [BiTau (AtLabel "z") (ExFormation [BiTau (AtLabel "q") (ExFormation [])]), BiTau (AtLabel "у") (ExFormation [])])])-      last (lines written) `shouldBe` "    𝑛1·1 := ⟦ z ↦ 𝑛·1·2, у ↦ ⟦⟧ ⟧  # 𝕄(ξ.z)"+      last (lines written) `shouldBe` "    𝑛1·1 ≔ ⟦ z ↦ 𝑛·1·2, у ↦ ⟦⟧ ⟧  # 𝕄(ξ.z)"     it "numbers the answer of a firing past the objects applications made inside it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvFiring 1 "L_ю" Morphing ExRoot, EvBuilt 2 (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) ExRoot, EvAnswer 2 (ExFormation [BiTau (AtLabel "q") (ExFormation [])])])-      last (lines written) `shouldBe` "    𝑛·1·4 := 𝑛·1·3  # 𝕄(𝑛·1·1)"+      last (lines written) `shouldBe` "    𝑛·1·4 ≔ 𝑛·1·3  # 𝕄(𝑛·1·1)"     it "spells an application an earlier line wrote by its name in the argument of a later one" $ do       (_, written) <- recorded (\record -> mapM_ record [EvApplied 1 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) ExRoot, EvApplied 1 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "жук")) (ArTau (AtLabel "w") (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))))) (ExFormation [BiTau (AtLabel "w") (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation [])))]) ExRoot])-      lines written `shouldContain` ["  𝑛·0·3 := Φ.жук( w ↦ 𝑛·0·1 )  # 𝕄(Φ)"]+      lines written `shouldContain` ["  𝑛·0·3 ≔ Φ.жук( w ↦ 𝑛·0·1 )  # 𝕄(Φ)"]     it "spells an application made again by its head and argument rather than by the name of the first one" $ do       (_, written) <- recorded (\record -> replicateM_ 2 (record (EvApplied 1 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) ExRoot)))-      lines written `shouldContain` ["  𝑛·0·3 := Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ)"]+      lines written `shouldContain` ["  𝑛·0·3 ≔ Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ)"]     it "spells the formation an application made again in full rather than by the name of the first one" $ do       (_, written) <- recorded (\record -> replicateM_ 2 (record (EvApplied 1 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "карп")) (ArTau (AtLabel "плавник") (ExFormation []))) (ExFormation [BiTau (AtLabel "плавник") (ExFormation []), BiTau (AtLabel "чешуя") (ExFormation [])]) ExRoot)))-      last (lines written) `shouldBe` "  𝑛·0·4 := ⟦ плавник ↦ ⟦⟧, чешуя ↦ ⟦⟧ ⟧"+      last (lines written) `shouldBe` "  𝑛·0·4 ≔ ⟦ плавник ↦ ⟦⟧, чешуя ↦ ⟦⟧ ⟧"     it "writes the datum the delta rule found under a name of its own" $ do       (_, written) <- recorded (\record -> mapM_ record [EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 2 (BtMany ["1F", "E0"]), EvDelta 2 (BtOne "33")])-      last (lines written) `shouldBe` "    𝛿·1·2 := 33-"+      last (lines written) `shouldBe` "    𝛿·1·2 ≔ 33-"     it "comments a datum of eight bytes with the whole number it holds as a double" $ do       (_, written) <- recorded (\record -> mapM_ record [EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 2 (BtMany ["40", "45", "00", "00", "00", "00", "00", "00"])])-      last (lines written) `shouldBe` "    𝛿·1·1 := 40-45-00-00-00-00-00-00  # 42.0"+      last (lines written) `shouldBe` "    𝛿·1·1 ≔ 40-45-00-00-00-00-00-00  # 42.0"     it "comments a datum of eight bytes with the fraction it holds" $ do       (_, written) <- recorded (\record -> mapM_ record [EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 2 (BtMany ["C0", "09", "1E", "B8", "51", "EB", "85", "1F"])])-      last (lines written) `shouldBe` "    𝛿·1·1 := C0-09-1E-B8-51-EB-85-1F  # -3.14"+      last (lines written) `shouldBe` "    𝛿·1·1 ≔ C0-09-1E-B8-51-EB-85-1F  # -3.14"     it "spells the datum of an operand by the name the delta rule just gave it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 3 (BtOne "7F"), EvData 2 "𝛿1" (ExDispatch ExXi (AtLabel "щ")) (Right (BtOne "7F"))])-      last (lines written) `shouldBe` "    𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.щ)"+      last (lines written) `shouldBe` "    𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.щ)"     it "writes the symbol a dataization came down to under a name of its own" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvManufactured 1 12])-      lines written `shouldBe` ["𝔻(Φ):", "  𝛿·0·1 := 𝔻(𝜎12:λ)"]+      lines written `shouldBe` ["𝔻(Φ):", "  𝛿·0·1 ≔ 𝔻(𝜎12:λ)"]     it "counts the symbols a dataization came down to with the data the delta rule found" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 3 (BtOne "7F"), EvManufactured 3 32])-      last (lines written) `shouldBe` "      𝛿·1·2 := 𝔻(𝜎32:λ)"+      last (lines written) `shouldBe` "      𝛿·1·2 ≔ 𝔻(𝜎32:λ)"     it "spells the symbol of an operand by the name the dataization just gave it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ж" Dataization ExRoot, EvManufactured 3 32, EvData 2 "𝛿1" (ExDispatch ExXi (AtLabel "щ")) (Left 32)])-      last (lines written) `shouldBe` "    𝛿1·1 := 𝛿·1·1  # 𝔻(ξ.щ)"+      last (lines written) `shouldBe` "    𝛿1·1 ≔ 𝛿·1·1  # 𝔻(ξ.щ)"     it "spells the symbol of an operand in full when the line before it named another symbol" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ж" Dataization ExRoot, EvManufactured 3 31, EvData 2 "𝛿1" (ExDispatch ExXi (AtLabel "щ")) (Left 32)])-      last (lines written) `shouldBe` "    𝛿1·1 := 𝔻(𝜎32:λ)  # 𝔻(ξ.щ)"+      last (lines written) `shouldBe` "    𝛿1·1 ≔ 𝔻(𝜎32:λ)  # 𝔻(ξ.щ)"     it "writes the term a morphing came to as a line binding it to a fresh 𝑛 under the heading of the morphing" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "жук")), EvMorphed 2 (ExDispatch ExRoot (AtLabel "щука"))])-      lines written `shouldBe` ["𝕄(Φ):", "  𝕄(Φ.жук):", "    morphed 𝑛·0·1 := Φ.щука"]+      lines written `shouldBe` ["𝕄(Φ):", "  𝕄(Φ.жук):", "    morphed 𝑛·0·1 ≔ Φ.щука"]     it "writes the term a meta was shared for as a line binding that meta" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "сом")), EvShared 2 (ExMeta "n·1") (ExApplication (ExDispatch ExRoot (AtLabel "карп")) (ArTau (AtLabel "икра") (ExDispatch ExRoot (AtLabel "линь"))))])-      lines written `shouldBe` ["𝕄(Φ):", "  𝕄(Φ.сом):", "    shared 𝑛·1 := Φ.карп( икра ↦ Φ.линь )"]+      lines written `shouldBe` ["𝕄(Φ):", "  𝕄(Φ.сом):", "    shared 𝑛·1 ≔ Φ.карп( икра ↦ Φ.линь )"]     it "writes the term a normalization came to as a line binding it to a fresh 𝑛 and naming what it came from" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "лось")), EvNormalized 2 (ExDispatch (ExDispatch ExRoot (AtLabel "кедр")) (AtLabel "шишка")) (ExDispatch ExRoot (AtLabel "выпь"))])-      lines written `shouldBe` ["𝕄(Φ):", "  𝕄(Φ.лось):", "    normalized 𝑛·0·1 := Φ.выпь  # Φ.кедр.шишка"]+      lines written `shouldBe` ["𝕄(Φ):", "  𝕄(Φ.лось):", "    normalized 𝑛·0·1 ≔ Φ.выпь  # Φ.кедр.шишка"]     it "names the term a normalization came from by the line that wrote it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "ива")), EvMorphed 2 (ExFormation [BiTau (AtLabel "лист") (ExFormation [])]), EvNormalized 2 (ExApplication (ExFormation [BiTau (AtLabel "лист") (ExFormation [])]) (ArTau (AtLabel "сок") (ExDispatch ExRoot (AtLabel "клён")))) ExTermination])-      last (lines written) `shouldBe` "    normalized 𝑛·0·2 := ⊥  # 𝑛·0·1( сок ↦ Φ.клён )"+      last (lines written) `shouldBe` "    normalized 𝑛·0·2 ≔ ⊥  # 𝑛·0·1( сок ↦ Φ.клён )"     it "writes no line for a normalization that came to a term an earlier line named" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "ель")), EvMorphed 2 (ExFormation [BiTau (AtLabel "хвоя") (ExFormation [])]), EvNormalized 2 (ExApplication (ExFormation [BiTau (AtLabel "хвоя") (ExFormation [])]) (ArTau AtRho ExRoot)) (ExFormation [BiTau (AtLabel "хвоя") (ExFormation [])])])-      lines written `shouldBe` ["𝕄(Φ):", "  𝕄(Φ.ель):", "    morphed 𝑛·0·1 := ⟦⟧:хвоя"]+      lines written `shouldBe` ["𝕄(Φ):", "  𝕄(Φ.ель):", "    morphed 𝑛·0·1 ≔ ⟦⟧:хвоя"]     it "spells the term a morphing came to by the name of the formation an application made" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "w")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "w")), EvMorphed 2 (ExFormation [BiTau (AtLabel "q") (ExFormation [])])])-      last (lines written) `shouldBe` "    morphed 𝑛·0·3 := 𝑛·0·2"+      last (lines written) `shouldBe` "    morphed 𝑛·0·3 ≔ 𝑛·0·2"     it "numbers a box step past the term the morphing before it came to, as the markup does" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ.e", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "e")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "байт")) (ArTau AtPhi (ExFormation [BiLambda (FnSymbol 1)]))) (ExFormation [BiTau AtPhi (ExFormation [BiLambda (FnSymbol 1)])]) (ExDispatch ExRoot (AtLabel "e")), EvMorphed 2 (ExFormation [BiTau AtPhi (ExFormation [BiLambda (FnSymbol 1)])]), EvBoxed 1 (ExDispatch (ExFormation [BiTau AtPhi (ExFormation [BiLambda (FnSymbol 1)])]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·4 := 𝑛·0·3.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·4 ≔ 𝑛·0·3.φ"     it "names the term a morphing came to in the box after it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "жук")), EvMorphed 2 (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "щука"))]), EvBoxed 1 (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "щука"))]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·2 := 𝑛·0·1.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·2 ≔ 𝑛·0·1.φ"     it "names the term a morphing came to by its meta in the box after it, though an application named it before" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ.ю", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "ю")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "хорь")) (ArTau (AtLabel "ось") (ExFormation []))) (ExFormation [BiTau (AtLabel "ось") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "ось"))]) (ExDispatch ExRoot (AtLabel "ю")), EvMorphed 2 (ExFormation [BiTau (AtLabel "ось") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "ось"))]), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "ось") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "ось"))]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·4 := 𝑛·0·3.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·4 ≔ 𝑛·0·3.φ"     it "writes a pass of an undress line as a line naming the φ it took off the term a morphing came to" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvMorphed 2 (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "щегол"))]), EvUndressed 2 (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "щегол"))]) AtPhi)])-      last (lines written) `shouldBe` "    undressed 𝑛·1·2 := 𝑛·1·1.φ"+      last (lines written) `shouldBe` "    undressed 𝑛·1·2 ≔ 𝑛·1·1.φ"     it "names the morphing after a pass of an undress line by the meta of that pass" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvMorphed 2 (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "сокол"))]), EvUndressed 2 (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "сокол"))]) AtPhi), EvStarted 2 Morphing (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "сокол"))]) AtPhi), EvMorphed 3 (ExDispatch ExRoot (AtLabel "сокол"))])-      lines written `shouldContain` ["    𝕄(𝑛·1·2):", "      morphed 𝑛·1·3 := Φ.сокол"]+      lines written `shouldContain` ["    𝕄(𝑛·1·2):", "      morphed 𝑛·1·3 ≔ Φ.сокол"]     it "spells the datum of an operand in full when the line before it found no datum" $ do       (_, written) <- recorded (\record -> mapM_ record [EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 3 (BtOne "7F"), EvFiring 2 "L_з" Dataization ExRoot, EvData 2 "𝛿1" (ExDispatch ExXi (AtLabel "щ")) (Right (BtOne "7F"))])-      last (lines written) `shouldBe` "    𝛿1·1 := 7F-  # 𝔻(ξ.щ)"+      last (lines written) `shouldBe` "    𝛿1·1 ≔ 7F-  # 𝔻(ξ.щ)"     it "writes no heading for a judgment nothing stood under" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "w")), EvDelta 1 (BtOne "0A")])-      lines written `shouldBe` ["𝔻(Φ):", "  𝛿·0·1 := 0A-"]+      lines written `shouldBe` ["𝔻(Φ):", "  𝛿·0·1 ≔ 0A-"]     it "writes the heading of a judgment above the first line under it and drops the comment naming it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "w")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "w"))])-      lines written `shouldBe` ["𝔻(Φ):", "  𝕄(Φ.w):", "    𝑛·0·1 := Φ.ёж( q ↦ ⟦⟧ )", "    𝑛·0·2 := ⟦⟧:q"]+      lines written `shouldBe` ["𝔻(Φ):", "  𝕄(Φ.w):", "    𝑛·0·1 ≔ Φ.ёж( q ↦ ⟦⟧ )", "    𝑛·0·2 ≔ ⟦⟧:q"]     it "keeps the comment of a line made at a site other than the one of its block" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ.w", EvApplied 1 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "е"))])-      lines written `shouldContain` ["  𝑛·0·1 := Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ.е)"]+      lines written `shouldContain` ["  𝑛·0·1 ≔ Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ.е)"]     it "keeps the comment of a line made by a judgment other than the one of its block" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ.w", EvApplied 1 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "w"))])-      lines written `shouldContain` ["  𝑛·0·1 := Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ.w)"]+      lines written `shouldContain` ["  𝑛·0·1 ≔ Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ.w)"]     it "drops the comment of a firing the judgment of its block asked for at its site" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ш" Dataization ExRoot])       last (lines written) `shouldBe` "  𝔼(L_ш):"     it "keeps the comment of a line standing in a firing" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ш" Morphing ExRoot, EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) ExRoot])-      lines written `shouldContain` ["    𝑛·1·1 := Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ)"]+      lines written `shouldContain` ["    𝑛·1·1 ≔ Φ.ёж( q ↦ ⟦⟧ )  # 𝕄(Φ)"]     it "writes one heading for two blocks of one judgment at one site in a row" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "w")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "w")), EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "w")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "w"))])       length (filter (== "  𝕄(Φ.w):") (lines written)) `shouldBe` 1@@ -248,28 +251,28 @@       length (filter (== "  𝕄(Φ.w):") (lines written)) `shouldBe` 2     it "writes the box step of a dataization as a line naming the φ it took" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "гнёт")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "щур")) (ArTau (AtLabel "ял") (ExFormation []))) (ExFormation [BiTau (AtLabel "ял") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "ял"))]) (ExDispatch ExRoot (AtLabel "гнёт")), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "ял") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "ял"))]) AtPhi)])-      lines written `shouldBe` ["𝔻(Φ):", "  𝕄(Φ.гнёт):", "    𝑛·0·1 := Φ.щур( ял ↦ ⟦⟧ )", "    𝑛·0·2 := ⟦ ял ↦ ⟦⟧, φ ↦ ял ⟧", "  boxed 𝑛·0·3 := 𝑛·0·2.φ"]+      lines written `shouldBe` ["𝔻(Φ):", "  𝕄(Φ.гнёт):", "    𝑛·0·1 ≔ Φ.щур( ял ↦ ⟦⟧ )", "    𝑛·0·2 ≔ ⟦ ял ↦ ⟦⟧, φ ↦ ял ⟧", "  boxed 𝑛·0·3 ≔ 𝑛·0·2.φ"]     it "writes the heading again for a morphing that follows a box step" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "гнёт")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "щур")) (ArTau (AtLabel "ял") (ExFormation []))) (ExFormation [BiTau (AtLabel "ял") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "ял"))]) (ExDispatch ExRoot (AtLabel "гнёт")), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "ял") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "ял"))]) AtPhi), EvStarted 1 Morphing (ExDispatch ExRoot (AtLabel "гнёт")), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "щур")) (ArTau (AtLabel "ял") (ExBytes (BtOne "3C")))) (ExFormation [BiTau (AtLabel "ял") (ExBytes (BtOne "3C"))]) (ExDispatch ExRoot (AtLabel "гнёт"))])       length (filter (== "  𝕄(Φ.гнёт):") (lines written)) `shouldBe` 2     it "names the world it is told by Φ in the line of a box step" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvWorld (ExFormation [BiTau (AtLabel "вьюн") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "вьюн"))]), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "вьюн") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "вьюн"))]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·1 := Φ.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·1 ≔ Φ.φ"     it "names a morphing that follows a box step by the meta the box step bound" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvWorld (ExFormation [BiTau (AtLabel "кулик") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "кулик"))]), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "кулик") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "кулик"))]) AtPhi), EvStarted 1 Morphing (ExDispatch (ExFormation [BiTau (AtLabel "кулик") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "кулик"))]) AtPhi), EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "чиж")) (ArTau (AtLabel "уж") (ExBytes (BtOne "5E")))) (ExFormation [BiTau (AtLabel "уж") (ExBytes (BtOne "5E"))]) (ExDispatch (ExFormation [BiTau (AtLabel "кулик") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "кулик"))]) AtPhi)])-      lines written `shouldContain` ["  boxed 𝑛·0·1 := Φ.φ", "  𝕄(𝑛·0·1):"]+      lines written `shouldContain` ["  boxed 𝑛·0·1 ≔ Φ.φ", "  𝕄(𝑛·0·1):"]     it "spells out again the φ a box step takes once more" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvWorld (ExFormation [BiTau (AtLabel "лунь") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "лунь"))]), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "лунь") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "лунь"))]) AtPhi), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "лунь") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "лунь"))]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·2 := Φ.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·2 ≔ Φ.φ"     it "names the answer of a firing by its line in the box step that takes its φ" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_дрозд" Dataization ExRoot, EvBuilt 2 (ExFormation [BiTau AtPhi (ExApplication (ExDispatch ExRoot (AtLabel "сыч")) (ArTau AtPhi (ExFormation [BiLambda (FnSymbol 4)])))]), EvAnswer 2 (ExFormation [BiTau AtPhi (ExApplication (ExDispatch ExRoot (AtLabel "сыч")) (ArTau AtPhi (ExFormation [BiLambda (FnSymbol 4)])))]), EvBoxed 1 (ExDispatch (ExFormation [BiTau AtPhi (ExApplication (ExDispatch ExRoot (AtLabel "сыч")) (ArTau AtPhi (ExFormation [BiLambda (FnSymbol 4)])))]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·1 := 𝑛·1·2.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·1 ≔ 𝑛·1·2.φ"     it "names the answer of a firing by its line in the box step after it, though a morphing named it before" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_выдра" Dataization ExRoot, EvBuilt 2 (ExFormation [BiTau (AtLabel "кот") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "кот"))]), EvMorphed 2 (ExFormation [BiTau (AtLabel "кот") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "кот"))]), EvAnswer 2 (ExFormation [BiTau (AtLabel "кот") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "кот"))]), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "кот") (ExFormation []), BiTau AtPhi (ExDispatch ExXi (AtLabel "кот"))]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·1 := 𝑛·1·3.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·1 ≔ 𝑛·1·3.φ"     it "names the answer of a join by its line in the box step that takes its φ" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_клёст" Dataization ExRoot, EvTaken 2 (ExFormation [BiTau (AtLabel "жук") (ExFormation [BiLambda (FnSymbol 7)]), BiTau AtPhi (ExDispatch ExXi (AtLabel "жук"))]), EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "жук") (ExFormation [BiLambda (FnSymbol 7)]), BiTau AtPhi (ExDispatch ExXi (AtLabel "жук"))]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·1 := 𝑛·1·1.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·1 ≔ 𝑛·1·1.φ"     it "keeps the mode of a cut made at the site of its block" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvLooped 1 Morphing Proven (ExFormation []) ExRoot Nothing])       last (lines written) `shouldBe` "  looped ⟦⟧  # proven"@@ -290,7 +293,7 @@       last (lines written) `shouldBe` "    memoized 𝑛·1·1 ⇛ 𝜎8:λ  # Φ.налим"     it "closes a firing that answered with an evaluated line naming the formation fired" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ёрш" Dataization ExRoot, EvEvaluated 2 (ExDispatch ExRoot (AtLabel "налим")) (ExFormation [BiLambda (FnSymbol 8)])])-      last (lines written) `shouldBe` "    evaluated 𝑛·1·1 := 𝜎8:λ  # Φ.налим"+      last (lines written) `shouldBe` "    evaluated 𝑛·1·1 ≔ 𝜎8:λ  # Φ.налим"     it "writes an answer the memo renamed as a renamed line naming the formation it came from and every symbol it renamed" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ёрш" Dataization ExRoot, EvRenamed 2 (ExDispatch ExRoot (AtLabel "налим")) (ExFormation [BiLambda (FnSymbol 9)]) (ExDispatch ExRoot (AtLabel "карп")) [(3, 7), (4, 9)]])       last (lines written) `shouldBe` "    renamed 𝑛·1·1 ⇛ 𝜎9:λ  # Φ.налим, from Φ.карп, 𝜎3 as 𝜎7, 𝜎4 as 𝜎9"@@ -302,73 +305,73 @@       last (lines written) `shouldBe` "    recalled Φ.окунь ⇒ Φ.щука"     it "writes a cut that answered a copy as the call of the object it repeats" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvLooped 1 Dataization Proven (ExFormation []) ExRoot (Just (14, Just (ExApplication (ExDispatch ExRoot (AtLabel "клён")) (ArTau (AtLabel "ось") (ExFormation [BiLambda (FnSymbol 3)])))))])-      last (lines written) `shouldBe` "  looped 𝜎14 := Φ.клён( ось ↦ 𝜎3:λ )  # proven, repeats ⟦⟧"+      last (lines written) `shouldBe` "  looped 𝜎14 ≔ Φ.клён( ось ↦ 𝜎3:λ )  # proven, repeats ⟦⟧"     it "writes a copy handed back as it is under a name of its own and the call of the object it repeats" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvPassed 1 Dataization Proven (ExFormation []) ExRoot (ExFormation [BiTau (AtLabel "ъ") ExRoot]) (Just (ExApplication (ExDispatch ExRoot (AtLabel "клён")) (ArTau (AtLabel "ось") (ExFormation [BiLambda (FnSymbol 3)]))))])-      last (lines written) `shouldBe` "  passed 𝑛·0·1 := Φ.клён( ось ↦ 𝜎3:λ )  # proven, repeats ⟦⟧"+      last (lines written) `shouldBe` "  passed 𝑛·0·1 ≔ Φ.клён( ось ↦ 𝜎3:λ )  # proven, repeats ⟦⟧"     it "writes a copy handed back as it is that no fact names by the copy itself" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvPassed 1 Dataization Proven (ExFormation []) ExRoot (ExFormation [BiTau (AtLabel "ъ") ExRoot]) Nothing])-      last (lines written) `shouldBe` "  passed 𝑛·0·1 := Φ:ъ  # proven, repeats ⟦⟧"+      last (lines written) `shouldBe` "  passed 𝑛·0·1 ≔ Φ:ъ  # proven, repeats ⟦⟧"     it "names a copy handed back as it is by its name from then on" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvPassed 1 Dataization Proven (ExFormation []) ExRoot (ExFormation [BiTau (AtLabel "ъ") ExRoot]) Nothing, EvBoxed 1 (ExDispatch (ExFormation [BiTau (AtLabel "ъ") ExRoot]) AtPhi)])-      last (lines written) `shouldBe` "  boxed 𝑛·0·2 := 𝑛·0·1.φ"+      last (lines written) `shouldBe` "  boxed 𝑛·0·2 ≔ 𝑛·0·1.φ"     it "names the block over an answer by the line that built it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ф" Dataization ExRoot, EvBuilt 2 (ExDispatch ExRoot (AtLabel "ю")), EvStarted 2 Morphing (ExDispatch ExRoot (AtLabel "ю")), EvApplied 3 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "q") (ExFormation []))) (ExFormation [BiTau (AtLabel "q") (ExFormation [])]) (ExDispatch ExRoot (AtLabel "ю"))])       lines written `shouldContain` ["    𝕄(𝑛·1·1):"]     it "writes a deferred copy as the call of the object it was made of" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvDeferred 1 9 Morphing (ExFormation [BiTau (AtLabel "щ") (ExFormation [BiLambda (FnSymbol 4)]), BiTau AtPhi (ExDispatch (ExDispatch ExXi (AtLabel "щ")) (AtLabel "й"))]) (Just (ExApplication (ExDispatch ExRoot (AtLabel "ёж")) (ArTau (AtLabel "щ") (ExFormation [BiLambda (FnSymbol 4)])))) ExRoot])-      last (lines written) `shouldBe` "  deferred 𝜎9 := Φ.ёж( щ ↦ 𝜎4:λ )"+      last (lines written) `shouldBe` "  deferred 𝜎9 ≔ Φ.ёж( щ ↦ 𝜎4:λ )"     it "writes a deferred copy as it stands when no object of the world made it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvDeferred 1 9 Morphing (ExFormation [BiTau (AtLabel "щ") (ExFormation [BiLambda (FnSymbol 4)]), BiTau AtPhi (ExDispatch (ExDispatch ExXi (AtLabel "щ")) (AtLabel "й"))]) Nothing ExRoot])-      last (lines written) `shouldBe` "  deferred 𝜎9 := ⟦ щ ↦ 𝜎4:λ, φ ↦ щ.й ⟧"+      last (lines written) `shouldBe` "  deferred 𝜎9 ≔ ⟦ щ ↦ 𝜎4:λ, φ ↦ щ.й ⟧"     it "writes the term a join came to as the answer of its firing naming neither side" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvTaken 2 (ExFormation [BiLambda (FnSymbol 3)])])-      last (lines written) `shouldBe` "    𝑛·1·1 := 𝜎3:λ"+      last (lines written) `shouldBe` "    𝑛·1·1 ≔ 𝜎3:λ"     it "writes the term a stay line dropped a ρ from beside the stay of the meta it read" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvReshaped 2 "𝑛3" "stay" (ExMeta "n1") (ExFormation [BiLambda (FnSymbol 3)])])-      last (lines written) `shouldBe` "    𝑛3·1 := 𝜎3:λ  # stay(𝑛1 of L_ф)"+      last (lines written) `shouldBe` "    𝑛3·1 ≔ 𝜎3:λ  # stay(𝑛1 of L_ф)"     it "writes the term a symbolize line turned a datum of into a symbol beside the symbolize of the meta it read" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvReshaped 2 "𝑛4" "symbolize" (ExMeta "n2") (ExFormation [BiLambda (FnSymbol 6)])])-      last (lines written) `shouldBe` "    𝑛4·1 := 𝜎6:λ  # symbolize(𝑛2 of L_ф)"+      last (lines written) `shouldBe` "    𝑛4·1 ≔ 𝜎6:λ  # symbolize(𝑛2 of L_ф)"     it "names the entry a meta belongs to beside the firing an evaluate line made of it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_вилка" Morphing ExRoot, EvFiring 2 "L_плюс" Evaluation (ExMeta "n3")])       last (lines written) `shouldBe` "    𝔼(L_плюс):  # 𝔼(𝑛3 of L_вилка)"     it "names the entry beside the answer it built" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_зов" Morphing ExRoot, EvBuilt 2 (ExDispatch ExRoot (AtLabel "ю"))])-      last (lines written) `shouldBe` "    𝑛·1·1 := Φ.ю  # 𝑛 of L_зов"+      last (lines written) `shouldBe` "    𝑛·1·1 ≔ Φ.ю  # 𝑛 of L_зов"     it "leaves a meta numbered by its firing as it is" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvReshaped 2 "𝑛3" "stay" (ExMeta "n1·1") (ExFormation [BiLambda (FnSymbol 3)])])-      last (lines written) `shouldBe` "    𝑛3·1 := 𝜎3:λ  # stay(𝑛1·1)"+      last (lines written) `shouldBe` "    𝑛3·1 ≔ 𝜎3:λ  # stay(𝑛1·1)"     it "writes the symbol a symbolize line minted beside the datum it stands for" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvSymbolized 2 6 (BtOne "4A")])-      last (lines written) `shouldBe` "    symbolized 𝜎6 := 4A-"+      last (lines written) `shouldBe` "    symbolized 𝜎6 ≔ 4A-"     it "writes the double eight bytes hold beside the symbol a symbolize line minted for them" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvSymbolized 2 6 (BtMany ["C0", "09", "1E", "B8", "51", "EB", "85", "1F"])])-      last (lines written) `shouldBe` "    symbolized 𝜎6 := C0-09-1E-B8-51-EB-85-1F  # -3.14"+      last (lines written) `shouldBe` "    symbolized 𝜎6 ≔ C0-09-1E-B8-51-EB-85-1F  # -3.14"     it "names the data line of the firing holding the datum a symbolize line minted a symbol for" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 3 (BtOne "E7"), EvData 2 "𝛿3" (ExDispatch ExXi (AtLabel "щ")) (Right (BtOne "E7")), EvSymbolized 2 9 (BtOne "E7")])-      last (lines written) `shouldBe` "    symbolized 𝜎9 := E7-  # 𝛿3·1"+      last (lines written) `shouldBe` "    symbolized 𝜎9 ≔ E7-  # 𝛿3·1"     it "names the data line before the double eight bytes hold beside the symbol a symbolize line minted" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 3 (BtMany ["C0", "09", "1E", "B8", "51", "EB", "85", "1F"]), EvData 2 "𝛿2" (ExDispatch ExXi (AtLabel "ё")) (Right (BtMany ["C0", "09", "1E", "B8", "51", "EB", "85", "1F"])), EvSymbolized 2 4 (BtMany ["C0", "09", "1E", "B8", "51", "EB", "85", "1F"])])-      last (lines written) `shouldBe` "    symbolized 𝜎4 := C0-09-1E-B8-51-EB-85-1F  # 𝛿2·1, -3.14"+      last (lines written) `shouldBe` "    symbolized 𝜎4 ≔ C0-09-1E-B8-51-EB-85-1F  # 𝛿2·1, -3.14"     it "dont name a data line of another firing beside the symbol a symbolize line minted" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Dataization "Φ", EvFiring 1 "L_ж" Dataization ExRoot, EvDelta 3 (BtOne "5C"), EvData 2 "𝛿1" (ExDispatch ExXi (AtLabel "щ")) (Right (BtOne "5C")), EvFiring 1 "L_з" Dataization ExRoot, EvSymbolized 2 7 (BtOne "5C")])-      last (lines written) `shouldBe` "    symbolized 𝜎7 := 5C-"+      last (lines written) `shouldBe` "    symbolized 𝜎7 ≔ 5C-"     it "writes the meta a cast bound beside the meta it read and the meta whose shape it took" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvCast 2 "𝑛9" (ExMeta "n2") (ExMeta "n4") (ExFormation [BiTau AtPhi (ExFormation [BiLambda (FnSymbol 7)]), BiTau (AtLabel "щ") (ExDispatch ExRoot (AtLabel "ёж"))])])-      last (lines written) `shouldBe` "    cast 𝑛9·1 := ⟦ φ ↦ 𝜎7:λ, щ ↦ Φ.ёж ⟧  # 𝑛2·1 up to 𝑛4·1"+      last (lines written) `shouldBe` "    cast 𝑛9·1 ≔ ⟦ φ ↦ 𝜎7:λ, щ ↦ Φ.ёж ⟧  # 𝑛2·1 up to 𝑛4·1"     it "writes no line for a meta a line bound to the term it read as it was" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvBound 2 (ExMeta "n3") (ExDispatch ExRoot (AtLabel "щука"))])       lines written `shouldBe` ["𝕄(Φ):", "  𝔼(L_ф):"]     it "names the term a meta that wrote no line holds where a cast read that meta" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvBound 2 (ExMeta "n2") (ExDispatch ExRoot (AtLabel "ёрш")), EvCast 2 "𝑛9" (ExMeta "n2") (ExMeta "n4") (ExFormation [BiTau AtPhi (ExFormation [BiLambda (FnSymbol 7)]), BiTau (AtLabel "щ") (ExDispatch ExRoot (AtLabel "ёж"))])])-      last (lines written) `shouldBe` "    cast 𝑛9·1 := ⟦ φ ↦ 𝜎7:λ, щ ↦ Φ.ёж ⟧  # Φ.ёрш up to 𝑛4·1"+      last (lines written) `shouldBe` "    cast 𝑛9·1 ≔ ⟦ φ ↦ 𝜎7:λ, щ ↦ Φ.ёж ⟧  # Φ.ёрш up to 𝑛4·1"     it "names a meta a line of another firing left as it was by its own name" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvBound 2 (ExMeta "n2") (ExDispatch ExRoot (AtLabel "ёрш")), EvFiring 1 "L_ц" Morphing ExRoot, EvCast 2 "𝑛9" (ExMeta "n2") (ExMeta "n4") (ExFormation [BiTau AtPhi (ExFormation [BiLambda (FnSymbol 7)]), BiTau (AtLabel "щ") (ExDispatch ExRoot (AtLabel "ёж"))])])-      last (lines written) `shouldBe` "    cast 𝑛9·2 := ⟦ φ ↦ 𝜎7:λ, щ ↦ Φ.ёж ⟧  # 𝑛2·2 up to 𝑛4·2"+      last (lines written) `shouldBe` "    cast 𝑛9·2 ≔ ⟦ φ ↦ 𝜎7:λ, щ ↦ Φ.ёж ⟧  # 𝑛2·2 up to 𝑛4·2"     it "names the term a meta that wrote no line holds in the comment of a line that read that meta" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvBound 2 (ExMeta "n1") (ExDispatch ExRoot (AtLabel "щ")), EvReshaped 2 "𝑛3" "stay" (ExMeta "n1") (ExFormation [BiLambda (FnSymbol 3)])])-      last (lines written) `shouldBe` "    𝑛3·1 := 𝜎3:λ  # stay(Φ.щ)"+      last (lines written) `shouldBe` "    𝑛3·1 ≔ 𝜎3:λ  # stay(Φ.щ)"     it "names the term a meta that wrote no line holds at the site of a firing it was read for" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvBound 2 (ExMeta "n4") (ExDispatch ExRoot (AtLabel "щ")), EvFiring 2 "L_ю" Evaluation (ExMeta "n4")])       last (lines written) `shouldBe` "    𝔼(L_ю):  # 𝔼(Φ.щ)"@@ -377,19 +380,25 @@       last (lines written) `shouldBe` "    diverged Φ.ёж vs 𝑛2·1  # cannot join: the left side is Φ.ёж and the right side is Φ.щука; cannot fabricate: the left side is no formation"     it "writes the symbol a join minted beside the meta its condition was bound to and the two it stands for" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvJoined 2 (Left "𝛿3") 12 (5, 9) Nothing Nothing])-      last (lines written) `shouldBe` "    joined 𝜎12 := 𝛿3·1 ? 𝜎5 : 𝜎9"+      last (lines written) `shouldBe` "    joined 𝜎12 ≔ 𝛿3·1 ? 𝜎5 : 𝜎9"     it "writes the symbol a join minted beside the path its condition was read off" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvJoined 2 (Right (ExDispatch ExXi (AtLabel "щит"))) 12 (5, 9) Nothing Nothing])-      last (lines written) `shouldBe` "    joined 𝜎12 := ξ.щит ? 𝜎5 : 𝜎9"+      last (lines written) `shouldBe` "    joined 𝜎12 ≔ ξ.щит ? 𝜎5 : 𝜎9"     it "writes the symbol standing for ⊥ in a join with a comment saying it is ⊥" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvJoined 2 (Left "𝛿1") 4 (2, 3) (Just 3) Nothing])-      last (lines written) `shouldBe` "    joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥"+      last (lines written) `shouldBe` "    joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥"     it "writes the object a side raises with beside the symbol standing for ⊥ in a join" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "бросок")) (ArTau (AtLabel "весть") (ExFormation []))) (ExFormation [BiTau (AtLabel "весть") (ExFormation []), BiLambda (Function "L_бросок")]) ExRoot, EvJoined 2 (Left "𝛿1") 4 (2, 3) (Just 3) (Just (ExFormation [BiTau (AtLabel "весть") (ExFormation []), BiLambda (Function "L_бросок")]))])-      last (lines written) `shouldBe` "    joined 𝜎4 := 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥ raised by 𝑛·1·2"+      last (lines written) `shouldBe` "    joined 𝜎4 ≔ 𝛿1·1 ? 𝜎2 : 𝜎3  # where 𝜎3 is ⊥ raised by 𝑛·1·2"     it "writes a side a join kept since the other one is ⊥ beside the condition guarding it" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvGuarded 2 (Left "𝛿1") (ExMeta "n1", ExDispatch ExRoot (AtLabel "ёж")) (ExMeta "n2", ExTermination) Righthand Nothing])       last (lines written) `shouldBe` "    guarded 𝛿1·1 ? 𝑛1·1 : 𝑛2·1  # where 𝑛2·1 is ⊥"+    it "writes a side a join took for the bare symbol facing it" $ do+      (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvAssumed 2 (ExMeta "n1", ExFormation [BiLambda (FnSymbol 7)]) (ExMeta "n2", ExDispatch ExRoot (AtLabel "ёж"))])+      last (lines written) `shouldBe` "    assumed 𝜎7:λ ≡ 𝑛2·1"+    it "writes the symbol an argument fed to a bare symbol gave" $ do+      (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing ExRoot, EvFed 1 8 (ExApplication (ExFormation [BiLambda (FnSymbol 7)]) (ArTau (AtLabel "ёж") (ExDispatch ExRoot (AtLabel "уж"))))])+      last (lines written) `shouldBe` "  fed 𝜎8:λ ≔ 𝜎7:λ( ёж ↦ Φ.уж )"     it "writes a side a join kept since the left one is ⊥ with the object it raises with" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "бросок")) (ArTau (AtLabel "весть") (ExFormation []))) (ExFormation [BiTau (AtLabel "весть") (ExFormation []), BiLambda (Function "L_бросок")]) ExRoot, EvGuarded 2 (Right (ExDispatch ExXi (AtLabel "щит"))) (ExMeta "n3", ExTermination) (ExMeta "n4", ExDispatch ExRoot (AtLabel "ёж")) Lefthand (Just (ExFormation [BiTau (AtLabel "весть") (ExFormation []), BiLambda (Function "L_бросок")]))])       last (lines written) `shouldBe` "    guarded ξ.щит ? 𝑛3·1 : 𝑛4·1  # where 𝑛3·1 is ⊥ raised by 𝑛·1·2"@@ -422,19 +431,19 @@       last (lines written) `shouldBe` "    unripe Φ.уж vs 𝑛5·1  # лис is void on the right and attached on the left"     it "writes the formation a join fabricated beside the metas of the lines that bound its sides" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvFabricated 2 (ExMeta "n1", ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "ёж"))]) (ExMeta "n2", ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) [] (ExFormation [BiTau AtPhi (ExFormation [BiLambda (Function "L_ж"), BiTau (AtLabel "on") (ExFormation [BiDelta (BtOne "05")]), BiTau (AtLabel "left") (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "ёж"))]) AtPhi), BiTau (AtLabel "right") (ExDispatch (ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) AtPhi)]), BiTau (AtLabel "к") (ExFormation [BiLambda (Function "L_ж"), BiTau (AtLabel "on") (ExFormation [BiDelta (BtOne "05")]), BiTau (AtLabel "left") (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "ёж"))]) (AtLabel "к")), BiTau (AtLabel "right") (ExDispatch (ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) (AtLabel "к"))])])])-      last (lines written) `shouldSatisfy` isPrefixOf "    fabricated 𝑛·1·1 := 𝑛1·1 and 𝑛2·1  # "+      last (lines written) `shouldSatisfy` isPrefixOf "    fabricated 𝑛·1·1 ≔ 𝑛1·1 and 𝑛2·1  # "     it "writes the formation a join fabricated in the comment of its line" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvFabricated 2 (ExMeta "n1", ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "ёж"))]) (ExMeta "n2", ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) [] (ExFormation [BiTau (AtLabel "к") (ExFormation [BiLambda (Function "L_ж"), BiTau (AtLabel "on") (ExFormation [BiDelta (BtOne "05")]), BiTau (AtLabel "left") (ExDispatch (ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "ёж"))]) (AtLabel "к")), BiTau (AtLabel "right") (ExDispatch (ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) (AtLabel "к"))])])])-      last (lines written) `shouldBe` "    fabricated 𝑛·1·1 := 𝑛1·1 and 𝑛2·1  # ⟦ λ ⤍ L_ж, on ↦ 05-:Δ, left ↦ Φ.ёж:к.к, right ↦ Φ.щука:к.к ⟧:к"+      last (lines written) `shouldBe` "    fabricated 𝑛·1·1 ≔ 𝑛1·1 and 𝑛2·1  # ⟦ λ ⤍ L_ж, on ↦ 05-:Δ, left ↦ Φ.ёж:к.к, right ↦ Φ.щука:к.к ⟧:к"     it "spells out in the comment of its line a formation a join fabricated once more" $ do       (_, written) <- recorded (\record -> mapM_ record (EvRun Morphing "Φ" : EvFiring 1 "L_ф" Morphing ExRoot : replicate 2 (EvFabricated 2 (ExMeta "n1", ExFormation [BiTau (AtLabel "ю") (ExDispatch ExRoot (AtLabel "ёж"))]) (ExMeta "n2", ExFormation [BiTau (AtLabel "ю") (ExDispatch ExRoot (AtLabel "щука"))]) [] (ExFormation [BiTau (AtLabel "ю") (ExFormation [BiLambda (Function "L_ж"), BiTau (AtLabel "on") (ExFormation [BiDelta (BtOne "3F")]), BiTau (AtLabel "left") (ExDispatch ExRoot (AtLabel "ёж")), BiTau (AtLabel "right") (ExDispatch ExRoot (AtLabel "щука"))])]))))-      last (lines written) `shouldBe` "    fabricated 𝑛·1·2 := 𝑛1·1 and 𝑛2·1  # ⟦ λ ⤍ L_ж, on ↦ 3F-:Δ, left ↦ Φ.ёж, right ↦ Φ.щука ⟧:ю"+      last (lines written) `shouldBe` "    fabricated 𝑛·1·2 ≔ 𝑛1·1 and 𝑛2·1  # ⟦ λ ⤍ L_ж, on ↦ 3F-:Δ, left ↦ Φ.ёж, right ↦ Φ.щука ⟧:ю"     it "writes the formation a join fabricated by its name in a later line" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvFabricated 2 (ExMeta "n1", ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "ёж"))]) (ExMeta "n2", ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) [] (ExFormation [BiTau AtPhi (ExFormation [BiLambda (Function "L_ж"), BiTau (AtLabel "on") (ExFormation [BiDelta (BtOne "05")]), BiTau (AtLabel "left") (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "ёж"))]) AtPhi), BiTau (AtLabel "right") (ExDispatch (ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) AtPhi)]), BiTau (AtLabel "к") (ExFormation [BiLambda (Function "L_ж"), BiTau (AtLabel "on") (ExFormation [BiDelta (BtOne "05")]), BiTau (AtLabel "left") (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "ёж"))]) (AtLabel "к")), BiTau (AtLabel "right") (ExDispatch (ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) (AtLabel "к"))])]), EvTaken 2 (ExFormation [BiTau AtPhi (ExFormation [BiLambda (Function "L_ж"), BiTau (AtLabel "on") (ExFormation [BiDelta (BtOne "05")]), BiTau (AtLabel "left") (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "ёж"))]) AtPhi), BiTau (AtLabel "right") (ExDispatch (ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) AtPhi)]), BiTau (AtLabel "к") (ExFormation [BiLambda (Function "L_ж"), BiTau (AtLabel "on") (ExFormation [BiDelta (BtOne "05")]), BiTau (AtLabel "left") (ExDispatch (ExFormation [BiTau AtPhi (ExDispatch ExRoot (AtLabel "ёж"))]) (AtLabel "к")), BiTau (AtLabel "right") (ExDispatch (ExFormation [BiTau (AtLabel "к") (ExDispatch ExRoot (AtLabel "щука"))]) (AtLabel "к"))])])])-      last (lines written) `shouldBe` "    𝑛·1·2 := 𝑛·1·1"+      last (lines written) `shouldBe` "    𝑛·1·2 ≔ 𝑛·1·1"     it "opens a heading of its own for every run of the protocol" $ do       (_, written) <- recorded (\record -> mapM_ record [EvRun Morphing "Φ", EvDelta 1 (BtOne "0C"), EvRun Morphing "Φ", EvDelta 1 (BtOne "0D")])-      lines written `shouldBe` ["𝕄(Φ):", "  𝛿·0·1 := 0C-", "𝕄(Φ):", "  𝛿·0·2 := 0D-"]+      lines written `shouldBe` ["𝕄(Φ):", "  𝛿·0·1 ≔ 0C-", "𝕄(Φ):", "  𝛿·0·2 ≔ 0D-"]     it "opens the header with the version and the revision of phino and the date the run began" $ do       (_, written) <- recorded (\record -> mapM_ record [EvHeader (Header "0.0.156" (Just "9be96d8") (dated 3) ["dataize"] (World (Just "мир.phi") 3 120 2 7) Nothing) ExRoot ExRoot, EvRun Dataization "Φ"])       take 1 (lines written) `shouldBe` ["# Written by phino 0.0.156 (9be96d8) on 2026-10-27 09:41:12 +03:00"]@@ -757,6 +766,12 @@     it "writes a side a join kept since the other one is ⊥ as an element naming the side that raises" $ do       (_, written) <- recordedXml (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvGuarded 2 (Left "𝛿4") (ExMeta "n1", ExDispatch ExRoot (AtLabel "ёж")) (ExMeta "n2", ExTermination) Righthand Nothing])       lines written `shouldContain` ["    <guarded on=\"𝛿4·1\" left=\"𝑛1·1\" right=\"𝑛2·1\" terminator=\"right\"/>"]+    it "writes a side a join took for the bare symbol facing it as an element naming both" $ do+      (_, written) <- recordedXml (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvAssumed 2 (ExMeta "n2", ExFormation [BiLambda (FnSymbol 7)]) (ExMeta "n1", ExDispatch ExRoot (AtLabel "ёж"))])+      lines written `shouldContain` ["    <assumed symbol=\"𝜎7\" as=\"𝑛1·1\"/>"]+    it "writes the symbol an argument fed to a bare symbol gave as an element naming the application" $ do+      (_, written) <- recordedXml (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing ExRoot, EvFed 1 8 (ExApplication (ExFormation [BiLambda (FnSymbol 7)]) (ArTau (AtLabel "ёж") (ExDispatch ExRoot (AtLabel "уж"))))])+      lines written `shouldContain` ["  <fed symbol=\"𝜎8\" of=\"𝑒·0·1\"/>"]     it "names in the markup the object the side a guard kept away raises with" $ do       (_, written) <- recordedXml (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_ф" Morphing ExRoot, EvApplied 2 Morphing (ExApplication (ExDispatch ExRoot (AtLabel "бросок")) (ArTau (AtLabel "весть") (ExFormation []))) (ExFormation [BiTau (AtLabel "весть") (ExFormation []), BiLambda (Function "L_бросок")]) ExRoot, EvGuarded 2 (Right (ExDispatch ExXi (AtLabel "щит"))) (ExMeta "n3", ExTermination) (ExMeta "n4", ExDispatch ExRoot (AtLabel "ёж")) Lefthand (Just (ExFormation [BiTau (AtLabel "весть") (ExFormation []), BiLambda (Function "L_бросок")]))])       lines written `shouldContain` ["    <guarded on=\"ξ.щит\" left=\"𝑛3·1\" right=\"𝑛4·1\" terminator=\"left\" raised=\"𝑛·1·2\"/>"]@@ -802,6 +817,9 @@     it "writes a symbol nothing can fire as an element of its own, naming the term 𝕄 worked on" $ do       (_, written) <- recordedXml (\record -> mapM_ record [EvRun Morphing "Φ", EvOpaque 1 120 Morphing (ExDispatch (ExFormation [BiLambda (FnSymbol 120)]) (AtLabel "щ"))])       lines written `shouldContain` ["  <opaque symbol=\"𝜎120\" by=\"morph\">𝜎120.щ</opaque>"]+    it "writes the symbol a dispatch off a bare symbol gave as an element naming the dispatch" $ do+      (_, written) <- recordedXml (\record -> mapM_ record [EvRun Morphing "Φ", EvStarted 1 Morphing ExRoot, EvOpaqued 1 8 (ExDispatch (ExFormation [BiLambda (FnSymbol 7)]) (AtLabel "щ"))])+      lines written `shouldContain` ["  <opaque symbol=\"𝜎8\" of=\"𝜎7.щ\"/>"]     it "writes a stuck firing as an element of the word the text uses" $ do       (_, written) <- recordedXml (\record -> mapM_ record [EvRun Morphing "Φ", EvFiring 1 "L_щ" Morphing ExRoot, EvStuckOn 2 "L_жук"])       lines written `shouldContain` ["    <stuck λ=\"L_жук\"/>"]
test/EncodingSpec.hs view
@@ -124,30 +124,9 @@         , AA_TAU (APP_BINDING (PA_TAU (AT_PHI AT) ARROW' leafExprASCII))         )       , ("recurses through AA_TAUS", toASCII (AA_TAUS biPair), AA_TAUS biPairASCII)-      ,-        ( "recurses through AA_EXPRS"-        , toASCII (AA_EXPRS (APP_ARG leafExpr AAS_EMPTY))-        , AA_EXPRS (APP_ARG leafExprASCII AAS_EMPTY)-        )       ]       (\(desc, actual, expected) -> it desc (actual `shouldBe` expected)) -  describe "toASCII on APP_ARG" $-    it "recurses through both fields" $-      toASCII (APP_ARG leafExpr (AAS_EXPR EOL (TAB 1) leafExpr AAS_EMPTY))-        `shouldBe` APP_ARG leafExprASCII (AAS_EXPR EOL (TAB 1) leafExprASCII AAS_EMPTY)--  describe "toASCII on APP_ARGS" $-    forM_-      [-        ( "recurses through AAS_EXPR"-        , toASCII (AAS_EXPR EOL (TAB 1) leafExpr AAS_EMPTY)-        , AAS_EXPR EOL (TAB 1) leafExprASCII AAS_EMPTY-        )-      , ("leaves AAS_EMPTY untouched", toASCII AAS_EMPTY, AAS_EMPTY)-      ]-      (\(desc, actual, expected) -> it desc (actual `shouldBe` expected))-   describe "toASCII on PAIR" $     forM_       [@@ -156,11 +135,6 @@         , PA_TAU (AT_PHI AT) ARROW' leafExprASCII         )       ,-        ( "recurses through PA_ALPHA, forcing the arrow to ARROW'"-        , toASCII (PA_ALPHA (AL_IDX ALPHA 0) ARROW leafExpr)-        , PA_ALPHA (AL_IDX ALPHA' 0) ARROW' leafExprASCII-        )-      ,         ( "recurses through PA_FORMATION, forcing the arrow to ARROW'"         , toASCII (PA_FORMATION (AT_PHI PHI) [AT_RHO RHO] ARROW leafExpr)         , PA_FORMATION (AT_PHI AT) [AT_RHO CARET] ARROW' leafExprASCII@@ -200,17 +174,6 @@       ]       (\(desc, actual, expected) -> it desc (actual `shouldBe` expected)) -  describe "toASCII on ALPHA" $-    forM_-      [ ("recurses through AL_IDX", toASCII (AL_IDX ALPHA 7), AL_IDX ALPHA' 7)-      ,-        ( "recurses through AL_META"-        , toASCII (AL_META ALPHA (META NO_EXCL I "abc"))-        , AL_META ALPHA' (META EXCL I' "abc")-        )-      ]-      (\(desc, actual, expected) -> it desc (actual `shouldBe` expected))-   describe "toASCII on ATTRIBUTE" $     forM_       [ ("AT_PHI becomes AT", toASCII (AT_PHI PHI), AT_PHI AT)@@ -235,9 +198,7 @@    describe "toASCII on NUMBER" $     forM_-      [ ("IDX_META forces the head to I'", toASCII (IDX_META (META NO_EXCL I "abc")), IDX_META (META EXCL I' "abc"))-      , ("recurses through LENGTH", toASCII (LENGTH biPair), LENGTH biPairASCII)-      , ("recurses through DOMAIN", toASCII (DOMAIN biPair), DOMAIN biPairASCII)+      [ ("recurses through LENGTH", toASCII (LENGTH biPair), LENGTH biPairASCII)       , ("leaves LITERAL untouched", toASCII (LITERAL 5), LITERAL 5)       ]       (\(desc, actual, expected) -> it desc (actual `shouldBe` expected))
test/EvaluateSpec.hs view
@@ -18,7 +18,7 @@ import Data.Maybe (fromMaybe) import Data.Text qualified as T import Data.Yaml qualified as Decode-import Deps (Acyclic, Evaluation (EvRun), Judgment (Morphing), Term (TeExpression), certainty)+import Deps (Acyclic, Duration (..), Evaluation (EvRun), Judgment (Morphing), Term (TeExpression), certainty) import Encoding (Encoding (UNICODE)) import Files (allPathsIn) import Fixtures (defaultReduceContext, fixtureLambdas, recorded, recorded', withLambdas, withLambdasOf)@@ -44,6 +44,7 @@   , input :: String   , partial :: Maybe Bool   , acyclic :: Maybe String+  , loops :: Maybe Int   , steps :: Maybe Int   , firings :: Maybe Int   , protocol :: String@@ -75,6 +76,7 @@             base               { _partial = partial == Just True               , _acyclic = mode+              , _maxLoops = fromMaybe 0 loops               , _memo = cells               , _facts = Just facts               , _steps = Steps (fromMaybe 250 steps) 0@@ -116,10 +118,10 @@       _ -> orphans rest (applied line rest ++ facts)     applied :: String -> [String] -> [(String, String)]     applied line (next : _)-      | " := " `T.isInfixOf` T.pack line && " := " `T.isInfixOf` T.pack next = [(named line, named next)]+      | " ≔ " `T.isInfixOf` T.pack line && " ≔ " `T.isInfixOf` T.pack next = [(named line, named next)]     applied _ _ = []     named :: String -> String-    named = T.unpack . fst . T.breakOn " := " . T.pack+    named = T.unpack . fst . T.breakOn " ≔ " . T.pack     paired :: T.Text -> T.Text -> (String, String)     paired arrow text = let (left, right) = T.breakOn arrow text in (T.unpack left, T.unpack (T.drop (T.length arrow) right)) @@ -199,7 +201,7 @@       table <- withLambdasOf ("- λ: L_wide\n  morph:\n    𝑛1: $.x\n  rewrite:\n    𝑛2:\n      of: 𝑛1\n      rules:\n" <> T.concat (map (\idx -> "        - name: never" <> T.pack (show idx) <> "\n          pattern: 𝑒1.qz\n          result: 𝑒1\n") [1 .. 2000 :: Int]) <> "  𝑛: 𝑛2\n") readLambdas       due <- (+ 0.2) <$> getMonotonicTime       ctx <- withLambdas table <$> defaultReduceContext (ExDispatch ExRoot (AtLabel "y"))-      timeout 10000000 (morph program emptyState ctx{_deadline = Just (Deadline 37 due)})+      timeout 10000000 (morph program emptyState ctx{_deadline = Just (Deadline (Duration "37" 37) due)})         `shouldThrow` (\e -> "--max-seconds=37" `isInfixOf` show (e :: SomeException))    describe "fabricates a formation of two sides of different shapes" $
test/Fixtures.hs view
@@ -41,7 +41,7 @@ import Data.Text.Encoding (encodeUtf8) import Data.Yaml qualified as Yaml import Dataize (reduction)-import Deps (Judgment (..), SaveEvalFunc, dontSaveEval, dontSaveStep)+import Deps (Duration (..), Judgment (..), SaveEvalFunc, dontSaveEval, dontSaveStep) import Engine (Engine, building, yaml) import Evaluate (evaluation) import GHC.Clock (getMonotonicTime)@@ -77,7 +77,7 @@ loopingLambdas = withLambdasOf "- λ: L_loop\n  𝑛: ⟦ λ ⤍ L_loop ⟧\n"  overdue :: Int -> IO Deadline-overdue cap = Deadline cap . subtract 1 <$> getMonotonicTime+overdue cap = Deadline (Duration (show cap) (fromIntegral cap)) . subtract 1 <$> getMonotonicTime  withLambdasOf :: T.Text -> (FilePath -> IO a) -> IO a withLambdasOf lambdas = withTemp "phino-symbolic-.yaml" (encodeUtf8 lambdas)@@ -102,7 +102,7 @@     , "    times -> [[ ^ -> ?, x -> ?, L> L_number_times ]],"     , "    div -> [[ ^ -> ?, x -> ?, L> L_number_div ]],"     , "    gt -> [[ ^ -> ?, x -> ?, L> L_number_gt ]],"-    , "    eq -> [[ ^ -> ?, x -> ?, @ -> $.^.as-bytes.eq( x.as-bytes ) ]],"+    , "    eq -> [[ ^ -> ?, x -> ?, @ -> $.^.as-bytes.eq( b -> x.as-bytes ) ]],"     , "    nope -> [[ ^ -> ?, L> L_number_nope ]]"     , "  ]],"     , "  @ -> " ++ src
test/ForksSpec.hs view
@@ -28,8 +28,16 @@       joined (ExFormation [BiDelta (BtOne "01"), BiLambda (FnSymbol 4)]) (ExFormation [BiDelta (BtOne "02"), BiLambda (FnSymbol 9)]) 10 `shouldBe` Left [AtDelta]     it "tells the λ of two formations naming two functions" $       joined (ExFormation [BiLambda (Function "L_one")]) (ExFormation [BiLambda (Function "L_two")]) 7 `shouldBe` Left [AtLambda]-    it "tells the λ of two formations naming a symbol and a function" $-      joined (ExFormation [BiLambda (FnSymbol 3)]) (ExFormation [BiLambda (Function "L_three")]) 5 `shouldBe` Left [AtLambda]+    it "takes the other side for a bare symbol" $+      joined (ExFormation [BiLambda (FnSymbol 3)]) (ExFormation [BiLambda (Function "L_three")]) 5 `shouldBe` Right (ExFormation [BiLambda (Function "L_three")], [], Nothing, 5)+    it "takes the left side for a bare symbol on the right" $+      joined (ExFormation [BiDelta (BtOne "01")]) (ExFormation [BiLambda (FnSymbol 8)]) 5 `shouldBe` Right (ExFormation [BiDelta (BtOne "01")], [], Nothing, 5)+    it "pairs two bare symbols rather than taking either" $+      joined (ExFormation [BiLambda (FnSymbol 2)]) (ExFormation [BiLambda (FnSymbol 3)]) 5 `shouldBe` Right (ExFormation [BiLambda (FnSymbol 6)], [(6, (2, 3))], Nothing, 6)+    it "joins a bare symbol with a bottom rather than taking the bottom" $+      joined (ExFormation [BiLambda (FnSymbol 2)]) ExTermination 5 `shouldBe` Right (ExFormation [BiLambda (FnSymbol 7)], [(7, (2, 6))], Just 6, 7)+    it "tells the λ of a symbol held beside another binding and a function" $+      joined (ExFormation [BiTau (AtLabel "k") (ExFormation []), BiLambda (FnSymbol 3)]) (ExFormation [BiTau (AtLabel "k") (ExFormation []), BiLambda (Function "L_three")]) 5 `shouldBe` Left [AtLambda]     it "tells no attribute of two dispatches of two attributes" $       joined (ExDispatch (application [3]) (AtLabel "a")) (ExDispatch (application [8]) (AtLabel "b")) 9 `shouldBe` Left []     it "tells no attribute inside an application whose arguments differ" $@@ -94,18 +102,18 @@       expected <- parseExpressionThrows "⟦ left🌵 ↦ ⟦ ρ ↦ Φ.ji, φ ↦ Φ.wo ⟧, right🌵 ↦ ⟦ ρ ↦ Φ.sa, φ ↦ Φ.pl ⟧, φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_ef, on🌵 ↦ ⟦ Δ ⤍ 0A- ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"       fork "L_ef" (Right (BtOne "0A")) "⟦ ρ ↦ Φ.ji, φ ↦ Φ.wo ⟧" "⟦ ρ ↦ Φ.sa, φ ↦ Φ.pl ⟧" >>= (`shouldBe` Right expected)     it "takes every void of both sides as a void of its own and applies each side to its voids" $ do-      expected <- parseExpressionThrows "⟦ tu ↦ ∅, os ↦ ∅, left🌵 ↦ ⟦ φ ↦ Φ.km( ξ.tu ), tu ↦ ∅ ⟧( tu ↦ ξ.tu ), right🌵 ↦ ⟦ φ ↦ Φ.wb( ξ.os ), os ↦ ∅ ⟧( os ↦ ξ.os ), φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_gi, on🌵 ↦ ⟦ Δ ⤍ 6D- ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"-      fork "L_gi" (Right (BtOne "6D")) "⟦ φ ↦ Φ.km( ξ.tu ), tu ↦ ∅ ⟧" "⟦ φ ↦ Φ.wb( ξ.os ), os ↦ ∅ ⟧" >>= (`shouldBe` Right expected)+      expected <- parseExpressionThrows "⟦ tu ↦ ∅, os ↦ ∅, left🌵 ↦ ⟦ φ ↦ Φ.km( za ↦ ξ.tu ), tu ↦ ∅ ⟧( tu ↦ ξ.tu ), right🌵 ↦ ⟦ φ ↦ Φ.wb( ne ↦ ξ.os ), os ↦ ∅ ⟧( os ↦ ξ.os ), φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_gi, on🌵 ↦ ⟦ Δ ⤍ 6D- ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"+      fork "L_gi" (Right (BtOne "6D")) "⟦ φ ↦ Φ.km( za ↦ ξ.tu ), tu ↦ ∅ ⟧" "⟦ φ ↦ Φ.wb( ne ↦ ξ.os ), os ↦ ∅ ⟧" >>= (`shouldBe` Right expected)     it "applies a side binding its ρ to its voids and keeps that ρ" $ do-      expected <- parseExpressionThrows "⟦ pe ↦ ∅, left🌵 ↦ ⟦ ρ ↦ Φ.ov, φ ↦ Φ.ha( ξ.pe ), pe ↦ ∅ ⟧( pe ↦ ξ.pe ), right🌵 ↦ ⟦ φ ↦ Φ.ix ⟧, φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_dz, on🌵 ↦ ⟦ Δ ⤍ 44- ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"-      fork "L_dz" (Right (BtOne "44")) "⟦ ρ ↦ Φ.ov, φ ↦ Φ.ha( ξ.pe ), pe ↦ ∅ ⟧" "⟦ φ ↦ Φ.ix ⟧" >>= (`shouldBe` Right expected)+      expected <- parseExpressionThrows "⟦ pe ↦ ∅, left🌵 ↦ ⟦ ρ ↦ Φ.ov, φ ↦ Φ.ha( li ↦ ξ.pe ), pe ↦ ∅ ⟧( pe ↦ ξ.pe ), right🌵 ↦ ⟦ φ ↦ Φ.ix ⟧, φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_dz, on🌵 ↦ ⟦ Δ ⤍ 44- ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"+      fork "L_dz" (Right (BtOne "44")) "⟦ ρ ↦ Φ.ov, φ ↦ Φ.ha( li ↦ ξ.pe ), pe ↦ ∅ ⟧" "⟦ φ ↦ Φ.ix ⟧" >>= (`shouldBe` Right expected)     it "keeps one void for an attribute both sides leave void" $ do       expected <- parseExpressionThrows "⟦ dk ↦ ∅, left🌵 ↦ ⟦ dk ↦ ∅, φ ↦ Φ.ic ⟧( dk ↦ ξ.dk ), right🌵 ↦ ⟦ φ ↦ Φ.yo, dk ↦ ∅ ⟧( dk ↦ ξ.dk ), φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_vb, on🌵 ↦ ⟦ Δ ⤍ 3E- ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"       fork "L_vb" (Right (BtOne "3E")) "⟦ dk ↦ ∅, φ ↦ Φ.ic ⟧" "⟦ φ ↦ Φ.yo, dk ↦ ∅ ⟧" >>= (`shouldBe` Right expected)     it "tells that the left side leaves void an attribute the right side binds" $       fork "L_oh" (Right (BtOne "52")) "⟦ ws ↦ ∅ ⟧" "⟦ ws ↦ Φ.ug ⟧" >>= (`shouldBe` Left (Unripe Lefthand (AtLabel "ws")))     it "tells that the right side leaves void an attribute the left side binds" $-      fork "L_yk" (Left 17) "⟦ φ ↦ Φ.di, ob ↦ ⟦ ⟧ ⟧" "⟦ ob ↦ ∅, φ ↦ Φ.ru( ξ.ob ) ⟧" >>= (`shouldBe` Left (Unripe Righthand (AtLabel "ob")))+      fork "L_yk" (Left 17) "⟦ φ ↦ Φ.di, ob ↦ ⟦ ⟧ ⟧" "⟦ ob ↦ ∅, φ ↦ Φ.ru( fa ↦ ξ.ob ) ⟧" >>= (`shouldBe` Left (Unripe Righthand (AtLabel "ob")))     it "tells about a void of the left side before a void of the right side" $       fork "L_ze" (Right (BtOne "6A")) "⟦ ma ↦ Φ.pi, iv ↦ ∅ ⟧" "⟦ ma ↦ ∅, iv ↦ Φ.go ⟧" >>= (`shouldBe` Left (Unripe Lefthand (AtLabel "iv")))     it "fabricates a formation of a side leaving its ρ void and a side binding it" $ do@@ -115,8 +123,8 @@       expected <- parseExpressionThrows "⟦ left🌵 ↦ ⟦ left🌵 ↦ Φ.ub, rq🌵 ↦ ∅, φ ↦ Φ.ar ⟧, right🌵 ↦ ⟦ φ ↦ Φ.se ⟧, φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_hn, on🌵 ↦ ⟦ Δ ⤍ 19- ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"       fork "L_hn" (Right (BtOne "19")) "⟦ left🌵 ↦ Φ.ub, rq🌵 ↦ ∅, φ ↦ Φ.ar ⟧" "⟦ φ ↦ Φ.se ⟧" >>= (`shouldBe` Right expected)     it "binds the condition to the symbol it came down to, not to the bytes of that symbol" $ do-      expected <- parseExpressionThrows "⟦ left🌵 ↦ ⟦ φ ↦ Φ.re ⟧, right🌵 ↦ ⟦ φ ↦ Φ.dy( Φ.ka ) ⟧, φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_uo, on🌵 ↦ ⟦ λ ⤍ 𝜎37 ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"-      fork "L_uo" (Left 37) "⟦ φ ↦ Φ.re ⟧" "⟦ φ ↦ Φ.dy( Φ.ka ) ⟧" >>= (`shouldBe` Right expected)+      expected <- parseExpressionThrows "⟦ left🌵 ↦ ⟦ φ ↦ Φ.re ⟧, right🌵 ↦ ⟦ φ ↦ Φ.dy( to ↦ Φ.ka ) ⟧, φ ↦ ⟦ ρ ↦ ∅, λ ⤍ L_uo, on🌵 ↦ ⟦ λ ⤍ 𝜎37 ⟧, left🌵 ↦ ξ.ρ.left🌵.φ, right🌵 ↦ ξ.ρ.right🌵.φ ⟧ ⟧"+      fork "L_uo" (Left 37) "⟦ φ ↦ Φ.re ⟧" "⟦ φ ↦ Φ.dy( to ↦ Φ.ka ) ⟧" >>= (`shouldBe` Right expected)     it "takes as voids of a copy of the function the voids of the formations both sides bind its attribute to" $ do       expected <- parseExpressionThrows "⟦ left🌵 ↦ ⟦ ke ↦ ⟦ ix ↦ ∅, φ ↦ Φ.qa ⟧ ⟧, right🌵 ↦ ⟦ ke ↦ ⟦ φ ↦ Φ.vu, ow ↦ ∅ ⟧ ⟧, ke ↦ ⟦ ρ ↦ ∅, λ ⤍ L_bj, ix ↦ ∅, ow ↦ ∅, on🌵 ↦ ⟦ Δ ⤍ 5E- ⟧, left🌵 ↦ ξ.ρ.left🌵.ke( ix ↦ ξ.ix ), right🌵 ↦ ξ.ρ.right🌵.ke( ow ↦ ξ.ow ) ⟧ ⟧"       fork "L_bj" (Right (BtOne "5E")) "⟦ ke ↦ ⟦ ix ↦ ∅, φ ↦ Φ.qa ⟧ ⟧" "⟦ ke ↦ ⟦ φ ↦ Φ.vu, ow ↦ ∅ ⟧ ⟧" >>= (`shouldBe` Right expected)@@ -164,7 +172,7 @@     it "tells that the left side has a λ function" $       fork "L_cz" (Right (BtOne "07")) "⟦ λ ⤍ L_kp, φ ↦ Φ.ev ⟧" "⟦ φ ↦ Φ.ni ⟧" >>= (`shouldBe` Left (Holding Lefthand AtLambda))     it "tells that the right side has a λ when it is a bare symbol" $-      fork "L_wq" (Left 83) "⟦ φ ↦ Φ.ju( ξ.zi ), zi ↦ Φ.ko ⟧" "⟦ λ ⤍ 𝜎329 ⟧" >>= (`shouldBe` Left (Holding Righthand AtLambda))+      fork "L_wq" (Left 83) "⟦ φ ↦ Φ.ju( ce ↦ ξ.zi ), zi ↦ Φ.ko ⟧" "⟦ λ ⤍ 𝜎329 ⟧" >>= (`shouldBe` Left (Holding Righthand AtLambda))     it "tells that the right side is no formation" $       fork "L_rt" (Right (BtOne "2D")) "⟦ φ ↦ Φ.mo ⟧" "Φ.gl.fy" >>= (`shouldBe` Left (Unformed Righthand))     it "tells about the left side before the right one" $
test/Grown.hs view
@@ -43,9 +43,7 @@       spelled (ExApplication (DataString _) (ArTau AtRho _)) = False       spelled _ = True       argument :: Int -> Gen Argument-      argument depth = frequency [(3, ArTau <$> attribute <*> expression (depth - 1)), (2, ArAlpha <$> alpha <*> expression (depth - 1))]-      alpha :: Gen Alpha-      alpha = frequency [(4, Alpha <$> chooseInt (0, 3)), (1, AlMeta <$> meta "i")]+      argument depth = ArTau <$> attribute <*> expression (depth - 1)       bindings :: Int -> Gen [Binding]       bindings depth = do         attrs <- nub <$> (chooseInt (0, 4) >>= (`vectorOf` attribute))@@ -81,7 +79,5 @@       binding _ = []       held :: Argument -> Expression       held (ArTau _ inner) = inner-      held (ArAlpha _ inner) = inner       argued :: Argument -> [Argument]       argued (ArTau attr inner) = ArTau attr <$> smaller inner-      argued (ArAlpha idx inner) = ArAlpha idx <$> smaller inner
test/LaTeXSpec.hs view
@@ -155,7 +155,7 @@       )      it "renders a non-finite double as a piped dispatch off the root" $ do-      nan <- parseExpressionThrows "[[ x -> Q.number(Q.bytes([[ D> 7F-F8-00-00-00-00-00-00 ]])) ]]"+      nan <- parseExpressionThrows "[[ x -> Q.number(@ -> Q.bytes(@ -> [[ D> 7F-F8-00-00-00-00-00-00 ]])) ]]"       expressionToLaTeX nan defaultLatexContext         `shouldBe` "\\begin{phiquation}\nQ . |nan| : |x|{.}\n\\end{phiquation}" 
test/LambdasSpec.hs view
@@ -542,8 +542,8 @@       stayed term `shouldBe` kept      it "drops every ρ a chain of applications gives a dispatch" $ do-      term <- parseExpressionThrows "ξ.f( ρ ↦ ⟦ a ↦ ∅ ⟧ )( α0 ↦ ⟦⟧ )( ρ ↦ ⟦ b ↦ ∅ ⟧ )"-      kept <- parseExpressionThrows "ξ.f( α0 ↦ ⟦⟧ )"+      term <- parseExpressionThrows "ξ.f( ρ ↦ ⟦ a ↦ ∅ ⟧ )( uz ↦ ⟦⟧ )( ρ ↦ ⟦ b ↦ ∅ ⟧ )"+      kept <- parseExpressionThrows "ξ.f( uz ↦ ⟦⟧ )"       stayed term `shouldBe` kept      it "keeps the ρ a formation is applied to" $ do@@ -634,8 +634,8 @@       made `shouldBe` expected      it "rewrites a term a rule matches inside the argument of an application" $ do-      made <- rewrote [("Φ.true", "Φ.bool( if ↦ ⟦ Δ ⤍ 01- ⟧ )")] "Φ.jq( α0 ↦ Φ.true )"-      expected <- parseExpressionThrows "Φ.jq( α0 ↦ Φ.bool( if ↦ ⟦ Δ ⤍ 01- ⟧ ) )"+      made <- rewrote [("Φ.true", "Φ.bool( if ↦ ⟦ Δ ⤍ 01- ⟧ )")] "Φ.jq( ho ↦ Φ.true )"+      expected <- parseExpressionThrows "Φ.jq( ho ↦ Φ.bool( if ↦ ⟦ Δ ⤍ 01- ⟧ ) )"       made `shouldBe` expected      it "rewrites every place a rule matches inside a formation" $ do@@ -644,7 +644,7 @@       made `shouldBe` expected      it "binds the metas of the pattern in the result" $ do-      made <- rewrote [("Φ.flag( α0 ↦ 𝑒1 )", "Φ.bool( if ↦ 𝑒1 )")] "Φ.flag( α0 ↦ ⟦ λ ⤍ 𝜎6 ⟧ )"+      made <- rewrote [("Φ.flag( on ↦ 𝑒1 )", "Φ.bool( if ↦ 𝑒1 )")] "Φ.flag( on ↦ ⟦ λ ⤍ 𝜎6 ⟧ )"       expected <- parseExpressionThrows "Φ.bool( if ↦ ⟦ λ ⤍ 𝜎6 ⟧ )"       made `shouldBe` expected @@ -669,8 +669,8 @@       made `shouldBe` expected      it "keeps a term no rule matches" $ do-      term <- parseExpressionThrows "Φ.false( α0 ↦ ⟦ Δ ⤍ 2E- ⟧ )"-      made <- rewrote [("Φ.true", "Φ.vw")] "Φ.false( α0 ↦ ⟦ Δ ⤍ 2E- ⟧ )"+      term <- parseExpressionThrows "Φ.false( ev ↦ ⟦ Δ ⤍ 2E- ⟧ )"+      made <- rewrote [("Φ.true", "Φ.vw")] "Φ.false( ev ↦ ⟦ Δ ⤍ 2E- ⟧ )"       made `shouldBe` term      it "hands back the very term no rule matches, so a shared term stays shared" $ do@@ -694,7 +694,7 @@       (\(_, _, spent) -> spent) (symbolized term 11) `shouldBe` 12      it "leaves a term holding no datum as it is" $ do-      term <- parseExpressionThrows "⟦ φ ↦ Φ.wert( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ).zahl, λ ⤍ L_kern, tief ↦ ξ.ρ.q( α0 ↦ ξ.w ) ⟧"+      term <- parseExpressionThrows "⟦ φ ↦ Φ.wert( φ ↦ ⟦ λ ⤍ 𝜎5 ⟧ ).zahl, λ ⤍ L_kern, tief ↦ ξ.ρ.q( am ↦ ξ.w ) ⟧"       symbolized term 5 `shouldBe` (term, [], 5)      it "keeps the bindings beside the datum it turned into a symbol" $ do@@ -726,7 +726,7 @@       (\(made, _, _) -> made) (symbolized term 9) `shouldBe` term      it "mints no symbol for a constant the method of a number holds" $ do-      term <- parseExpressionThrows "⟦ φ ↦ Φ.bytes( φ ↦ ⟦ Δ ⤍ 40-45-00-00-00-00-00-00 ⟧ ), abs ↦ ⟦ φ ↦ ξ.ρ.lt( Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ Δ ⤍ 00-00-00-00-00-00-00-00 ⟧ ) ) ) ⟧ ⟧"+      term <- parseExpressionThrows "⟦ φ ↦ Φ.bytes( φ ↦ ⟦ Δ ⤍ 40-45-00-00-00-00-00-00 ⟧ ), abs ↦ ⟦ φ ↦ ξ.ρ.lt( x ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ Δ ⤍ 00-00-00-00-00-00-00-00 ⟧ ) ) ) ⟧ ⟧"       (\(_, known, _) -> known) (symbolized term 603) `shouldBe` [(604, BtMany ["40", "45", "00", "00", "00", "00", "00", "00"])]      it "turns the datum the ρ of an atom binds into a fresh symbol" $ do@@ -744,9 +744,9 @@       masked <- parseExpressionThrows "Φ.f( q ↦ ⟦ λ ⤍ 𝜎4 ⟧ )"       (\(made, _, _) -> made) (symbolized term 3) `shouldBe` masked -    it "turns the datum a positional argument holds into a fresh symbol" $ do-      term <- parseExpressionThrows "Φ.vk( α0 ↦ ⟦ Δ ⤍ 5B- ⟧ )"-      masked <- parseExpressionThrows "Φ.vk( α0 ↦ ⟦ λ ⤍ 𝜎14 ⟧ )"+    it "turns the datum an argument holds into a fresh symbol" $ do+      term <- parseExpressionThrows "Φ.vk( ry ↦ ⟦ Δ ⤍ 5B- ⟧ )"+      masked <- parseExpressionThrows "Φ.vk( ry ↦ ⟦ λ ⤍ 𝜎14 ⟧ )"       (\(made, _, _) -> made) (symbolized term 13) `shouldBe` masked      it "walks the target of a dispatch down to the datum" $ do
test/LiningSpec.hs view
@@ -103,11 +103,6 @@         , PA_TAU (AT_LABEL "x") ARROW singlelineFormation         )       ,-        ( "recurses through PA_ALPHA"-        , PA_ALPHA (AL_IDX ALPHA 0) ARROW multilineFormation-        , PA_ALPHA (AL_IDX ALPHA 0) ARROW singlelineFormation-        )-      ,         ( "recurses through PA_FORMATION"         , PA_FORMATION (AT_LABEL "x") [AT_RHO RHO] ARROW multilineFormation         , PA_FORMATION (AT_LABEL "x") [AT_RHO RHO] ARROW singlelineFormation@@ -129,31 +124,9 @@         , AA_TAU (APP_BINDING (PA_TAU (AT_LABEL "x") ARROW singlelineFormation))         )       , ("recurses through AA_TAUS", AA_TAUS biPair, AA_TAUS expectedBiPair)-      ,-        ( "recurses through AA_EXPRS"-        , AA_EXPRS (APP_ARG multilineFormation AAS_EMPTY)-        , AA_EXPRS (APP_ARG singlelineFormation AAS_EMPTY)-        )       ]       (\(desc, node, expected) -> it desc (toSingleLine node `shouldBe` expected)) -  describe "toSingleLine on APP_ARG" $-    it "recurses through both fields" $ do-      let appArg = APP_ARG multilineFormation (AAS_EXPR EOL (TAB 1) leafExpr AAS_EMPTY)-          expected = APP_ARG singlelineFormation (AAS_EXPR NO_EOL TAB' leafExpr AAS_EMPTY)-      toSingleLine appArg `shouldBe` expected--  describe "toSingleLine on APP_ARGS" $-    forM_-      [-        ( "recurses through AAS_EXPR"-        , AAS_EXPR EOL (TAB 1) multilineFormation AAS_EMPTY-        , AAS_EXPR NO_EOL TAB' singlelineFormation AAS_EMPTY-        )-      , ("leaves AAS_EMPTY untouched", AAS_EMPTY, AAS_EMPTY)-      ]-      (\(desc, node, expected) -> it desc (toSingleLine node `shouldBe` expected))-   describe "toSingleLine on SET" $     forM_       [ ("recurses through ST_BINDING", ST_BINDING biPair, ST_BINDING expectedBiPair)@@ -162,17 +135,11 @@       (\(desc, node, expected) -> it desc (toSingleLine node `shouldBe` expected))    describe "toSingleLine on NUMBER" $ do-    forM_-      [ ("recurses through LENGTH", LENGTH biPair, LENGTH expectedBiPair)-      , ("recurses through DOMAIN", DOMAIN biPair, DOMAIN expectedBiPair)-      ]-      (\(desc, node, expected) -> it desc (toSingleLine node `shouldBe` expected))+    it "recurses through LENGTH" $+      toSingleLine (LENGTH biPair) `shouldBe` LENGTH expectedBiPair -    it "leaves IDX_META and LITERAL untouched" $ do-      let idxMeta = IDX_META (META NO_EXCL I "x")-          literalNum = LITERAL 5-      toSingleLine idxMeta `shouldBe` idxMeta-      toSingleLine literalNum `shouldBe` literalNum+    it "leaves LITERAL untouched" $+      toSingleLine (LITERAL 5) `shouldBe` LITERAL 5    describe "toSingleLine on COMPARABLE" $     forM_
test/MarginSpec.hs view
@@ -109,7 +109,7 @@       let leaf = EX_GLOBAL Φ           nested = iterate call leaf !! 10000           call :: EXPRESSION -> EXPRESSION-          call inner = EX_APPLICATION inner NO_SPACE EOL (TAB 1) (AA_EXPRS (APP_ARG leaf AAS_EMPTY)) EOL (TAB 0) 1+          call inner = EX_APPLICATION inner NO_SPACE EOL (TAB 1) (AA_TAUS (BI_PAIR (PA_TAU (AT_LABEL "x") ARROW leaf) (BDS_EMPTY NO_TAB) NO_TAB)) EOL (TAB 0) 1       result <- timeout 5000000 (evaluate (T.count "(" (render (withMargin 80 nested))))       result `shouldBe` Just 10000 @@ -176,31 +176,17 @@       ]       (\(desc, margin, expression, expected) -> it desc (render (withMargin margin (expressionToCST expression)) `shouldBe` expected)) -  describe "withMargin on positional (AA_EXPRS) application arguments" $-    forM_-      [ (100, "Φ.x( ⟦ aVeryLongAttributeNameThatWontFitOnOneLine ↦ Φ, ρ ↦ Φ ⟧ )")-      ,-        ( 1-        , "Φ.x(\n  ⟦\n    aVeryLongAttributeNameThatWontFitOnOneLine ↦ Φ,\n    ρ ↦ Φ\n  ⟧\n)"-        )-      ]-      ( \(margin, expected) ->-          it ("margin " ++ show margin) $-            let ex = ExApplication (ExDispatch ExRoot (AtLabel "x")) (ArAlpha (Alpha 0) (ExFormation [BiTau bigLabel ExRoot, BiTau AtRho ExRoot]))-             in render (withMargin margin (expressionToCST ex)) `shouldBe` expected-      )--  describe "withMargin on mixed tau/alpha (AA_TAUS with PA_ALPHA) application arguments" $+  describe "withMargin on several application arguments" $     forM_-      [ (100, "Φ.x( a ↦ Φ, α5 ↦ ⟦ aVeryLongAttributeNameThatWontFitOnOneLine ↦ Φ, ρ ↦ Φ ⟧ )")+      [ (100, "Φ.x( a ↦ Φ, bq ↦ ⟦ aVeryLongAttributeNameThatWontFitOnOneLine ↦ Φ, ρ ↦ Φ ⟧ )")       ,         ( 1-        , "Φ.x(\n  a ↦ Φ,\n  α5 ↦ ⟦\n    aVeryLongAttributeNameThatWontFitOnOneLine ↦ Φ,\n    ρ ↦ Φ\n  ⟧\n)"+        , "Φ.x(\n  a ↦ Φ,\n  bq ↦ ⟦\n    aVeryLongAttributeNameThatWontFitOnOneLine ↦ Φ,\n    ρ ↦ Φ\n  ⟧\n)"         )       ]       ( \(margin, expected) ->           it ("margin " ++ show margin) $-            let ex = ExApplication (ExApplication (ExDispatch ExRoot (AtLabel "x")) (ArTau (AtLabel "a") ExRoot)) (ArAlpha (Alpha 5) bigFormation)+            let ex = ExApplication (ExApplication (ExDispatch ExRoot (AtLabel "x")) (ArTau (AtLabel "a") ExRoot)) (ArTau (AtLabel "bq") bigFormation)              in render (withMargin margin (expressionToCST ex)) `shouldBe` expected       ) 
test/MatcherSpec.hs view
@@ -154,15 +154,6 @@           it desc $ matchAttribute ptn tgt `shouldBe` expected       ) -  describe "matchAlpha: alpha => alpha => substitution" $-    forM_-      [ ("α1 => α1 => [()]", Alpha 1, Alpha 1, substs [[]])-      , ("α0 => α1 => []", Alpha 0, Alpha 1, substs [])-      ]-      ( \(desc, ptn, tgt, expected) ->-          it desc $ matchAlpha ptn tgt `shouldBe` expected-      )-   describe "matchFunction: function => function => substitution" $     forM_       [ ("!f => Func => [(!f >> Func)]", FnMeta "f", Function "Func", substs [[("f", MvFunction (Function "Func"))]])@@ -637,7 +628,7 @@         `shouldBe` []   describe "hits" $ do     it "finds every rule matching deep inside the term in the order one walk meets them" $-      hits [(7, False, \_ expr -> [() | ExTermination <- [expr]]), (3, False, \_ expr -> [() | ExRoot <- [expr]]), (5, False, \_ expr -> [() | ExXi <- [expr]])] Nothing (ExDispatch (ExApplication ExXi (ArAlpha (Alpha 2) ExTermination)) (AtLabel "y"))+      hits [(7, False, \_ expr -> [() | ExTermination <- [expr]]), (3, False, \_ expr -> [() | ExRoot <- [expr]]), (5, False, \_ expr -> [() | ExXi <- [expr]])] Nothing (ExDispatch (ExApplication ExXi (ArTau (AtLabel "zw") ExTermination)) (AtLabel "y"))         `shouldBe` [5, 7]     it "never asks a rule that is a redex inside an inert term" $       hits [(4, True, \_ expr -> [() | ExXi <- [expr]]), (9, False, \_ expr -> [() | ExXi <- [expr]])] Nothing (ExFormation [BiTau (AtLabel "zk") ExXi])
test/MorphSpec.hs view
@@ -21,7 +21,7 @@ import Data.Text qualified as T import Data.Yaml qualified as Decode import Dataize (Outcome (..), dataize)-import Deps (Acyclic (..), Evaluation (EvLooped, EvMorphed, EvNormalized, EvRecalled, EvWorld), Judgment (..), State, Term (TeExpression))+import Deps (Acyclic (..), Duration (..), Evaluation (EvLooped, EvMorphed, EvNormalized, EvRecalled, EvWorld), Judgment (..), State, Term (TeExpression)) import Engine (Engine (_normal)) import Files (allPathsIn) import Fixtures (defaultReduceContext, fixtureLambdas, linked, overdue, primitives)@@ -175,12 +175,6 @@         , ExTermination         )       ,-        ( "[[ ^ -> ? ]](α0 -> $.foo) => T"-        , ExApplication (ExFormation [BiVoid AtRho]) (ArAlpha (Alpha 0) (ExDispatch ExXi (AtLabel "foo")))-        , ExRoot-        , ExTermination-        )-      ,         ( "Q => [[]] (a universe distinct from Φ) => [[]]"         , ExRoot         , ExFormation []@@ -308,7 +302,7 @@       let formation :: Expression -> Int -> Expression           formation base depth = ExFormation [BiTau (AtLabel "x") (iterate (`ExDispatch` AtLabel "w") base !! depth), BiTau AtPhi ExRoot]       base <- defaultReduceContext ExRoot-      ctx <- enter (formation ExRoot 1300) base{_acyclic = Just Plausible, _deadline = Just (Deadline 31 due)}+      ctx <- enter (formation ExRoot 1300) base{_acyclic = Just Plausible, _deadline = Just (Deadline (Duration "31" 31) due)}       timeout 10000000 (enter (formation ExXi 1700) ctx)         `shouldThrow` (\e -> "--max-seconds=31" `isInfixOf` show (e :: SomeException)) @@ -358,7 +352,7 @@       base <- defaultReduceContext ExRoot       noted base{_facts = Just facts} wide (ExDispatch ExRoot (AtLabel "cq"))       due <- (+ 2) <$> getMonotonicTime-      ctx <- enter looping base{_acyclic = Just Plausible, _maxLoops = 0, _facts = Just facts, _reckoning = True, _deadline = Just (Deadline 43 due), _saveEval = \record -> modifyIORef' told (record :)}+      ctx <- enter looping base{_acyclic = Just Plausible, _maxLoops = 0, _facts = Just facts, _reckoning = True, _deadline = Just (Deadline (Duration "43" 43) due), _saveEval = \record -> modifyIORef' told (record :)}       _ <- timeout 10000000 (fired ExRoot ctx ExRoot emptyState looping)       records <- readIORef told       [answered | EvLooped _ _ _ _ _ (Just (_, answered)) <- records] `shouldBe` [Just (ExDispatch (ExDispatch ExRoot (AtLabel "cq")) (AtLabel "kq"))]
test/ParserSpec.hs view
@@ -60,14 +60,14 @@       , ("Q.!t1", Just (ExDispatch ExRoot (AtMeta "t1")))       , ("[[]](!t1 -> $)", Just (ExApplication (ExFormation []) (ArTau (AtMeta "t1") ExXi)))       ,-        ( "[[]](~0 -> $)(~11 -> Q)"+        ( "[[]](x -> $)(yy -> Q)"         , Just             ( ExApplication                 ( ExApplication                     (ExFormation [])-                    (ArAlpha (Alpha 0) ExXi)+                    (ArTau (AtLabel "x") ExXi)                 )-                (ArAlpha (Alpha 11) ExRoot)+                (ArTau (AtLabel "yy") ExRoot)             )         )       , ("[[]](x -> $, y -> Q)", Just (ExApplication (ExApplication (ExFormation []) (ArTau (AtLabel "x") ExXi)) (ArTau (AtLabel "y") ExRoot)))@@ -125,45 +125,45 @@             )         )       ,-        ( "Q.x(y, [[]].z, Q.y(^,@))"+        ( "Q.x(a -> y, b -> [[]].z, c -> Q.y(d -> ^, e -> @))"         , Just             ( ExApplication                 ( ExApplication                     ( ExApplication                         (ExDispatch ExRoot (AtLabel "x"))-                        (ArAlpha (Alpha 0) (ExDispatch ExXi (AtLabel "y")))+                        (ArTau (AtLabel "a") (ExDispatch ExXi (AtLabel "y")))                     )-                    (ArAlpha (Alpha 1) (ExDispatch (ExFormation []) (AtLabel "z")))+                    (ArTau (AtLabel "b") (ExDispatch (ExFormation []) (AtLabel "z")))                 )-                ( ArAlpha-                    (Alpha 2)+                ( ArTau+                    (AtLabel "c")                     ( ExApplication                         ( ExApplication                             (ExDispatch ExRoot (AtLabel "y"))-                            (ArAlpha (Alpha 0) (ExDispatch ExXi AtRho))+                            (ArTau (AtLabel "d") (ExDispatch ExXi AtRho))                         )-                        (ArAlpha (Alpha 1) (ExDispatch ExXi AtPhi))+                        (ArTau (AtLabel "e") (ExDispatch ExXi AtPhi))                     )                 )             )         )       ,-        ( "5.plus(5.q(\"hello\".length))"+        ( "5.plus(x -> 5.q(y -> \"hello\".length))"         , Just             ( ExApplication                 ( ExDispatch                     (DataNumber (BtMany ["40", "14", "00", "00", "00", "00", "00", "00"]))                     (AtLabel "plus")                 )-                ( ArAlpha-                    (Alpha 0)+                ( ArTau+                    (AtLabel "x")                     ( ExApplication                         ( ExDispatch                             (DataNumber (BtMany ["40", "14", "00", "00", "00", "00", "00", "00"]))                             (AtLabel "q")                         )-                        ( ArAlpha-                            (Alpha 0)+                        ( ArTau+                            (AtLabel "y")                             ( ExDispatch                                 (DataString (BtMany ["68", "65", "6C", "6C", "6F"]))                                 (AtLabel "length")@@ -192,9 +192,9 @@       , "Q.x.^.@.!t1"       , "[[x -> y.z]]"       , "[[x -> ^, y -> @, z -> !t]]"-      , "Q.x(a.b.c, Q.a(b), [[]])"-      , "Q.x(y, [[]].z, Q.y(^,@))"-      , "[[x -> 5.plus(5), y -> \"hello\", z -> 42.5]]"+      , "Q.x(u -> a.b.c, v -> Q.a(w -> b), z -> [[]])"+      , "Q.x(a -> y, b -> [[]].z, c -> Q.y(d -> ^, e -> @))"+      , "[[x -> 5.plus(x -> 5), y -> \"hello\", z -> 42.5]]"       , "[[\n  x -> \"Hi\",\n  y -> 42\n]]"       , "[[x -> -42, y -> +34]]"       , "⟦x ↦ Φ.org.eolang(z ↦ ξ.f, φ ↦ ρ, t ↦ φ, first ↦ ⟦ λ ⤍ Function_name, Δ ⤍ 42- ⟧)⟧"@@ -203,7 +203,7 @@       , "[[ x -> \"\\uD835\\uDF11\"]]"       , "[[ x ↦ \"This plugin has \\x01\\x01\" ]]"       , "[[ !tfoo -> !e1Some, !t-BAR -> !e_123someW, !Bhi123 ]]"-      , "[[ !B ]](α𝑖 -> !e)"+      , "[[ !B ]](𝜏 -> !e)"       , "[[ 𝜏 -> !e, 𝐵 ]]"       , "Q(x -> [[]])"       , "$(x -> [[]])"@@ -260,9 +260,35 @@       parseExpression       [ ("⟦ a ↦ Φ.foo( x ↦ 1, y ↦ ) ⟧", "expression:1:25:")       , ("⟦ a ↦ Φ.foo( x ↦ 1, 2 ) ⟧", "expression:1:21:")-      , ("⟦\n  app ↦ Φ.io.stdout(\n    text ↦ Φ.string(\n      ⟦ Δ ⤍ 48-65-6C-6C-6F ⟧\n    ),\n    size ↦ Φ.number( ⟦ Δ ⤍ 40-14-00-00-00-00-00-00 ⟧,\n    mode ↦ ⟦⟧\n  )\n⟧", "expression:7:10:")+      , ("⟦\n  app ↦ Φ.io.stdout(\n    text ↦ Φ.string(\n      φ ↦ ⟦ Δ ⤍ 48-65-6C-6C-6F ⟧\n    ),\n    size ↦ Φ.number( φ ↦ ⟦ Δ ⤍ 40-14-00-00-00-00-00-00 ⟧,\n    mode ↦ ⟦⟧\n  )\n⟧", "expression:9:1:")       ] +  describe "refuses an argument given by its position" $+    fails+      parseExpression+      ( map+          (\input -> (input, "since a positional one, 'α0 ↦ …' or 'f( … )', is not supported"))+          [ "Q.x(α0 ↦ Q)"+          , "Q.x(~0 -> Q)"+          , "Q.x(~1 -> Q.y, x -> 5)"+          , "Q.x(x -> 5, ~1 -> Q.y)"+          , "Q.x(α𝑖1 ↦ Q)"+          , "Q.x(~!i1 -> Q)"+          , "Q.x(Q.y)"+          , "Q.x(Q.y, Q.z)"+          , "Q.x(k -> Q.y, Q.z)"+          , "5.plus(6)"+          , "\"hi\".concat(\"there\")"+          , "[[ x -> ? ]](~0 -> [[]])"+          , "Q.number(Q.bytes([[ D> 40-14-00-00-00-00-00-00 ]]))"+          ]+      )++  describe "refuses a meta of an index" $+    forM_+      ["𝑖1", "!i1", "Q.x(𝑖1 -> Q)", "[[ x -> !i ]]"]+      (\expr -> it expr (parseExpression expr `shouldSatisfy` isLeft))+   describe "tells what a binding prefix may be followed by" $     fails       parseExpression@@ -279,7 +305,6 @@       , ("[[ !t0 -> Q ]]", "indexed with zero")       , ("[[ D> 𝛿0 ]]", "indexed with zero")       , ("[[ λ ⤍ 𝜎0 ]]", "indexed with zero")-      , ("[[ !B ]](α𝑖0 -> !e)", "indexed with zero")       ]    describe "parse packs" $ do@@ -563,14 +588,14 @@   describe "parse applications with mixed bindings" $     test       parseExpression-      [ ("[[]](Q)", Just (ExApplication (ExFormation []) (ArAlpha (Alpha 0) ExRoot)))-      , ("[[]](Q, T)", Just (ExApplication (ExApplication (ExFormation []) (ArAlpha (Alpha 0) ExRoot)) (ArAlpha (Alpha 1) ExTermination)))+      [ ("[[]](k -> Q)", Just (ExApplication (ExFormation []) (ArTau (AtLabel "k") ExRoot)))+      , ("[[]](k -> Q, m -> T)", Just (ExApplication (ExApplication (ExFormation []) (ArTau (AtLabel "k") ExRoot)) (ArTau (AtLabel "m") ExTermination)))       , ("Q.x(y -> $)", Just (ExApplication (ExDispatch ExRoot (AtLabel "x")) (ArTau (AtLabel "y") ExXi)))-      , ("[[x -> ?]].x(Q)", Just (ExApplication (ExDispatch (ExFormation [BiVoid (AtLabel "x")]) (AtLabel "x")) (ArAlpha (Alpha 0) ExRoot)))-      , ("[[]](~!i1 -> $)", Just (ExApplication (ExFormation []) (ArAlpha (AlMeta "i1") ExXi)))-      , ("[[]](α𝑖1 -> Q)", Just (ExApplication (ExFormation []) (ArAlpha (AlMeta "i1") ExRoot)))+      , ("[[x -> ?]].x(k -> Q)", Just (ExApplication (ExDispatch (ExFormation [BiVoid (AtLabel "x")]) (AtLabel "x")) (ArTau (AtLabel "k") ExRoot)))+      , ("[[]](!t1 -> $)", Just (ExApplication (ExFormation []) (ArTau (AtMeta "t1") ExXi)))+      , ("[[]](𝜏1 -> Q)", Just (ExApplication (ExFormation []) (ArTau (AtMeta "t1") ExRoot)))       , ("Q.foo(a1 -> Q.y)", Just (ExApplication (ExDispatch ExRoot (AtLabel "foo")) (ArTau (AtLabel "a1") (ExDispatch ExRoot (AtLabel "y")))))-      , ("Q.f(b(c), d)", Just (ExApplication (ExApplication (ExDispatch ExRoot (AtLabel "f")) (ArAlpha (Alpha 0) (ExApplication (ExDispatch ExXi (AtLabel "b")) (ArAlpha (Alpha 0) (ExDispatch ExXi (AtLabel "c")))))) (ArAlpha (Alpha 1) (ExDispatch ExXi (AtLabel "d")))))+      , ("Q.f(u -> b(v -> c), w -> d)", Just (ExApplication (ExApplication (ExDispatch ExRoot (AtLabel "f")) (ArTau (AtLabel "u") (ExApplication (ExDispatch ExXi (AtLabel "b")) (ArTau (AtLabel "v") (ExDispatch ExXi (AtLabel "c")))))) (ArTau (AtLabel "w") (ExDispatch ExXi (AtLabel "d")))))       ]    describe "parse meta expressions" $@@ -582,7 +607,7 @@       , ("𝑒1", Just (ExMeta "e1"))       , ("𝑒2", Just (ExMeta "e2"))       , ("!e1.x", Just (ExDispatch (ExMeta "e1") (AtLabel "x")))-      , ("!e1(Q)", Just (ExApplication (ExMeta "e1") (ArAlpha (Alpha 0) ExRoot)))+      , ("!e1(k -> Q)", Just (ExApplication (ExMeta "e1") (ArTau (AtLabel "k") ExRoot)))       , ("!n1", Just (ExMeta "n1"))       , ("!n1", Just (ExMeta "n1"))       , ("𝑛1", Just (ExMeta "n1"))@@ -656,9 +681,7 @@    describe "phiParser record" $     forM_-      [ ("exposes an _alpha field parsing an alpha directly", parseMaybe (_alpha phiParser) "~3" `shouldBe` Just (Alpha 3))-      , ("exposes an _attribute field parsing an attribute directly", parseMaybe (_attribute phiParser) "foo" `shouldBe` Just (AtLabel "foo"))-      , ("exposes an _index field parsing an index meta directly", parseMaybe (_index phiParser) "!i1" `shouldBe` Just (Right "i1"))+      [ ("exposes an _attribute field parsing an attribute directly", parseMaybe (_attribute phiParser) "foo" `shouldBe` Just (AtLabel "foo"))       , ("exposes a _binding field parsing a binding directly", parseMaybe (_binding phiParser) "x -> $" `shouldBe` Just (BiTau (AtLabel "x") ExXi))       , ("exposes an _expression field parsing an expression directly", parseMaybe (_expression phiParser) "Q.x" `shouldBe` Just (ExDispatch ExRoot (AtLabel "x")))       , ("exposes a _string field parsing a quoted string directly", parseMaybe (_string phiParser) "\"hi\"" `shouldBe` Just "hi")@@ -677,8 +700,6 @@       [ ("parseBinding error is tagged with its entry point name", parseBinding "L>" `shouldSatisfy` either (isInfixOf "binding:1:") (const False))       , ("parseNumber error is tagged with its entry point name", parseNumber "abc" `shouldSatisfy` either (isInfixOf "number:1:") (const False))       , ("parseAttribute error is tagged with its entry point name", parseAttribute "123" `shouldSatisfy` either (isInfixOf "attribute:1:") (const False))-      , ("parseAlpha error is tagged with its entry point name", parseAlpha "bogus" `shouldSatisfy` either (isInfixOf "alpha:1:") (const False))-      , ("parseIndex error is tagged with its entry point name", parseIndex "bogus" `shouldSatisfy` either (isInfixOf "index meta:1:") (const False))       ]       (uncurry it) @@ -714,7 +735,7 @@       , ("$.a : @", "⟦ φ ↦ ξ.a ⟧")       , ("ξ:ρ", "⟦ ρ ↦ ξ ⟧")       , ("Q:x", "⟦ x ↦ Φ ⟧")-      , ("Q.x(y):z", "⟦ z ↦ Φ.x(y) ⟧")+      , ("Q.x(k ↦ y):z", "⟦ z ↦ Φ.x(k ↦ y) ⟧")       , ("42:φ", "⟦ φ ↦ 42 ⟧")       , ("1E-05:φ", "⟦ φ ↦ 1E-05 ⟧")       , ("\"hi\":φ", "⟦ φ ↦ \"hi\" ⟧")@@ -722,12 +743,12 @@       , ("ξ.a:φ.b", "⟦ φ ↦ ξ.a ⟧.b")       , ("ξ.a:φ:b", "⟦ b ↦ ⟦ φ ↦ ξ.a ⟧ ⟧")       , ("FF-:Δ.x", "⟦ Δ ⤍ FF- ⟧.x")-      , ("Q.x(ξ.a:φ)", "Q.x(⟦ φ ↦ ξ.a ⟧)")+      , ("Q.x(k ↦ ξ.a:φ)", "Q.x(k ↦ ⟦ φ ↦ ξ.a ⟧)")       , ("⟦ x ↦ y:φ, z ↦ FF-:Δ ⟧", "⟦ x ↦ ⟦ φ ↦ ξ.y ⟧, z ↦ ⟦ Δ ⤍ FF- ⟧ ⟧")       , ("⟦ x ↦ ∅:a, y ↦ ∅ ⟧", "⟦ x ↦ ⟦ a ↦ ∅ ⟧, y ↦ ∅ ⟧")       , ("[[ x -> ?:a ]]", "⟦ x ↦ ⟦ a ↦ ∅ ⟧ ⟧")       , ("Q.x(y -> ?:a)", "Q.x(y ↦ ⟦ a ↦ ∅ ⟧)")-      , ("Q.x(α0 ↦ Plus:λ)", "Q.x(α0 ↦ ⟦ λ ⤍ Plus ⟧)")+      , ("Q.x(k ↦ Plus:λ)", "Q.x(k ↦ ⟦ λ ⤍ Plus ⟧)")       , ("⟦ x(y) ↦ 42:a ⟧", "⟦ x ↦ ⟦ y ↦ ∅, a ↦ 42 ⟧ ⟧")       , ("⟦ x(y) ↦ 42:a:b ⟧", "⟦ x ↦ ⟦ y ↦ ∅, b ↦ ⟦ a ↦ 42 ⟧ ⟧ ⟧")       , ("⟦ x(y, z) ↦ ∅:a ⟧", "⟦ x ↦ ⟦ y ↦ ∅, z ↦ ∅, a ↦ ∅ ⟧ ⟧")@@ -765,7 +786,7 @@       parseExpression       ( map           (\ipt -> (ipt, Nothing :: Maybe Expression))-          ["Φ.bool(v(x) ↦ ⟦ λ ⤍ L_fork ⟧)", "Q.x(y(z) ↦ FF-:Δ)", "Q.x(y(z) ↦ ⟦ w ↦ ξ ⟧:a)", "Q.x(α0(z) ↦ ⟦ ⟧)", "Q.x(a ↦ ξ, y(z, w) ↦ ⟦ ⟧)", "!e1(x(^,@) -> [[w -> !e2]])", "Q.x(y() -> [[]])", "Q.x(y(q) -> [[w -> !e]])", "Q.x(~1(^,@) -> [[]])"]+          ["Φ.bool(v(x) ↦ ⟦ λ ⤍ L_fork ⟧)", "Q.x(y(z) ↦ FF-:Δ)", "Q.x(y(z) ↦ ⟦ w ↦ ξ ⟧:a)", "Q.x(a ↦ ξ, y(z, w) ↦ ⟦ ⟧)", "!e1(x(^,@) -> [[w -> !e2]])", "Q.x(y() -> [[]])", "Q.x(y(q) -> [[w -> !e]])"]       )    describe "rejects a mix of ASCII and Unicode symbols under monoform" $@@ -787,8 +808,6 @@       , ("⟦ x ↦ ξ.^ ⟧", "The ASCII symbol \"^\" at 1:9")       , ("[[ φ -> $ ]]", "The Unicode symbol \"φ\" at 1:4")       , ("⟦ @ ↦ ξ ⟧", "The ASCII symbol \"@\" at 1:3")-      , ("Q.x(α0 -> $)", "The Unicode symbol \"α\" at 1:5 mixes with the ASCII \"Q\" at 1:1")-      , ("Φ.x(~0 ↦ ξ)", "The ASCII symbol \"~\" at 1:5 mixes with the Unicode \"Φ\" at 1:1")       , ("[[ Δ ⤍ 00- ]]", "The Unicode symbol \"Δ ⤍\" at 1:4")       , ("⟦ D> 00- ⟧", "The ASCII symbol \"D>\" at 1:3")       , ("[[ λ ⤍ Fn ]]", "The Unicode symbol \"λ ⤍\" at 1:4")@@ -807,7 +826,6 @@       , ("[[ D> 𝛿1 ]]", "The Unicode symbol \"𝛿\" at 1:7")       , ("[[ L> 𝑓1 ]]", "The Unicode symbol \"𝑓\" at 1:7")       , ("[[ L> 𝜎1 ]]", "The Unicode symbol \"𝜎\" at 1:7")-      , ("Φ.x(α!i1 ↦ ξ)", "The ASCII symbol \"!i\" at 1:6")       , ("⟦ y ↦ ξ, x -> ξ ⟧", "expression:1:12:")       ] @@ -816,11 +834,11 @@       (parseExpression' MONOFORM)       [ ("[[ x -> ? ]]", Just (ExFormation [BiVoid (AtLabel "x")]))       , ("⟦ x ↦ ∅ ⟧", Just (ExFormation [BiVoid (AtLabel "x")]))-      , ("\"hi\".x(42)", Just (ExApplication (ExDispatch (DataString (BtMany ["68", "69"])) (AtLabel "x")) (ArAlpha (Alpha 0) (DataNumber (BtMany ["40", "45", "00", "00", "00", "00", "00", "00"])))))+      , ("\"hi\".x(k -> 42)", Just (ExApplication (ExDispatch (DataString (BtMany ["68", "69"])) (AtLabel "x")) (ArTau (AtLabel "k") (DataNumber (BtMany ["40", "45", "00", "00", "00", "00", "00", "00"])))))       , ("Q:λ", Just (ExFormation [BiLambda (Function "Q")]))       , ("T:L", Just (ExFormation [BiLambda (Function "T")]))-      , ("Q.x(~0 -> [[ D> 00-, L> Fn, ^ -> $, @ -> T, y -> !e1, z -> 01-:D ]])", Just (ExApplication (ExDispatch ExRoot (AtLabel "x")) (ArAlpha (Alpha 0) (ExFormation [BiDelta (BtOne "00"), BiLambda (Function "Fn"), BiTau AtRho ExXi, BiTau AtPhi ExTermination, BiTau (AtLabel "y") (ExMeta "e1"), BiTau (AtLabel "z") (ExFormation [BiDelta (BtOne "01")])]))))-      , ("Φ.x(α0 ↦ ⟦ Δ ⤍ 00-, λ ⤍ Fn, ρ ↦ ξ, φ ↦ ⊥, y ↦ 𝑒1, z ↦ 01-:Δ ⟧)", Just (ExApplication (ExDispatch ExRoot (AtLabel "x")) (ArAlpha (Alpha 0) (ExFormation [BiDelta (BtOne "00"), BiLambda (Function "Fn"), BiTau AtRho ExXi, BiTau AtPhi ExTermination, BiTau (AtLabel "y") (ExMeta "e1"), BiTau (AtLabel "z") (ExFormation [BiDelta (BtOne "01")])]))))+      , ("Q.x(k -> [[ D> 00-, L> Fn, ^ -> $, @ -> T, y -> !e1, z -> 01-:D ]])", Just (ExApplication (ExDispatch ExRoot (AtLabel "x")) (ArTau (AtLabel "k") (ExFormation [BiDelta (BtOne "00"), BiLambda (Function "Fn"), BiTau AtRho ExXi, BiTau AtPhi ExTermination, BiTau (AtLabel "y") (ExMeta "e1"), BiTau (AtLabel "z") (ExFormation [BiDelta (BtOne "01")])]))))+      , ("Φ.x(k ↦ ⟦ Δ ⤍ 00-, λ ⤍ Fn, ρ ↦ ξ, φ ↦ ⊥, y ↦ 𝑒1, z ↦ 01-:Δ ⟧)", Just (ExApplication (ExDispatch ExRoot (AtLabel "x")) (ArTau (AtLabel "k") (ExFormation [BiDelta (BtOne "00"), BiLambda (Function "Fn"), BiTau AtRho ExXi, BiTau AtPhi ExTermination, BiTau (AtLabel "y") (ExMeta "e1"), BiTau (AtLabel "z") (ExFormation [BiDelta (BtOne "01")])]))))       ]    describe "accepts a mix of ASCII and Unicode symbols without monoform" $
test/PrinterSpec.hs view
@@ -50,8 +50,8 @@         )       ,         ( "formation with app"-        , ExApplication (ExFormation []) (ArAlpha (Alpha 0) ExRoot)-        , "[[]]( Q )"+        , ExApplication (ExFormation []) (ArTau (AtLabel "kt") ExRoot)+        , "[[]]( kt -> Q )"         )       , ("meta expr", ExMeta "e", "!e")       , ("meta binding", ExFormation [BiMeta "B"], "[[ !B ]]")@@ -309,13 +309,6 @@           it desc (printAttribute attr `shouldBe` expected)       ) -  describe "printAlpha with default encoding" $-    forM_-      [ ("α42", Alpha 42, "α42")-      , ("meta alpha", AlMeta "i", "α𝑖")-      ]-      (\(desc, alpha, expected) -> it desc (printAlpha alpha `shouldBe` expected))-   describe "printBinding renders as a one-binding formation" $     forM_       [ ("tau binding", BiTau (AtLabel "x") ExRoot, "Φ:x")@@ -353,22 +346,21 @@   describe "printSubsts and printSubsts' render substitutions" $     forM_       [ ("MvAttribute", [Subst (Map.singleton (Named "t") (MvAttribute (AtLabel "x")))], (SWEET, UNICODE, MULTILINE, defaultMargin), "t >> x")-      , ("MvIndex", [Subst (Map.singleton (Named "i") (MvIndex 3))], (SWEET, UNICODE, MULTILINE, defaultMargin), "i >> 3")       , ("MvExpression", [Subst (Map.singleton (Named "e") (MvExpression ExRoot))], (SWEET, UNICODE, MULTILINE, defaultMargin), "e >> Φ")       , ("MvBytes", [Subst (Map.singleton (Named "b") (MvBytes (BtOne "1F")))], (SWEET, UNICODE, MULTILINE, defaultMargin), "b >> 1F-")       , ("MvBindings", [Subst (Map.singleton (Named "bnd") (MvBindings [BiVoid (AtLabel "y")]))], (SWEET, UNICODE, MULTILINE, defaultMargin), "bnd >> ∅:y")       , ("MvFunction", [Subst (Map.singleton (Named "f") (MvFunction (Function "func")))], (SWEET, UNICODE, MULTILINE, defaultMargin), "f >> func")       ,         ( "keys of a multi-entry substitution are sorted and each is on its own line"-        , [Subst (Map.fromList [(Named "a", MvIndex 1), (Named "b", MvIndex 2)])]+        , [Subst (Map.fromList [(Named "a", MvBytes (BtOne "01")), (Named "b", MvBytes (BtOne "02"))])]         , (SWEET, UNICODE, MULTILINE, defaultMargin)-        , "a >> 1\nb >> 2"+        , "a >> 01-\nb >> 02-"         )       ,         ( "multiple substitutions are separated with a dashed line"-        , [Subst (Map.singleton (Named "a") (MvIndex 1)), Subst (Map.singleton (Named "b") (MvIndex 2))]+        , [Subst (Map.singleton (Named "a") (MvBytes (BtOne "01"))), Subst (Map.singleton (Named "b") (MvBytes (BtOne "02")))]         , (SWEET, UNICODE, MULTILINE, defaultMargin)-        , "a >> 1\n------\nb >> 2"+        , "a >> 01-\n------\nb >> 02-"         )       , ("an empty substitution list renders the dashed placeholder", [], (SWEET, UNICODE, SINGLELINE, defaultMargin), "------")       ,@@ -422,8 +414,8 @@       , "⟦ x ↦ ⟦ φ ↦ ξ.a ⟧(y ↦ ⟦ Δ ⤍ 01- ⟧) ⟧"       , "⟦ x(a) ↦ ⟦ φ ↦ a ⟧ ⟧"       , "⟦ x ↦ ⟦⟧ ⟧"-      , "⟦ x ↦ Φ.number(Φ.bytes(⟦ Δ ⤍ 7F-F8-00-00-00-00-00-01 ⟧)) ⟧"-      , "⟦ x ↦ Φ.y(⟦ φ ↦ ξ.z ⟧, ⟦ λ ⤍ Fn ⟧) ⟧"+      , "⟦ x ↦ Φ.number(φ ↦ Φ.bytes(φ ↦ ⟦ Δ ⤍ 7F-F8-00-00-00-00-00-01 ⟧)) ⟧"+      , "⟦ x ↦ Φ.y(a ↦ ⟦ φ ↦ ξ.z ⟧, b ↦ ⟦ λ ⤍ Fn ⟧) ⟧"       , "⟦ x ↦ ⟦ λ ⤍ Fn, ρ ↦ ⟦ φ ↦ ξ ⟧ ⟧, y ↦ ∅ ⟧"       , "⟦ x ↦ ⟦ 𝜏1 ↦ ∅, a ↦ ∅ ⟧ ⟧"       , "⟦ x ↦ ⟦ a ↦ ∅, 𝜏1 ↦ ∅ ⟧ ⟧"@@ -469,7 +461,7 @@       , ("⟦ x ↦ ⟦ a ↦ ∅, 𝜏1 ↦ ∅ ⟧ ⟧", SWEET, UNICODE, "⟦ x(a) ↦ ∅:𝜏1 ⟧")       , ("⟦ x ↦ ⟦ 𝜏1 ↦ ∅, a ↦ ∅ ⟧ ⟧", SWEET, UNICODE, "⟦ 𝜏1 ↦ ∅, a ↦ ∅ ⟧:x")       , ("Φ.bool(v ↦ ⟦ x ↦ ∅, λ ⤍ L_fork ⟧)", SWEET, UNICODE, "Φ.bool( v ↦ ⟦ x ↦ ∅, λ ⤍ L_fork ⟧ )")-      , ("Φ.bool(α0 ↦ ⟦ x ↦ ∅, y ↦ ξ ⟧)", SWEET, UNICODE, "Φ.bool( ⟦ x ↦ ∅, y ↦ ξ ⟧ )")+      , ("Φ.bool(v ↦ ⟦ x ↦ ∅, y ↦ ξ ⟧)", SWEET, UNICODE, "Φ.bool( v ↦ ⟦ x ↦ ∅, y ↦ ξ ⟧ )")       , ("⟦ x ↦ ξ.a ⟧", SALTY, UNICODE, "⟦ x ↦ ξ.a ⟧")       , ("⟦ Δ ⤍ FF-AA ⟧", SALTY, ASCII, "[[ D> FF-AA ]]")       ]
test/RenderSpec.hs view
@@ -114,8 +114,6 @@       , (A, "t")       , (TAU, "𝜏")       , (TAU', "\\tau")-      , (I, "𝑖")-      , (I', "i")       , (B, "𝐵")       , (B', "B")       , (D, "𝛿")@@ -137,22 +135,6 @@       ]       (\(desc, actual, expected) -> it desc (actual `shouldBe` expected)) -  describe "render ALPHA'" $-    forM_-      [ ("ALPHA", ALPHA, "α")-      , ("ALPHA'", ALPHA', "~")-      ]-      (\(desc, node, expected) -> it desc (render node `shouldBe` expected))--  describe "render ALPHA" $-    forM_-      [ ("AL_IDX unicode", AL_IDX ALPHA 3, "α3")-      , ("AL_IDX ascii", AL_IDX ALPHA' 3, "~3")-      , ("AL_META unicode", AL_META ALPHA (META NO_EXCL I "5"), "α𝑖5")-      , ("AL_META ascii", AL_META ALPHA' (META EXCL I' "5"), "~!i5")-      ]-      (\(desc, node, expected) -> it desc (render node `shouldBe` expected))-   describe "render TAB" $     forM_       [ ("no indent", TAB 0, "")@@ -165,7 +147,6 @@   describe "render PAIR" $     forM_       [ ("PA_TAU", PA_TAU (AT_LABEL "x") ARROW xiExpr, "x ↦ ξ")-      , ("PA_ALPHA", PA_ALPHA (AL_IDX ALPHA 0) ARROW xiExpr, "α0 ↦ ξ")       , ("PA_FORMATION with no voids delegates to PA_TAU", PA_FORMATION (AT_LABEL "f") [] ARROW xiExpr, "f ↦ ξ")       ,         ( "PA_FORMATION with voids"@@ -217,18 +198,9 @@     forM_       [ ("AA_TAU", AA_TAU (APP_BINDING (pairXi "a")), "a ↦ ξ")       , ("AA_TAUS", AA_TAUS (bindingXi "a"), "a ↦ ξ")-      , ("AA_EXPRS", AA_EXPRS (APP_ARG xiExpr AAS_EMPTY), "ξ")       ]       (\(desc, node, expected) -> it desc (render node `shouldBe` expected)) -  describe "render APP_ARG and APP_ARGS" $-    forM_-      [ ("APP_ARG with trailing arg", render (APP_ARG xiExpr (AAS_EXPR EOL (TAB 1) xiExpr AAS_EMPTY)), "ξ,\n  ξ")-      , ("APP_ARGS empty", render AAS_EMPTY, "")-      , ("APP_ARGS one", render (AAS_EXPR EOL (TAB 1) xiExpr AAS_EMPTY), ",\n  ξ")-      ]-      (\(desc, actual, expected) -> it desc (actual `shouldBe` expected))-   describe "render EXPRESSION" $     forM_       [ ("EX_GLOBAL Φ", rootExpr, "Φ")@@ -315,9 +287,7 @@    describe "render NUMBER" $     forM_-      [ ("IDX_META", IDX_META (META NO_EXCL I "x"), "𝑖x")-      , ("LENGTH", LENGTH (bindingXi "x"), "\\vert x ↦ ξ \\vert")-      , ("DOMAIN", DOMAIN (bindingXi "x"), "\\vert \\overline{ x ↦ ξ } \\vert")+      [ ("LENGTH", LENGTH (bindingXi "x"), "\\vert x ↦ ξ \\vert")       , ("LITERAL", LITERAL 7, "7")       ]       (\(desc, node, expected) -> it desc (render node `shouldBe` expected))
test/ReplacerSpec.hs view
@@ -173,11 +173,11 @@         , ExXi         )       ,-        ( "Q -> Q.a(α0 -> Q.c) => ([Q.a, Q.c], [$, T]) => Q -> $(α0 -> T)"-        , ExApplication (ExDispatch ExRoot (AtLabel "a")) (ArAlpha (Alpha 0) (ExDispatch ExRoot (AtLabel "c")))+        ( "Q -> Q.a(k -> Q.c) => ([Q.a, Q.c], [$, T]) => Q -> $(k -> T)"+        , ExApplication (ExDispatch ExRoot (AtLabel "a")) (ArTau (AtLabel "k") (ExDispatch ExRoot (AtLabel "c")))         , [ExDispatch ExRoot (AtLabel "a"), ExDispatch ExRoot (AtLabel "c")]         , [ExXi, ExTermination]-        , ExApplication ExXi (ArAlpha (Alpha 0) ExTermination)+        , ExApplication ExXi (ArTau (AtLabel "k") ExTermination)         )       ,         ( "Q -> Q.x => ([Q.x], []) => Q -> Q.x (replacements exhausted before patterns)"@@ -304,11 +304,11 @@         , ExFormation [BiLambda (Function "Код")]         )       ,-        ( "Q -> Q.a(α0 -> [[c -> ?]]) => ([[c -> ?]], [[c -> T]]) => Q -> Q.a(α0 -> [[c -> T]])"-        , ExApplication (ExDispatch ExRoot (AtLabel "a")) (ArAlpha (Alpha 0) (ExFormation [BiVoid (AtLabel "c")]))+        ( "Q -> Q.a(k -> [[c -> ?]]) => ([[c -> ?]], [[c -> T]]) => Q -> Q.a(k -> [[c -> T]])"+        , ExApplication (ExDispatch ExRoot (AtLabel "a")) (ArTau (AtLabel "k") (ExFormation [BiVoid (AtLabel "c")]))         , [ExFormation [BiVoid (AtLabel "c")]]         , [ExFormation [BiTau (AtLabel "c") ExTermination]]-        , ExApplication (ExDispatch ExRoot (AtLabel "a")) (ArAlpha (Alpha 0) (ExFormation [BiTau (AtLabel "c") ExTermination]))+        , ExApplication (ExDispatch ExRoot (AtLabel "a")) (ArTau (AtLabel "k") (ExFormation [BiTau (AtLabel "c") ExTermination]))         )       ,         ( "Q -> [[a -> ?]] => ([[a -> ?]], []) => Q -> [[a -> ?]] (replacements exhausted before patterns)"
test/RuleSpec.hs view
@@ -255,7 +255,7 @@         samples =           [ "⟦ kx ↦ ξ.ow( jy ↦ Φ.ya ), λ ⤍ L_ok, b ↦ ∅ ⟧"           , "⟦ φ ↦ Φ.number( φ ↦ Φ.bytes( φ ↦ ⟦ λ ⤍ 𝜎3 ⟧ ) ), ρ ↦ ∅, qe ↦ ⟦ Δ ⤍ 1F- ⟧ ⟧"-          , "Φ.hz( ⟦ ab ↦ ⟦ kw ↦ ξ.ρ, λ ⤍ L_z ⟧ ⟧ ).uv( α0 ↦ ⊥ )"+          , "Φ.hz( zo ↦ ⟦ ab ↦ ⟦ kw ↦ ξ.ρ, λ ⤍ L_z ⟧ ⟧ ).uv( ni ↦ ⊥ )"           , "⟦ x ↦ ∅, dd ↦ ⟦ λ ⤍ L_dd, ρ ↦ ∅ ⟧, m1 ↦ ⟦ b ↦ ∅, φ ↦ ξ.ρ.dd( b ↦ ξ.b ), ρ ↦ ∅ ⟧ ⟧"           ]         context :: RuleContext
test/SodgSpec.hs view
@@ -122,14 +122,12 @@       _ -> 0     held :: Argument -> Expression     held (ArTau _ inner) = inner-    held (ArAlpha _ inner) = inner  scrubbed :: Bool -> Expression -> Expression scrubbed inside = \case   ExFormation bds -> ExFormation (mapMaybe binding bds)   ExDispatch inner attr -> ExDispatch (scrubbed inside inner) (label attr)   ExApplication inner (ArTau attr arg) -> ExApplication (scrubbed inside inner) (ArTau (label attr) (scrubbed inside arg))-  ExApplication inner (ArAlpha alpha arg) -> ExApplication (scrubbed inside inner) (ArAlpha (indexed alpha) (scrubbed inside arg))   ExXi | inside -> ExXi   ExTermination -> ExTermination   _ -> ExRoot@@ -143,9 +141,6 @@       BiLambda (FnMeta _) -> Just (BiLambda (Function "L_scrubbed"))       BiMeta _ -> Nothing       other -> Just other-    indexed :: Alpha -> Alpha-    indexed (AlMeta _) = Alpha 0-    indexed alpha = alpha     label :: Attribute -> Attribute     label (AtMeta _) = AtLabel "scrubbed"     label attr = attr
test/SugarSpec.hs view
@@ -178,19 +178,6 @@         , "ξ(\n  a ↦ ξ\n)(\n  b ↦ ξ\n)"         )       ,-        ( "EX_APPLICATION with positional arguments (AA_EXPRS) sugars them into alpha-indexed applications"-        , EX_APPLICATION-            xiExpr-            NO_SPACE-            EOL-            (TAB 1)-            (AA_EXPRS (APP_ARG xiExpr (AAS_EXPR EOL (TAB 1) rootExpr AAS_EMPTY)))-            EOL-            (TAB 0)-            1-        , "ξ(\n  α0 ↦ ξ\n)(\n  α1 ↦ Φ\n)"-        )-      ,         ( "EX_NUMBER with no extra rho expands into the Q.number(Q.bytes(...)) form"         , EX_NUMBER 42 (TAB 1) []         , "Φ.number(\n    φ ↦ Φ.bytes(\n      φ ↦ ⟦\n        Δ ⤍ 40-45-00-00-00-00-00-00\n      ⟧\n    )\n  )"@@ -288,11 +275,6 @@         , PA_TAU (AT_LABEL "x") ARROW (EX_DISPATCH (EX_XI XI) NO_SPACE (AT_LABEL "y"))         )       ,-        ( "PA_ALPHA recurses into its value"-        , PA_ALPHA (AL_IDX ALPHA 0) ARROW (EX_ATTR (AT_LABEL "y"))-        , PA_ALPHA (AL_IDX ALPHA 0) ARROW (EX_DISPATCH (EX_XI XI) NO_SPACE (AT_LABEL "y"))-        )-      ,         ( "PA_FORMATION with an empty object body joins its void params ahead of the body"         , PA_FORMATION (AT_LABEL "f") [AT_LABEL "p"] ARROW (EX_FORMATION LSB EOL (TAB 2) (BI_EMPTY (TAB 2)) EOL (TAB 1) RSB)         , PA_TAU@@ -407,7 +389,6 @@         , LENGTH (BI_PAIR (PA_TAU (AT_LABEL "x") ARROW (EX_ATTR (AT_LABEL "y"))) (BDS_EMPTY (TAB 1)) (TAB 1))         , LENGTH (BI_PAIR (PA_TAU (AT_LABEL "x") ARROW (EX_DISPATCH (EX_XI XI) NO_SPACE (AT_LABEL "y"))) (BDS_EMPTY (TAB 1)) (TAB 1))         )-      , ("DOMAIN recurses into its binding", DOMAIN (BI_EMPTY (TAB 1)), DOMAIN (BI_EMPTY (TAB 1)))       , ("LITERAL is unchanged", LITERAL 3, LITERAL 3)       ]       (\(desc, sweet, salty) -> it desc (toSalty sweet `shouldBe` salty))@@ -510,11 +491,6 @@             RSB         )       ,-        ( "a positional alpha binding is not rho and is kept, recursing through goPair"-        , EX_APPLICATION xiExpr NO_SPACE EOL (TAB 1) (AA_TAUS (BI_PAIR (PA_ALPHA (AL_IDX ALPHA 0) ARROW xiExpr) (BDS_EMPTY (TAB 1)) (TAB 1))) EOL (TAB 0) 1-        , EX_APPLICATION xiExpr NO_SPACE EOL (TAB 1) (AA_TAUS (BI_PAIR (PA_ALPHA (AL_IDX ALPHA 0) ARROW xiExpr) (BDS_EMPTY (TAB 1)) (TAB 1))) EOL (TAB 0) 1-        )-      ,         ( "an application whose only tau argument (AA_TAU) is rho collapses to its bare callee"         , EX_APPLICATION rootDotX NO_SPACE EOL (TAB 1) (AA_TAU (APP_BINDING (PA_TAU (AT_RHO RHO) ARROW xiExpr))) EOL (TAB 0) 1         , rootDotX@@ -590,11 +566,6 @@             1         )       ,-        ( "an application argument list (AA_EXPRS) is always kept and recurses"-        , EX_APPLICATION xiExpr NO_SPACE EOL (TAB 1) (AA_EXPRS (APP_ARG xiExpr (AAS_EXPR EOL (TAB 1) rootExpr AAS_EMPTY))) EOL (TAB 0) 1-        , EX_APPLICATION xiExpr NO_SPACE EOL (TAB 1) (AA_EXPRS (APP_ARG xiExpr (AAS_EXPR EOL (TAB 1) rootExpr AAS_EMPTY))) EOL (TAB 0) 1-        )-      ,         ( "a xi.rho dispatch value is left untouched (only bindings and app arguments are stripped)"         , EX_DISPATCH xiExpr NO_SPACE (AT_RHO RHO)         , EX_DISPATCH xiExpr NO_SPACE (AT_RHO RHO)@@ -680,11 +651,11 @@         printExpression' string (config SWEET) `shouldBe` "\"hi\""         printExpression' string (config SALTY) `shouldBe` "Φ.string( φ ↦ Φ.bytes( φ ↦ ⟦ Δ ⤍ 68-69 ⟧ ) )"     it-      "an application with multiple positional arguments sugars/salts between e(e0, e1) and e(α0 ↦ e0)(α1 ↦ e1)"+      "an application with several arguments sugars/salts between e(u ↦ e0, v ↦ e1) and e(u ↦ e0)(v ↦ e1)"       $ do-        let multiArgApp = ExApplication (ExApplication (ExDispatch ExRoot (AtLabel "e")) (ArAlpha (Alpha 0) ExRoot)) (ArAlpha (Alpha 1) ExXi)-        printExpression' multiArgApp (config SWEET) `shouldBe` "Φ.e( Φ, ξ )"-        printExpression' multiArgApp (config SALTY) `shouldBe` "Φ.e( α0 ↦ Φ )( α1 ↦ ξ )"+        let multiArgApp = ExApplication (ExApplication (ExDispatch ExRoot (AtLabel "e")) (ArTau (AtLabel "u") ExRoot)) (ArTau (AtLabel "v") ExXi)+        printExpression' multiArgApp (config SWEET) `shouldBe` "Φ.e( u ↦ Φ, v ↦ ξ )"+        printExpression' multiArgApp (config SALTY) `shouldBe` "Φ.e( u ↦ Φ )( v ↦ ξ )"     it       "a nested object-with-params formation sugars/salts between obj(p, q) -> [[..]] and its expanded void bindings"       $ do
test/XMIRSpec.hs view
@@ -329,7 +329,6 @@       , ("keeps byte data and sibling bindings in an application argument", "[[ x -> Q.y(a -> [[ D> 01-02, b -> Q.z ]]) ]]")       , ("keeps data after an application argument's sibling binding", "[[ top -> [[ @ -> ⊥(a -> [[ x -> [[]], D> 00-FF ]]) ]] ]]")       , ("keeps data between an application argument's sibling bindings", "[[ top -> [[ @ -> ⊥(a -> [[ x -> [[]], D> 00-FF, y -> [[]] ]]) ]] ]]")-      , ("keeps data between a positional argument's sibling bindings", "[[ top -> [[ @ -> ⊥(α0 -> [[ x -> [[]], D> 00-FF, y -> [[]] ]]) ]] ]]")       ]       ( \(desc, source) -> it desc $ do           expr <- parseExpressionThrows source@@ -388,6 +387,16 @@         , ["The attribute 'base' is not expected to be empty"]         )       ,+        ( "refuses an application argument given by its position"+        , try (void (parseXMIRThrows "<object><o name=\"x\" base=\"Φ.f\"><o base=\"Φ.y\"/></o></object>" >>= xmirToPhi)) :: IO (Either SomeException ())+        , ["Application argument must have @as attribute, since a positional argument is not supported"]+        )+      ,+        ( "refuses an application argument given by an index"+        , try (void (parseXMIRThrows "<object><o name=\"x\" base=\"Φ.f\"><o as=\"α0\" base=\"Φ.y\"/></o></object>" >>= xmirToPhi)) :: IO (Either SomeException ())+        , ["The positional @as='α0' is not supported"]+        )+      ,         ( "explains an unsupported binding"         , try (void (expressionToXMIR (ExFormation [BiTau (AtLabel "x") (ExFormation [BiMeta "n", BiVoid AtRho]), BiVoid AtRho]) defaultXmirContext)) ::             IO (Either SomeException ())@@ -510,18 +519,18 @@       length xCur `shouldBe` 1      it "omits @base when an application argument is a bare formation" $ do-      expr <- parseExpressionThrows "[[ foo -> Q.bar(x -> 5, α1 -> [[ z -> ? ]]) ]]"+      expr <- parseExpressionThrows "[[ foo -> Q.bar(x -> 5, yu -> [[ z -> ? ]]) ]]"       xmir' <- expressionToXMIR expr defaultXmirContext       let root = C.fromDocument xmir'           args = root C.$/ C.element (toName "o") C.&/ C.element (toName "o")           namedArg = filter (\cur -> C.attribute (toName "as") cur == ["x"]) args-          formationArg = filter (\cur -> C.attribute (toName "as") cur == ["α1"]) args+          formationArg = filter (\cur -> C.attribute (toName "as") cur == ["yu"]) args       case namedArg of         [argCur] -> C.attribute (toName "base") argCur `shouldBe` ["Φ.number"]         _ -> expectationFailure "expected exactly one 'x' argument"       case formationArg of         [argCur] -> C.attribute (toName "base") argCur `shouldBe` []-        _ -> expectationFailure "expected exactly one α1 argument"+        _ -> expectationFailure "expected exactly one argument named yu"      it "escapes XML special characters in attribute values" $ do       expr <- parseExpressionThrows "[[ a&b -> \"<quoted>\" ]]"
test/YamlSpec.hs view
@@ -6,7 +6,7 @@  module YamlSpec where -import AST (Alpha, Attribute, Binding, Bytes, Expression (ExMeta, ExRoot))+import AST (Attribute, Binding, Bytes, Expression (ExMeta, ExRoot)) import Control.Exception (Exception (displayException), SomeException, bracket) import Control.Monad import Data.ByteString qualified as BS@@ -117,9 +117,9 @@       [ ("a label that equals the name in a morphing rule", primYaml, failsAsRedundant (decodeYaml' primYaml :: Either Yaml.ParseException MorphRule))       , ("a label that equals the name in a dataization rule", endYaml, failsAsRedundant (decodeYaml' endYaml :: Either Yaml.ParseException DataizeRule))       , ("a label that equals the name in a contextualization rule", cxiYaml, failsAsRedundant (decodeYaml' cxiYaml :: Either Yaml.ParseException ContextualizeRule))-      , ("a malformed embedded 𝜑-syntax: an index meta that does not parse", "'bogus'", isLeft (decodeYaml' "'bogus'" :: Either Yaml.ParseException Number))+      , ("a number spelt as a text, since no meta stands for one", "'bogus'", isLeft (decodeYaml' "'bogus'" :: Either Yaml.ParseException Number))+      , ("a number spelt as the index meta, which is not supported", "'𝑖'", isLeft (decodeYaml' "'𝑖'" :: Either Yaml.ParseException Number))       , ("a malformed embedded 𝜑-syntax: an attribute that does not parse", "'123'", isLeft (decodeYaml' "'123'" :: Either Yaml.ParseException Attribute))-      , ("a malformed embedded 𝜑-syntax: an alpha that does not parse", "'bogus'", isLeft (decodeYaml' "'bogus'" :: Either Yaml.ParseException Alpha))       , ("a malformed embedded 𝜑-syntax: bytes that do not parse", "'0a-'", isLeft (decodeYaml' "'0a-'" :: Either Yaml.ParseException Bytes))       , ("a malformed embedded 𝜑-syntax: an expression that does not parse", "'L>'", isLeft (decodeYaml' "'L>'" :: Either Yaml.ParseException Expression))       , ("a malformed embedded 𝜑-syntax: a binding that does not parse", "'L>'", isLeft (decodeYaml' "'L>'" :: Either Yaml.ParseException Binding))@@ -193,12 +193,6 @@             (decodeYaml' (rewriting "result: '⟦ ⟧'\nhaving:\n  formation: '𝑒'") :: Either Yaml.ParseException Rule)         )       ,-        ( "as a bare index meta in 'when' of a rewriting rule"-        , failsWith-            "anonymous meta '!i' cannot be referenced in 'when' of rule 'foo'"-            (decodeYaml' (rewriting "result: '⟦ ⟧'\nwhen:\n  eq: ['𝑖', 1]") :: Either Yaml.ParseException Rule)-        )-      ,         ( "inside an 'nf' condition of a rewriting rule"         , failsWith             "anonymous meta '!e' cannot be referenced in 'when' of rule 'foo'"@@ -326,8 +320,9 @@     forM_       [ ("bytes missing a dash in 'eq'", "eq: ['𝑒1', '⟦ Δ ⤍ 01 ⟧']", "expecting '-'")       , ("bytes missing a dash in 'gt'", "gt: ['⟦ Δ ⤍ 7F ⟧', 3]", "expecting '-'")-      , ("a list in 'gt'", "gt: [[1], 2]", "is a number, an attribute, an expression, or an object of 'length' or 'domain'")-      , ("a boolean in 'eq'", "eq: [true, 'x']", "is a number, an attribute, an expression, or an object of 'length' or 'domain'")+      , ("a list in 'gt'", "gt: [[1], 2]", "is a number, an attribute, an expression, or an object of 'length'")+      , ("a boolean in 'eq'", "eq: [true, 'x']", "is a number, an attribute, an expression, or an object of 'length'")+      , ("a 'domain' in 'eq'", "eq: [{domain: '𝐵1'}, 1]", "expected one of: [\"length\"]")       ]       (\(desc, yaml, message) -> it desc ((decodeYaml' yaml :: Either Yaml.ParseException Condition) `shouldSatisfy` failsWith message))