phino-0.0.154: test-resources/evaluate-packs/fires-a-formation-once-however-often-it-is-met.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The memo of '--acyclic=plausible': πΌ is a function of the formation it
# fires, so two bindings spelling one term fire one formation twice, and a
# run firing it afresh each time mints two symbols for one value and fires
# everything under the second once more (#1476). The 'evaluate' lines of
# 'L_pair' fire 'a' and then 'b', which spell the very same sum. Under the
# mode the second firing takes what the first answered: it reduces nothing,
# mints nothing and lands 'b' on the very symbol 'a' came to. The protocol
# still writes the firing of 'b' at its own site, with the answer the firing
# of 'a' made, named after the line that made it, and with no operand line
# under it, since none was reduced (#1874).
symbolic: |
- Ξ»: L_number_plus
dataize:
πΏ1: $.Ο
πΏ2: $.x
π: Ξ¦.number( Ο β¦ β¦ Ξ» β€ π β§ )
- Ξ»: L_pair
morph:
π1: $.a
π2: $.b
evaluate:
π3: π1
π4: π2
π: β¦ Ο β¦ β¦ a β¦ π3, b β¦ π4 β§ β§
location: 'Q.p'
acyclic: plausible
input: >
β¦ bytes(Ο) β¦ β¦β§,
number(Ο) β¦ β¦ plus(Ο, x) β¦ β¦ Ξ» β€ L_number_plus β§ β§,
p β¦ β¦
a β¦ 7.plus( 5.plus( 6 ) ),
b β¦ 7.plus( 5.plus( 6 ) ),
Ξ» β€ L_pair β§.Ο β§
result: >
β¦ a β¦ β¦ Ο β¦ π2:Ξ», plus(x) β¦ L_number_plus:Ξ» β§,
b β¦ β¦ Ο β¦ π2:Ξ», plus(x) β¦ L_number_plus:Ξ» β§ β§
protocol: |
π(Ξ¦.p):
πΌ(L_pair):
π(Ξ¦.aπ΅0):
πΒ·1Β·1 := 7
πΒ·1Β·2 := πΒ·1Β·1.plus( x β¦ 5.plus( 6 ) )
π1Β·1 := πΒ·1Β·2 # π(ΞΎ.a)
π(Ξ¦.aπ΅1):
πΒ·1Β·3 := 7
πΒ·1Β·4 := πΒ·1Β·3.plus( x β¦ 5.plus( 6 ) )
π2Β·1 := πΒ·1Β·4 # π(ΞΎ.b)
πΌ(L_number_plus): # πΌ(π1)
π»(Ξ¦.aπ΅2):
π(Ξ¦.aπ΅2):
πΒ·2Β·1 := 7
πΒ·2Β·2 := Ξ¦.bytes( Ο β¦ 40-1C-00-00-00-00-00-00:Ξ )
πΏΒ·2Β·1 := 40-1C-00-00-00-00-00-00 # 7.0
πΏ1Β·2 := πΏΒ·2Β·1 # π»(ΞΎ.Ο)
π»(Ξ¦.aπ΅3):
π(Ξ¦.aπ΅3):
πΒ·2Β·3 := 5
πΒ·2Β·4 := πΒ·2Β·3.plus( x β¦ 6 )
πΌ(L_number_plus):
π»(Ξ¦.aπ΅4):
π(Ξ¦.aπ΅4):
πΒ·3Β·1 := 5
πΒ·3Β·2 := Ξ¦.bytes( Ο β¦ 40-14-00-00-00-00-00-00:Ξ )
πΏΒ·3Β·1 := 40-14-00-00-00-00-00-00 # 5.0
πΏ1Β·3 := πΏΒ·3Β·1 # π»(ΞΎ.Ο)
π»(Ξ¦.aπ΅5):
π(Ξ¦.aπ΅5):
πΒ·3Β·3 := 6
πΒ·3Β·4 := Ξ¦.bytes( Ο β¦ 40-18-00-00-00-00-00-00:Ξ )
πΏΒ·3Β·2 := 40-18-00-00-00-00-00-00 # 6.0
πΏ2Β·3 := πΏΒ·3Β·2 # π»(ΞΎ.x)
πΒ·3Β·5 := Ξ¦.number( Ο β¦ π1:Ξ» ) # π
π(πΒ·3Β·5):
πΒ·3Β·6 := Ξ¦.number( Ο β¦ π1:Ξ» )
πΒ·3Β·7 := πΒ·3Β·6 # π(πΒ·3Β·5)
πΏ2Β·2 := π»(π1:Ξ») # π»(ΞΎ.x)
πΒ·2Β·5 := Ξ¦.number( Ο β¦ π2:Ξ» ) # π
π(πΒ·2Β·5):
πΒ·2Β·6 := Ξ¦.number( Ο β¦ π2:Ξ» )
πΒ·2Β·7 := πΒ·2Β·6 # π(πΒ·2Β·5)
π3Β·1 := πΒ·2Β·7 # πΌ(π1)
πΌ(L_number_plus): # πΌ(π2)
πΒ·4Β·1 := πΒ·2Β·6 # π
πΒ·4Β·2 := π3Β·1 # π(πΒ·4Β·1)
π4Β·1 := πΒ·4Β·2 # πΌ(π2)
πΒ·1Β·5 := β¦ a β¦ πΒ·2Β·6, b β¦ πΒ·2Β·6 β§:Ο # π
πΒ·1Β·6 := β¦ a β¦ πΒ·2Β·6, b β¦ πΒ·2Β·6 β§:Ο # π(πΒ·1Β·5)