phino-0.0.156: test-resources/evaluate-packs/fires-the-arguments-of-a-copy-it-defers.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The deferral of #1892 over a copy with two arguments: 'x' reads to the bare
# symbol 'π1', so the copy is deferred, and 'w' is a call of 'L_inc'. Before it
# writes the 'deferred' line, the 'unfold' line morphs 'w' at 'π2.w' and fires
# what it comes to, so the line names the object 'Ξ¦.num' the argument stands
# for, instead of the call as the code spells it (#1916, #1921).
symbolic: |
- Ξ»: L_fork
morph:
π1: $.a
π2: $.b
unfold:
π3: {of: π2, defer: true}
join:
π4: [π1, π3]
π: β¦ Ο β¦ π4 β§
- Ξ»: L_inc
dataize:
πΏ1: $.x
π: Ξ¦.num( Ο β¦ β¦ Ξ» β€ π β§ )
location: 'Q.y'
input: 'β¦ box(x, w) β¦ β¦ Ο β¦ x.next β§, num(Ο) β¦ β¦β§, inc(x) β¦ β¦ Ξ» β€ L_inc β§, items β¦ β¦ tail β¦ β¦ Ξ» β€ π1 β§ β§, y β¦ β¦ a β¦ β¦ Ξ» β€ π2 β§, b β¦ Ξ¦.box( x β¦ Ξ¦.items.tail, w β¦ Ξ¦.inc( β¦ Ξ β€ 2A- β§ ) ), Ξ» β€ L_fork β§.Ο β§'
result: 'π5:Ξ»'
protocol: |
π(Ξ¦.y):
πΌ(L_fork):
π1Β·1 := π2:Ξ» # π(ΞΎ.a)
π(Ξ¦.aπ΅1):
πΒ·1Β·1 := Ξ¦.box( x β¦ Ξ¦.items.tail )
πΒ·1Β·2 := πΒ·1Β·1( w β¦ Ξ¦.inc( 2A-:Ξ ) )
π2Β·1 := πΒ·1Β·2 # π(ΞΎ.b)
π(π2.w):
πΒ·1Β·3 := Ξ¦.inc( x β¦ 2A-:Ξ )
πΌ(L_inc): # πΌ(π2.w)
π»(Ξ¦.aπ΅2):
πΏΒ·2Β·1 := 2A-
πΏ1Β·2 := πΏΒ·2Β·1 # π»(ΞΎ.x)
πΒ·2Β·1 := Ξ¦.num( Ο β¦ π3:Ξ» ) # π
π(πΒ·2Β·1):
πΒ·2Β·2 := Ξ¦.num( Ο β¦ π3:Ξ» )
πΒ·2Β·3 := πΒ·2Β·2 # π(πΒ·2Β·1)
deferred(π4) := Ξ¦.box( x β¦ π1:Ξ», w β¦ πΒ·2Β·2 ) # π(π2.Ο)
π»(π5:Ξ») β { π»(π2:Ξ»), π»(π4:Ξ») }
π4Β·1 := π5:Ξ» # [π1, π3]
πΒ·1Β·4 := π5:Ξ»:Ο # π
πΒ·1Β·5 := π5:Ξ»:Ο # π(πΒ·1Β·4)