phino-0.0.152: test-resources/evaluate-packs/tells-two-carried-symbols-apart-in-one-firing.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# Both operands of the firing are symbols the program came in with, and both
# dataize to the very same 42. Only the protocol tells them apart: it writes
# the symbol each datum was manufactured for, so π2 and π5 stay two unknowns
# and not one.
symbolic: |
- Ξ»: L_number_plus
dataize:
πΏ1: $.Ο
πΏ2: $.x
π: Ξ¦.number( Ο β¦ β¦ Ξ» β€ π β§ )
location: 'Q.@'
deep: true
input: >
β¦ bytes(Ο) β¦ β¦β§,
number(Ο) β¦ β¦ plus(Ο, x) β¦ β¦ Ξ» β€ L_number_plus β§ β§,
@ β¦ Ξ¦.number( Ο β¦ β¦ Ξ» β€ π2 β§ ).plus(
Ξ¦.number( Ο β¦ β¦ Ξ» β€ π5 β§ ) ) β§
result: 'β¦ Ο β¦ π6:Ξ», plus(x) β¦ L_number_plus:Ξ» β§'
protocol: |
π(Ξ¦.Ο):
πΒ·0Β·1 := Ξ¦.number( Ο β¦ π2:Ξ» )
πΒ·0Β·2 := πΒ·0Β·1.plus( x β¦ Ξ¦.number( Ο β¦ π5:Ξ» ) )
π(Ξ¦.Ο.x):
πΒ·0Β·3 := Ξ¦.number( Ο β¦ π5:Ξ» )
πΌ(L_number_plus):
π»(Ξ¦.aπ΅0):
π(Ξ¦.aπ΅0):
πΒ·1Β·1 := Ξ¦.number( Ο β¦ π2:Ξ» )
πΏ1Β·1 := π»(π2:Ξ») # π»(ΞΎ.Ο)
π»(Ξ¦.aπ΅1):
π(Ξ¦.aπ΅1):
πΒ·1Β·2 := Ξ¦.number( Ο β¦ π5:Ξ» )
πΏ2Β·1 := π»(π5:Ξ») # π»(ΞΎ.x)
πΒ·1Β·3 := Ξ¦.number( Ο β¦ π6:Ξ» ) # π
π(πΒ·1Β·3):
πΒ·1Β·4 := Ξ¦.number( Ο β¦ π6:Ξ» )
πΒ·1Β·5 := πΒ·1Β·4 # π(πΒ·1Β·3)