# NUMA v0.2: Provisional Formal Specification

**Status:** Experimental draft, October 2026. Not a recognized international standard.

## Purpose
NUMA represents selected semantic concepts as language-neutral numeric identifiers. Each three-digit code refers to a concept in a versioned registry. Function application represents semantic relationships. The identifier assignments are **arbitrary** and require learning or a software translator.

## Syntax (human-readable)
```ebnf
expression = code, [ "(", expression, { ",", expression }, ")" ] ;
code       = digit, digit, digit ;
digit      = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
```
Whitespace is ignored. A leaf is a code without arguments. Functional codes have fixed arities; see `concepts.json`. Maximum input length is 4,000 characters, expression depth is 24, and node count is 200 in the current reference engine.

## Semantic roles
Every action defines the roles of its ordered arguments. This version uses:
* 110 DRINK(agent, liquid)
* 108 GIVE(giver, recipient, object)
* 107 HAVE(holder, object)
* 106 NEED(experiencer, thing)
* 113 COST(item, quantity)
* 930 DESCRIBE(entity, property)
* 900 NOT(proposition)
* 901 PAST(proposition)
* 902 FUTURE(proposition)
* 903 QUESTION(proposition)
* 904 AND(proposition, proposition)
* 905 IF(condition, consequent)
* 906 REQUEST(proposition)
* 907 URGENT(proposition)
* 908 POSSIBLE(proposition)
* 800 NUMBER_VALUE(three-digit-literal)
* 801 QUANTITY(NUMBER_VALUE, unit)

Codes 001..004 represent discourse references, not globally identifiable persons. Codes do not encode physical facts by themselves. Pronouns and politeness are language-specific renderings.

## Numeric literals
`800(150)` means an unsigned integer with value 150; this v0.2 reference implementation accepts exactly three digits (000 through 999). Numeric literals are not concept identifiers. A code inside 800 may collide with an ordinary registry ID or control token, so digits-only transmissions must escape literals. Future versions will add unbounded signed numbers, decimals, scientific notation, and units.

## Digits-only transport
Three-digit control tokens:
* `990`: open argument list
* `991`: argument separator
* `992`: close argument list
* `993`: next three-digit token is a numeric literal, not a concept or control symbol

Example: `110(001,201)` -> `110990001991201992`.
Example: `800(990)` -> `800990993990992`.

All tokens in v0.2 are three digits long, and the digits-only representation is uniquely decodable for valid expressions.

## Translation and semantics
Natural-language sentences currently exist for curated examples only. For other valid inputs, the engine provides a **structural semantic gloss**, not a fluent translation. The grammar does not yet encode aspect, evidentiality, quantifier scope, identity, speech acts in detail, or cultural pragmatics. The registry's individual semantic definitions and role constraints are provisional.

## Versioning rules
Registry codes must never silently change meaning within a released version. A future version must pin the registry version and grammar version in every transmitted message. This proof of concept omits envelope/version bytes, authentication, error correction, and transport framing.

## Verification
Run `node --test tests.mjs` with Node.js 20+. Tests cover parser validation, numeric escaping, round-trip transport, and invalid input. Independent tests of human interpretation remain future research.
