phino-0.0.134: benchmark/atoms.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The Ξ» functions the symbolic cases of the benchmark fire over
# 'benchmark/demo.phi'. phino implements none of them, so without this file
# every Ξ» function that world names would get stuck and nothing would be
# measured. Every entry answers symbolically: the operands come down through π»
# or reach a normal form through π, and the term under 'π' carries a fresh
# symbol π standing for the value nobody worked out. Nothing here computes,
# which is what makes the morphing symbolic and what keeps the numbers below a
# measure of phino rather than of arithmetic.
# Arithmetic over two numbers answers a number nobody has worked out.
- Ξ»: L_number_(plus|times)
dataize:
πΏ1: $.Ο
πΏ2: $.x
π: Ξ¦.number( Ο β¦ Ξ¦.bytes( Ο β¦ β¦ Ξ» β€ π β§ ) )
# Comparing two numbers answers a bool nobody has decided, carrying the fork
# below as its 'if', which is what the branching cases of the demo world then
# dispatch.
- Ξ»: L_number_gt
dataize:
πΏ1: $.Ο
πΏ2: $.x
π: Ξ¦.bool( if β¦ β¦ Ξ» β€ L_fork, left β¦ β
, right β¦ β
, Ο β¦ β¦ Ξ» β€ π β§ β§ )
# A branch answers neither of its sides: nobody has picked between the two, so
# both of them reach a normal form through π, are stood into unknowns and are
# joined into the one shape they share.
- Ξ»: L_fork
dataize:
πΏ1: $.Ο
morph:
π1: $.left
π2: $.right
symbolize:
π3: π1
π4: π2
join:
π5: [π3, π4]
π: π5
# An entry of the demo world: its number comes down through π» and the term it
# marks reaches a normal form through π, which is the work the symbolic cases
# time.
- Ξ»: L_entry
dataize:
πΏ1: $.n
morph:
π1: $.v.Ο
π: π1