packages feed

phino-0.0.169: test-resources/evaluate-packs/recalls-a-firing-whose-operand-dispatches-off-a-symbol.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# Both sides fire the same copy of 'L_id', whose operand dispatches off a
# bare symbol. The dispatch is 'opaque' and gives a new symbol (#2479), so the
# left one answers and the memo keeps the answer; the right one recalls it.
symbolic: |
  - Ξ»: L_fork
    dataize:
      𝛿1: $.on🌡
    morph:
      𝑛1: $.left🌡
      𝑛2: $.right🌡
    join:
      on: 𝛿1
      left: 𝑛1
      right: 𝑛2
      otherwise: L_fork
  - Ξ»: L_id
    morph:
      𝑛1: $.x
    𝑛: 𝑛1
location: 'Q.e1'
acyclic: plausible
input: '⟦ k ↦ ⟦ q ↦ ⟦⟧ ⟧, id ↦ ⟦ Ξ» ‍ L_id, x ↦ ⟦ Ξ» ‍ 𝜎1 ⟧.q ⟧, e1 ↦ ⟦ Ξ» ‍ L_fork, on🌡 ↦ ⟦ Ξ” ‍ 00- ⟧, left🌡 ↦ Ξ¦.id.Ο†, right🌡 ↦ Ξ¦.id.Ο† ⟧.Ο† ⟧'
result: '𝜎6:λ'
protocol: |
  𝕄(Ξ¦.e1):
    𝔼(L_fork):
      𝔻(ΞΎ.on🌡):
        𝛿·1Β·1 ≔ 00-
      𝛿1Β·1 ≔ 𝛿·1Β·1  # 𝔻(ΞΎ.on🌡)
      𝕄(ΞΎ.left🌡):
        remembered 𝑛·1Β·1 ≑ Ξ¦.id  # ⟦ Ξ» ‍ L_id, x ↦ 𝜎1:Ξ».q ⟧
        𝔼(L_id):
          𝕄(ΞΎ.x):
            opaque 𝜎2:Ξ» ≔ 𝜎1:Ξ».q
            morphed 𝑛·2Β·1 ≔ 𝜎2:Ξ»
          𝑛1Β·2 ≔ 𝑛·2Β·1  # 𝕄(ΞΎ.x)
          𝑛·2Β·2 ≔ 𝑛1Β·2  # 𝑛 of L_id
          𝕄(𝑛·2Β·2):
            morphed 𝑛·2Β·3 ≔ 𝑛1Β·2
          𝑛·2Β·4 ≔ 𝑛1Β·2  # 𝕄(𝑛·2Β·2)
          memoized 𝑛·1Β·1 ⇛ 𝜎2:Ξ»
          evaluated 𝑛·2Β·5 ≔ 𝑛·2Β·4  # 𝑛·1Β·1
        opaque 𝜎3:Ξ» ≔ 𝜎2:Ξ».Ο†
        morphed 𝑛·1Β·2 ≔ 𝜎3:Ξ»
      𝑛1Β·1 ≔ 𝑛·1Β·2  # 𝕄(ΞΎ.left🌡)
      𝕄(ΞΎ.right🌡):
        𝔼(L_id):
          recalled 𝑛·1Β·1 β‡’ 𝜎2:Ξ»
          𝑛·3Β·1 ≔ 𝑛·2Β·4  # 𝑛 of L_id
          𝑛·3Β·2 ≔ 𝑛·2Β·4  # 𝕄(𝑛·3Β·1)
          evaluated 𝑛·3Β·3 ≔ 𝑛·3Β·2  # 𝑛·1Β·1
        opaque 𝜎4:Ξ» ≔ 𝜎2:Ξ».Ο†
        morphed 𝑛·1Β·3 ≔ 𝜎4:Ξ»
      𝑛2Β·1 ≔ 𝑛·1Β·3  # 𝕄(ΞΎ.right🌡)
      joined 𝜎5 ≔ 𝛿1Β·1 ? 𝜎3 : 𝜎4
      𝑛·1Β·4 ≔ 𝜎5:Ξ»
      memoized 𝑛·1Β·5 ⇛ 𝜎5:Ξ»  # ⟦ Ξ» ‍ L_fork, on🌡 ↦ 00-:Ξ”, left🌡 ↦ Ξ¦.id.Ο†, right🌡 ↦ Ξ¦.id.Ο† ⟧
      evaluated 𝑛·1Β·6 ≔ 𝑛·1Β·4  # 𝑛·1Β·5
    opaque 𝜎6:Ξ» ≔ 𝜎5:Ξ».Ο†
    morphed 𝑛·0Β·1 ≔ 𝜎6:Ξ»