PoF-X Pack Language, version 1 (public edition, 28 November 2026) ================================================================== Novalith Holdings OU, Tallinn, Estonia. https://platform.ethtopology.com/pack-language.txt Technical note and this language, citable (Zenodo): https://doi.org/10.5281/zenodo.24623441 This language is open: anyone may read it, write packs in it, publish packs and build tools for it, free of charge. The PoF-X kernel that certifies, seals and judges packs is not part of this licence; it is reached through the PoF-X API and the free tools (https://platform.ethtopology.com/getting-started.txt). Requests for the full kernel in a private build (silicon, embedded, on premises): the request_kernel tool or hani@novalithip.com. "PoF-X" is a trade name of Novalith Holdings OU. The methods the kernel applies are the subject of its patent applications. Try a pack now, without an account: curl -s https://platform.ethtopology.com/api/tools/check_own_pack -H "Content-Type: application/json" \ -d '{"pack_text":"","records":[{"":""}]}' ## 0. Authority 1. The final authority on whether a pack is valid is the `certify` command of the PoF-X kernel, reached through the PoF-X API or the free tools (lint_pack). Where this document and `certify` disagree, `certify` is right and this document is wrong; please report it to hani@novalithip.com. 2. This document describes language version `pofx11.2` (the current format) and, where they differ, `pofx11.1` and packs without a format line. New packs must use `pofx11.2`. 3. The example in section 13 was run with the kernel; the results shown are the kernel's own output. ## 1. What a pack is A pack is a UTF-8 text file (extension `.pofxpack`) that states measured fields, optional derived quantities, and barriers: thresholds that a record must satisfy. The kernel reads a pack, proves properties of its mathematics (`certify`), freezes it (`seal`), and then judges records against it (`gate`), producing a verdict per record and a chain that anyone can re-derive (`replay`). A pack contains no expressions and no program: every quantity is one of a fixed set of forms, so that its evaluation is fixed by a published contract. ## 2. Text layer 1. The file is at most 1,048,576 bytes. 2. The file is well-formed UTF-8 in its shortest form. A byte-order mark at the very start is removed and accepted. 3. Refused anywhere in the file: control characters other than tab and line feed, including NUL; a carriage return that does not end a line; C1 controls U+0080..U+009F; invisible and direction-changing characters (soft hyphen, zero-width characters, bidirectional controls, line and paragraph separators, noncharacters). The reason: what a person sees must be what the kernel loads. 4. Lines end with LF or CR LF. Leading and trailing blanks of a line are ignored. ## 3. Lines 1. An empty line, or a line whose first non-blank character is `#` or `;`, is a comment and is ignored. Comments may use any script. 2. A line `[name]` opens a section. The six section names are `pack`, `field`, `derived`, `barrier`, `derivation`, `certificate`. Any other name is refused. There is exactly one `[pack]` section. 3. Every other line has the form `key = value`, split at the first `=`; blanks around key and value are ignored. A line without `=` is refused. 4. A key outside any section is refused. A key stated twice in one section is refused. A key that the section does not define is refused. 5. Nothing that the evaluation reads is ever defaulted in an unsealed text: a missing `scale`, `citation_class` or `range` is refused with the line to write. A missing line may be a line that a damaged line break swallowed. ## 4. Value types 1. NAME (the values of `id`, `version`, `quantity`, each item of `inputs`, and the column names of a record file): printable ASCII U+0021..U+007E, single blanks inside, no `=`, no `,`, not empty. A name in another script is refused; a comma and two blanks in a row are refused. Reason: two names that print the same must be the same name. 2. NUMBER: an optional sign, decimal digits with at most one point, an optional exponent (`e` or `E`, optional sign, digits); the whole value and nothing else. A comma is not a decimal point. A number too large for binary64 is refused, and so is a non-zero number that would round to zero. 3. FREE TEXT (`citation`, `derivation`, `unit`): any script. A `unit` may not contain `=`. 4. ENUMERATIONS are written exactly as listed in section 5, in lower case. ## 5. Sections and keys ### 5.1 `[pack]` (exactly one) | key | type | rule | |---|---|---| | `id` | NAME | required | | `version` | NAME | required | | `format` | `pofx11.2` or `pofx11.1` | write `pofx11.2`; any other value is refused | | `period` | `YYYY to YYYY` | required in pofx11.2; two four-digit years, first not after second; refused in other formats | | `citation_audit_date` | `YYYY-MM-DD` | required in pofx11.2; a real calendar date | | `sealed_freeze` | hex digest | written by `seal`; never written by an author | ### 5.2 `[field]` (one per measured quantity) | key | type | rule | |---|---|---| | `id` | NAME | required, unique among fields and derived quantities | | `unit` | FREE TEXT | the unit of the measurement | | `range` | `low, high` or `unbounded` | required; two finite numbers with low not above high; a record outside the range gets no verdict | | `step` | text | pofx11.1 only | ### 5.3 `[derived]` (a quantity computed from fields or other derived quantities) | key | type | rule | |---|---|---| | `id` | NAME | required; may not repeat a field id | | `unit` | FREE TEXT | | | `form` | one of the nine forms below | an expression is refused | | `inputs` | NAMES separated by commas | required; each resolves to a field or derived quantity; no cycles | | `scale` | NUMBER | required for `ratio`, `product`, `power`; refused for every other form | | `power` | integer | required for `power` only; 0 is refused | | `weights` | NUMBERS separated by commas | required for `weighted_sum` only, one per input | | `citation` | FREE TEXT | recommended (a warning when absent) | | form | inputs | value | |---|---|---| | `direct` | 1 | the input | | `ratio` | 2 | scale * v0 / v1 | | `difference` | 2 | v0 - v1 | | `power` | 1 | scale * v0 ^ power (integer exponent) | | `sum` | 1 or more | v0 + v1 +... | | `product` | 1 or more | scale * v0 * v1 *... | | `weighted_sum` | 1 or more | w0 * v0 + w1 * v1 +... (fused multiply-add accumulation) | | `min` | 1 or more | the smallest input | | `max` | 1 or more | the largest input | A wrong input count is refused with the counts. Each form is evaluated exactly as the evaluation contract pins it; a derived quantity that cannot be evaluated (a non-finite value, a zero denominator) gives no verdict for that record. ### 5.4 `[barrier]` (a threshold) | key | type | rule | |---|---|---| | `id` | NAME | required, unique | | `quantity` | NAME | a field or derived quantity of this pack | | `form` | one of the six forms below | required | | `limit` | NUMBER | required (the lower bound for `band`, the target for `equality`) | | `upper` | NUMBER | `band` only, required there, greater than `limit` | | `tolerance` | NUMBER | `equality` only, required there, not negative | | `scale` | NUMBER or the word `limit` | required; strictly positive; `limit` means the magnitude of the limit and is refused when the limit is 0 | | `unit` | FREE TEXT | must equal the unit of the quantity | | `role` | `scope` or `requirement` | required on every barrier in pofx11.2 | | `citation_class` | one of six classes (section 6) | required | | `citation` | FREE TEXT | required; its content is checked by class (section 6) | | `derivation` | FREE TEXT | required for `citation_class = derived` | | form | admits a record when | words in a rule that call for it | |---|---|---| | `minimum` | q >= limit | "at least", "not less than" | | `minimum_strict` | q > limit | "more than", "above", "exceeding" | | `ceiling` | q <= limit | "at most", "not more than", "up to" | | `ceiling_strict` | q < limit | "less than", "below" | | `band` | limit <= q <= upper | "between... and..." (inclusive) | | `equality` | abs(q - limit) <= tolerance | "equal to... within..." | The slack of a barrier is normalised as B = slack / scale; a record is admitted when every barrier admits it (B >= 0, or B > 0 for a strict form). The binding barrier is the first one in declaration order with the smallest B. Copy the comparison word of the rule exactly: "above 5 000 GT" is `minimum_strict`, and a non-strict minimum would admit a ship of exactly 5 000 GT. A `scope` barrier decides whether a record is in the scope of the rule; a `requirement` barrier decides the verdict. ### 5.5 Advanced sections `[derivation]` (40 keys) declares a sealed dynamic model from which a `derived_replayable` threshold is extracted (OTRD); `[certificate]` (keys `id`, `class`, `unit`, and class-specific body keys) declares an OT certificate. Both are authored with Novalith in version 1 of this specification; they are not needed to write a domain pack. Their keys are given on request. ## 6. Citation discipline | class | use it when | what `certify` requires | provenance grade | |---|---|---|---| | `statutory` | a numbered provision of binding law states the number | the citation names the instrument (a word Regulation, Directive or Decision, or CRR, EBA, ISO, ASME, API, EN, alone or with digits) and the part that carries the number (an article with its paragraph in parentheses such as `Article 4(2)`, or paragraph, subparagraph, point, section, clause or Annex with which one) | 1 | | `supervisory` | a published supervisory guideline or trigger | the same two requirements as statutory | stated | | `public_domain` | an established engineering or scientific result | a citation | stated | | `derived` | arithmetic from another cited number | a `derivation` line | stated | | `operator` | the operator chose the number; nothing published | the citation says so: it contains `operator-chosen`, `operator chosen`, `no published source` or `internal` | 2 | | `derived_replayable` | extracted from a sealed dynamic model | `derivation = otrd:` naming a `[derivation]` section | stated | 1. The kernel does not read laws. It checks that a citation has the form of a checkable reference; whether the number matches the cited text is the author's responsibility and the reviewer's. A pack that names a real instrument and paragraph with a wrong number certifies (this is the kernel's stated hard limit 5). 2. Packs of format pofx11.1 and pofx11.2 also accept the citation forms of a UK Statutory Instrument and a US CFR paragraph. 3. The citation may quote the source in any script, provided the required words are present. ## 7. Size limits At most 1,024 fields, 1,024 derived quantities, 1,024 barriers, 4,096 derived inputs in total, 64 derivations and 16 certificates; a pack with no barrier is refused. ## 8. Records A record file is a CSV whose header names the fields of the pack (NAMES), one record per row, plain decimal numbers, no quoting. A value outside the declared range or a non-finite value gives that record no verdict; it never gives a guessed verdict. Three ways a value can be missing, three different results: (1) a COLUMN of the pack missing from the header: every record gets no verdict, "field '': missing input" (gate exit 2); (2) an EMPTY CELL, a cell that is not a decimal number, or a row with fewer or more cells than the header: the reader refuses the whole file (gate exit 4; before refusing, gate may already have printed the rows before the bad one: discard that output); (3) a BLANK LINE: skipped, see below. An empty cell, a cell that is not a decimal number, or a row with fewer cells than the header is not a record: the reader refuses the whole file. A BLANK LINE in a record file is skipped, not refused, and the chain's row numbers count only the non-blank rows; so in a pack with one field, a missing measurement written as an empty line disappears from the gate instead of refusing the file. Write every record; never leave a line empty. ## 9. Commands and exit codes | command | through the API | exit codes | |---|---|---| | `certify ` | yes | 0 Tier A, 3 loads but Tier B (the reason is printed), 4 will not load (the line and the reason are printed) | | `seal ` | yes | 0 sealed file written, 4 the pack does not load | | `gate ` | yes | 0 every record admitted, 1 at least one rejected, 2 at least one without a verdict or no records, 4 the record file is refused (section 8) | | `replay ` | yes, always with `--expect` | 0 verified, 5 mismatch; 6 only when run directly without `--expect`: every row matches but nothing pins the three inputs | | `barriers`, `pack-facts` | yes | facts of the pack as the kernel reads them | ## 10. Grades and tiers A grade has two axes: A or B for the mathematics, 1, R or 2 for the provenance (1 statutory, 2 operator-chosen, R replayable). Tier A means the certifier proved concavity, monotonicity and a verdict on every record of the declared ranges, so a certified radius is stated per record. `band` and `equality` reject on both sides of the quantity and are therefore Tier B by design; a `ratio` derived quantity is Tier B because concavity is not proved. A Tier B pack loads and gates; it is deployed knowingly, with the reason on record. ## 11. Sealing 1. Through the API, `seal` returns the output `sealed` (file `sealed.pofxpack`, catalog: `seal -o sealed.pofxpack`). Run directly on the kernel, `seal ` REWRITES THE PACK FILE IN PLACE ("written to: ") unless `-o ` names another file; keep the unsealed source by always giving `-o`. The sealed text carries a `sealed_freeze` line: the digest of the pack's canonical declaration. From then on any change of a number, a form, a range, a unit, a role, a class or a citation text makes the pack refuse to load: "freeze lock mismatch". 2. The freeze digest covers the declaration, not the layout: an added comment or changed blanks around `=` still load. The file itself is identified by the sha256 of its bytes in the API and in every chain header, so any byte change gives the file a new identity even when its declaration is unchanged. 3. A gate on a sealed pack is byte-identical when repeated. ## 12. Writing a pack: the checklist 1. Write `format = pofx11.2`, `period`, `citation_audit_date`. 2. One `[field]` per measured column, with its unit and its declared range. 3. For each rule sentence: one `[barrier]`, the form copied from the comparison word, `scale` stated, `role`, `citation_class` and a citation that meets section 6. 4. `certify` until exit 0 (or 3, knowingly), then `pack-facts` and compare with what you intended, then `seal`, then `gate`. 5. Keep the sealed pack, the records and the chain: with them anyone can `replay` every verdict. ## 13. Minimal example ``` [pack] id = school_zone_speed_demo version = 1.0.0 format = pofx11.2 period = 2026 to 2026 citation_audit_date = 2026-11-07 [field] id = speed unit = km/h range = 0, 250 [barrier] id = school_zone_speed_limit quantity = speed form = ceiling_strict limit = 30 scale = limit unit = km/h role = requirement citation_class = operator citation = operator-chosen demonstration limit (no published source) ``` Observed with the kernel: certify exit 0, Tier A, grade A2, with two warnings that are expected for this pack and are not failures: "threshold is operator-chosen and carries no published authority" and, before sealing, "pack is not sealed; cited thresholds are unprotected"; seal exit 0; gate of the speeds 25, 30, 29.9, 80, 300: admit, reject, admit, reject, no verdict, exit 2. ## 14. Example for engineering and research rules (for instance a test of an automated vehicle) Rules that no law states are written with `citation_class = operator`, and the citation says so. ``` [pack] id = av_following_demo version = 1.0.0 format = pofx11.2 period = 2026 to 2026 citation_audit_date = 2026-11-28 [field] id = speed unit = m/s range = 0, 70 [field] id = gap unit = m range = 0, 500 [field] id = lateral_offset unit = m range = -5, 5 [barrier] id = speed_cap quantity = speed form = ceiling limit = 36.1 scale = limit unit = m/s role = requirement citation_class = operator citation = operator-chosen test-track speed cap (no published source) [barrier] id = minimum_gap quantity = gap form = minimum limit = 25 scale = limit unit = m role = requirement citation_class = operator citation = operator-chosen minimum following gap for this test (no published source) [barrier] id = lane_keeping quantity = lateral_offset form = band limit = -0.5 upper = 0.5 scale = 0.5 unit = m role = requirement citation_class = operator citation = operator-chosen lane-keeping band for this test (no published source) ``` Observed with the kernel on 28 November 2026: certify exit 3, grade B2, Tier B (the `band` form rejects on both sides, so it is Tier B by design, section 10); seal exit 0; gate of the records (speed, gap, lateral_offset) = (30, 40, 0.1), (38, 40, 0.1), (30, 20, 0.1), (30, 40, 0.7): admit; reject on speed_cap; reject on minimum_gap; reject on lane_keeping; gate exit 1. Through the free tools: POST /api/tools/check_own_pack with "pack_text" and "records" gives the same verdicts, the margin B of every rule, and the sealed pack and chain for replay. ## 15. Speed Measured on 28 November 2026 on a test server: a whole kernel gate process (start, load, five records, exit) took about 2.6 ms, the mean of 20 runs. Through the public API most of the time is the network and the queue: the median of check_rules calls on 27 November 2026 was 484 ms. Real-time use (a control loop, a vehicle, a device) is what the private build is for: the kernel inside your own silicon or system. Ask with request_kernel.