phino-0.0.157: test-resources/evaluate-packs/diverges-on-two-sides-that-do-not-join.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A join on a condition nobody decided: the condition comes down through 𝔻
# and answers a symbol nobody has decided. The join brings both sides to a
# normal form through 𝕄 first, each a call of 'plus' nobody has fired
# (#1954). The calls add other numbers, so no join makes one term of them,
# and the firing writes 'diverged' with the metas of the applications that
# made the two sides, instead of splitting the run (#1996). Its comment tells
# that the two copies of 'plus' first differ at the ρ the protocol hides, and
# that the join names no function to fabricate a formation with (#2043).
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.@'
input: >
⟦ bytes(φ) ↦ ⟦⟧,
bool(φ) ↦ ⟦ if ↦ ⟦ ρ ↦ ∅, then ↦ ∅, else ↦ ∅, λ ⤍ L_fork ⟧ ⟧,
number(φ) ↦ ⟦
gt(ρ, x) ↦ ⟦ λ ⤍ L_number_gt ⟧,
plus(ρ, x) ↦ ⟦ λ ⤍ L_number_plus ⟧ ⟧,
φ ↦ 5.gt( 0 ).if( 1.plus( 2 ), 3.plus( 4 ) ).φ ⟧
fails: "No entry of --symbolic answers the λ function 'L_fork'"
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 ) )
𝑛·0·4 := 𝑛·0·3( else ↦ 3.plus( 4 ) )
𝔼(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 )
𝕄(Φ.a🌵4):
𝑛·2·4 := 3
𝑛·2·5 := 𝑛·2·4.plus( x ↦ 4 )
diverged 𝑛·2·3 vs 𝑛·2·5 # they differ at .ρ, and the join names no otherwise