packages feed

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)