phino-0.0.152: test-resources/evaluate-packs/fires-nothing-twice-in-a-binding-a-dispatch-reads.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# Under '--deep' the head pass of π fires the reads of siblings in the
# binding it dispatches into before it reads that binding (#1727), and only
# them. Here every sibling 'Ο' reads is 'a', which is no Ξ», so nothing fires
# before the head pass reads 'Ο', and each of the two 'L_plus' fires once.
# Walking the whole binding instead would settle 'a.twice.plus' on the way,
# which fires the inner 'L_plus', and keep nothing of it, since what it
# settles to is a 'plus' still waiting for 'x' and no answer of a Ξ». The head
# pass would then fire the inner 'L_plus' again, three firings in all.
symbolic: |
- Ξ»: L_plus
dataize:
πΏ1: $.Ο
πΏ2: $.x
π: Ξ¦.bytes( Ο β¦ β¦ Ξ» β€ π β§ )
location: 'Q.e'
deep: true
partial: true
input: >
β¦ bytes(Ο) β¦ β¦ plus(Ο, x) β¦ L_plus:Ξ», twice(Ο) β¦ β¦ Ο β¦ ΞΎ.Ο.plus( x β¦ ΞΎ.Ο ) β§ β§,
pair(a) β¦ β¦ Ο β¦ a.twice.plus( x β¦ a ) β§,
e β¦ Ξ¦.pair( Ξ¦.bytes( Ο β¦ π1:Ξ» ) ).Ο β§
result: 'β¦ Ο β¦ π3:Ξ», plus(x) β¦ L_plus:Ξ», twice β¦ Ο.plus( x β¦ Ο ):Ο β§'
protocol: |
π(Ξ¦.e):
πΒ·0Β·1 := Ξ¦.pair( a β¦ Ξ¦.bytes( Ο β¦ π1:Ξ» ) )
πΒ·0Β·2 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΒ·0Β·3 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΒ·0Β·4 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΒ·0Β·5 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΒ·0Β·6 := πΒ·0Β·5.plus( x β¦ πΒ·0Β·5 )
πΌ(L_plus):
π»(Ξ¦.aπ΅0):
π(Ξ¦.aπ΅0):
πΒ·1Β·1 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΏ1Β·1 := π»(π1:Ξ») # π»(ΞΎ.Ο)
π»(Ξ¦.aπ΅1):
π(Ξ¦.aπ΅1):
πΒ·1Β·2 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΏ2Β·1 := π»(π1:Ξ») # π»(ΞΎ.x)
πΒ·1Β·3 := Ξ¦.bytes( Ο β¦ π2:Ξ» ) # π
π(πΒ·1Β·3):
πΒ·1Β·4 := Ξ¦.bytes( Ο β¦ π2:Ξ» )
πΒ·1Β·5 := πΒ·1Β·4 # π(πΒ·1Β·3)
πΒ·0Β·7 := πΒ·1Β·4.plus( x β¦ πΒ·1Β·2 )
π(Ξ¦.e.x):
πΒ·0Β·8 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΒ·0Β·9 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΒ·0Β·10 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΌ(L_plus):
π»(Ξ¦.aπ΅2):
π(Ξ¦.aπ΅2):
πΒ·2Β·1 := Ξ¦.bytes( Ο β¦ π2:Ξ» )
πΏ1Β·2 := π»(π2:Ξ») # π»(ΞΎ.Ο)
π»(Ξ¦.aπ΅3):
π(Ξ¦.aπ΅3):
πΒ·2Β·2 := Ξ¦.bytes( Ο β¦ π1:Ξ» )
πΏ2Β·2 := π»(π1:Ξ») # π»(ΞΎ.x)
πΒ·2Β·3 := Ξ¦.bytes( Ο β¦ π3:Ξ» ) # π
π(πΒ·2Β·3):
πΒ·2Β·4 := Ξ¦.bytes( Ο β¦ π3:Ξ» )
πΒ·2Β·5 := πΒ·2Β·4 # π(πΒ·2Β·3)