packages feed

phino-0.0.157: test-resources/evaluate-packs/writes-no-joined-line-for-a-join-the-memo-answered.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A join the memo of 'plausible' answered writes no 'joined' line (#2011). The
# program reads 'f' twice, so the join of 'L_fork' fires twice over the same
# formation. The first firing brings its condition down to '𝛿1Β·2', mints 𝜎4
# and writes 'joined 𝜎4 := 𝛿1Β·2 ? 𝜎2 : 𝜎3'. The second one takes that answer
# from the memo and brings nothing down, so no meta of its own holds the
# condition, and it writes the answer alone, the way a firing the memo
# answered writes no symbol it minted.
symbolic: |
  - Ξ»: L_number_gt
    dataize:
      𝛿1: $.ρ
      𝛿2: $.x
    𝑛: Ξ¦.bool( Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ )
  - Ξ»: L_number_plus
    dataize:
      𝛿1: $.ρ
      𝛿2: $.x
    𝑛: Ξ¦.number( Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ )
  - Ξ»: L_fork
    dataize:
      𝛿1: $.ρ
    join:
      on: 𝛿1
      left: $.then
      right: $.else
location: 'Q.@'
acyclic: plausible
input: >
  ⟦ bytes(Ο†) ↦ ⟦⟧,
    bool(Ο†) ↦ ⟦ if ↦ ⟦ ρ ↦ βˆ…, then ↦ βˆ…, else ↦ βˆ…, Ξ» ‍ L_fork ⟧ ⟧,
    number(Ο†) ↦ ⟦
      gt(ρ, x) ↦ ⟦ Ξ» ‍ L_number_gt ⟧,
      plus(ρ, x) ↦ ⟦ Ξ» ‍ L_number_plus ⟧ ⟧,
    f ↦ 5.gt( 0 ).if( 1.plus( 2 ).plus( 0 ), 3.plus( 4 ).plus( 0 ) ),
    Ο† ↦ Ξ¦.f.plus( Ξ¦.f ).Ο† ⟧
result: '𝜎6:λ'
protocol: |
  𝕄(Ξ¦.Ο†):
    𝑛·0Β·1 := 5
    𝑛·0Β·2 := 𝑛·0Β·1.gt( x ↦ 0 )
    𝔼(L_number_gt):
      𝔻(Ξ¦.a🌡0):
        𝕄(Ξ¦.a🌡0):
          𝑛·1Β·1 := 5
          𝑛·1Β·2 := Ξ¦.bytes( Ο† ↦ 40-14-00-00-00-00-00-00:Ξ” )
        𝛿·1Β·1 := 40-14-00-00-00-00-00-00  # 5.0
      𝛿1Β·1 := 𝛿·1Β·1  # 𝔻(ΞΎ.ρ)
      𝔻(Ξ¦.a🌡1):
        𝕄(Ξ¦.a🌡1):
          𝑛·1Β·3 := 0
          𝑛·1Β·4 := Ξ¦.bytes( Ο† ↦ 00-00-00-00-00-00-00-00:Ξ” )
        𝛿·1Β·2 := 00-00-00-00-00-00-00-00  # 0.0
      𝛿2Β·1 := 𝛿·1Β·2  # 𝔻(ΞΎ.x)
      𝑛·1Β·5 := Ξ¦.bool( Ο† ↦ 𝜎1:Ξ» )  # 𝑛
      𝕄(𝑛·1Β·5):
        𝑛·1Β·6 := Ξ¦.bool( Ο† ↦ 𝜎1:Ξ» )
      𝑛·1Β·7 := 𝑛·1Β·6  # 𝕄(𝑛·1Β·5)
    𝑛·0Β·3 := 𝑛·1Β·6.if( then ↦ 1.plus( 2 ).plus( 𝑛·1Β·3 ) )
    𝑛·0Β·4 := 𝑛·0Β·3( else ↦ 3.plus( 4 ).plus( 𝑛·1Β·3 ) )
    𝔼(L_fork):
      𝔻(Ξ¦.a🌡2):
        𝕄(Ξ¦.a🌡2):
          𝑛·2Β·1 := Ξ¦.bool( Ο† ↦ 𝜎1:Ξ» )
      𝛿1Β·2 := 𝔻(𝜎1:Ξ»)  # 𝔻(ΞΎ.ρ)
      𝕄(Ξ¦.a🌡3):
        𝑛·2Β·2 := 1
        𝑛·2Β·3 := 𝑛·2Β·2.plus( x ↦ 2 )
        𝔼(L_number_plus):
          𝔻(Ξ¦.a🌡4):
            𝕄(Ξ¦.a🌡4):
              𝑛·3Β·1 := 1
              𝑛·3Β·2 := Ξ¦.bytes( Ο† ↦ 3F-F0-00-00-00-00-00-00:Ξ” )
            𝛿·3Β·1 := 3F-F0-00-00-00-00-00-00  # 1.0
          𝛿1Β·3 := 𝛿·3Β·1  # 𝔻(ΞΎ.ρ)
          𝔻(Ξ¦.a🌡5):
            𝕄(Ξ¦.a🌡5):
              𝑛·3Β·3 := 2
              𝑛·3Β·4 := Ξ¦.bytes( Ο† ↦ 40-00-00-00-00-00-00-00:Ξ” )
            𝛿·3Β·2 := 40-00-00-00-00-00-00-00  # 2.0
          𝛿2Β·3 := 𝛿·3Β·2  # 𝔻(ΞΎ.x)
          𝑛·3Β·5 := Ξ¦.number( Ο† ↦ 𝜎2:Ξ» )  # 𝑛
          𝕄(𝑛·3Β·5):
            𝑛·3Β·6 := Ξ¦.number( Ο† ↦ 𝜎2:Ξ» )
          𝑛·3Β·7 := 𝑛·3Β·6  # 𝕄(𝑛·3Β·5)
        𝑛·2Β·4 := 𝑛·3Β·6.plus( x ↦ 𝑛·1Β·3 )
      𝕄(Ξ¦.a🌡6):
        𝑛·2Β·5 := 3
        𝑛·2Β·6 := 𝑛·2Β·5.plus( x ↦ 4 )
        𝔼(L_number_plus):
          𝔻(Ξ¦.a🌡7):
            𝕄(Ξ¦.a🌡7):
              𝑛·4Β·1 := 3
              𝑛·4Β·2 := Ξ¦.bytes( Ο† ↦ 40-08-00-00-00-00-00-00:Ξ” )
            𝛿·4Β·1 := 40-08-00-00-00-00-00-00  # 3.0
          𝛿1Β·4 := 𝛿·4Β·1  # 𝔻(ΞΎ.ρ)
          𝔻(Ξ¦.a🌡8):
            𝕄(Ξ¦.a🌡8):
              𝑛·4Β·3 := 4
              𝑛·4Β·4 := Ξ¦.bytes( Ο† ↦ 40-10-00-00-00-00-00-00:Ξ” )
            𝛿·4Β·2 := 40-10-00-00-00-00-00-00  # 4.0
          𝛿2Β·4 := 𝛿·4Β·2  # 𝔻(ΞΎ.x)
          𝑛·4Β·5 := Ξ¦.number( Ο† ↦ 𝜎3:Ξ» )  # 𝑛
          𝕄(𝑛·4Β·5):
            𝑛·4Β·6 := Ξ¦.number( Ο† ↦ 𝜎3:Ξ» )
          𝑛·4Β·7 := 𝑛·4Β·6  # 𝕄(𝑛·4Β·5)
        𝑛·2Β·7 := 𝑛·4Β·6.plus( x ↦ 𝑛·1Β·3 )
      joined 𝜎4 := 𝛿1Β·2 ? 𝜎2 : 𝜎3
      𝑛·2Β·8 := ⟦ x ↦ 𝑛·1Β·3, Ξ» ‍ L_number_plus ⟧  # 𝕄(ΞΎ.then), 𝕄(ΞΎ.else)
    𝔼(L_number_plus):
      𝔻(Ξ¦.a🌡9):
        𝕄(Ξ¦.a🌡9):
          𝑛·5Β·1 := Ξ¦.number( Ο† ↦ 𝜎4:Ξ» )
      𝛿1Β·5 := 𝔻(𝜎4:Ξ»)  # 𝔻(ΞΎ.ρ)
      𝔻(Ξ¦.a🌡10):
        𝕄(Ξ¦.a🌡10):
          𝑛·5Β·2 := Ξ¦.number( Ο† ↦ 𝑛·1Β·4 )
          𝑛·5Β·3 := Ξ¦.bytes( Ο† ↦ 00-00-00-00-00-00-00-00:Ξ” )
        𝛿·5Β·1 := 00-00-00-00-00-00-00-00  # 0.0
      𝛿2Β·5 := 𝛿·5Β·1  # 𝔻(ΞΎ.x)
      𝑛·5Β·4 := Ξ¦.number( Ο† ↦ 𝜎5:Ξ» )  # 𝑛
      𝕄(𝑛·5Β·4):
        𝑛·5Β·5 := Ξ¦.number( Ο† ↦ 𝜎5:Ξ» )
      𝑛·5Β·6 := 𝑛·5Β·5  # 𝕄(𝑛·5Β·4)
    𝑛·0Β·5 := 𝑛·5Β·5.plus( x ↦ Ξ¦.f )
    𝔼(L_number_plus):
      𝔻(Ξ¦.a🌡11):
        𝕄(Ξ¦.a🌡11):
          𝑛·6Β·1 := Ξ¦.number( Ο† ↦ 𝜎5:Ξ» )
      𝛿1Β·6 := 𝔻(𝜎5:Ξ»)  # 𝔻(ΞΎ.ρ)
      𝔻(Ξ¦.a🌡12):
        𝕄(Ξ¦.a🌡12):
          𝑛·6Β·2 := Ξ¦.number( Ο† ↦ 𝑛·1Β·2 )
          𝑛·6Β·3 := 𝑛·6Β·2.gt( x ↦ 𝑛·5Β·2 )
          𝔼(L_number_gt):
            𝑛·7Β·1 := 𝑛·2Β·1  # 𝑛
            𝑛·7Β·2 := 𝑛·1Β·7  # 𝕄(𝑛·7Β·1)
          𝑛·6Β·4 := 𝑛·2Β·1.if( then ↦ 𝑛·3Β·1.plus( 𝑛·3Β·3 ).plus( 𝑛·5Β·2 ) )
          𝑛·6Β·5 := 𝑛·6Β·4( else ↦ 𝑛·4Β·1.plus( 𝑛·4Β·3 ).plus( 𝑛·5Β·2 ) )
        𝔼(L_fork):
          𝑛·8Β·1 := ⟦ x ↦ 𝑛·5Β·2, Ξ» ‍ L_number_plus ⟧  # 𝕄(ΞΎ.then), 𝕄(ΞΎ.else)
        𝔼(L_number_plus):
          𝑛·9Β·1 := 𝑛·6Β·1  # 𝑛
          𝑛·9Β·2 := 𝑛·5Β·6  # 𝕄(𝑛·9Β·1)
      𝛿2Β·6 := 𝔻(𝜎5:Ξ»)  # 𝔻(ΞΎ.x)
      𝑛·6Β·6 := Ξ¦.number( Ο† ↦ 𝜎6:Ξ» )  # 𝑛
      𝕄(𝑛·6Β·6):
        𝑛·6Β·7 := Ξ¦.number( Ο† ↦ 𝜎6:Ξ» )
      𝑛·6Β·8 := 𝑛·6Β·7  # 𝕄(𝑛·6Β·6)