Characterization, identities and technical protocols
The protocols of this chapter complement the product contract basis. They determine the bytes participating in identities, the logical work charged by R1 and the conditions under which a measurement joins a valid T10 campaign. The bound schemas and vectors remain responsible for their exact structures.
1. Canonical JSON, version 1
The domain admits Unicode scalar strings, booleans, null only when authorized by the schema, decimal integers, arrays and objects. Floating-point numbers are not admitted.
The encoding is UTF-8 without BOM. It emits exactly one JSON value followed by a single LF, without other insignificant whitespace. Object members are ordered by the UTF-8 bytes of the names before escaping; duplicated names are invalid. Arrays keep their contract’s order, without ordering introduced by the serializer.
Integers use ASCII decimal, without +, without leading zeros beyond zero itself and without -0. The literals are true, false and null. Strings use double quotes and a single escaping regime: quote as \", backslash as \\, U+0008/U+0009/U+000A/U+000C/U+000D as \b, \t, \n, \f, \r; the other U+0000–U+001F as lowercase \u00xx. The other scalars, including ordinary backslash, DEL and non-ASCII characters, are emitted directly. There is no Unicode normalization.
The parser of identity inputs refuses invalid UTF-8, duplicated names, numbers outside that subset and non-whitespace data after the value. An identity formula omitting its own field first builds the object without that field, encodes it, hashes it and then reinserts the identity to serialize the complete object. The transport digest of that complete object is another quantity.
2. R1 logical gas meter
The rules are visited in the verified program’s canonical order; body and head atoms follow the authored order; extension atoms follow increasing ReasoningContentKey. Substitutions are ordered by the UTF-8 bytes of the variables’ names and the canonical representation of the values.
Before an event, its integral logical cost must be available. The table is:
| Event | Logical cost |
|---|---|
| Considering a body atom against an extension atom under a substitution | 1 |
| Comparing an authored role of that atom | +1 per role |
| Consulting/copying an existing binding for a successful extension | +1 per binding |
| Introducing a variable binding | +1 per binding |
| Emitting a successful substitution | +1 |
| Trying to instantiate a head atom under a substitution | 1 per atom |
| Instantiating a head role | +1 per role |
| Building a consequence content key | 1 + number of roles |
| Trying to consult/insert the consequence into the extension | 1 |
The external round does not consume a standalone unit. Loops whose cardinality depends on rule, body, extension, substitution or head are covered by the events. A physical optimization keeps the same logical charge and, for equal subject/basis/gas, the same fixpoint or exhaustion boundary and the same partial extension.
Costs and budgets are u64; addition and multiplication are checked. Overflow produces RESOURCE_ACCOUNTING_OVERFLOW. If the next event’s cost exceeds the remainder, execution returns OUT_OF_GAS before the event, with the earlier extension. Gas may be left over when the next indivisible event costs more than that balance. gas_consumed = gas_budget - gas_remaining.
The budget restarts independently per selected R1 application. Match does not use this meter in the 0.1.0 profile; its resource safety follows the T11/T14 limits and campaigns.
3. T10: subject, operation and observation
Amendment D235 fixes formasl.t10.contract.v2. The goal is engineering characterization, not optimization, SLO, asymptotic theorem or universal performance statement.
An observation is admissible when the chain contract → canonical fixture → structural oracle → semantic admission → exact T04 operation → raw measurement → statistical reduction → result case → complete seal is reconstructible and verifiable. Test name, arm, workload or manifest state does not substitute the executed operation.
Before the first timed sample, the structural, semantic and result oracles must pass over the same fixture. Required negative probes belong to admission, outside the timer. A correctness failure invalidates the case; it is not a slow sample nor NOISY.
The primary metric is wall latency in nanoseconds immediately around the T04 call. Process/worker initialization, fixture generation and reading, environmental preparation, verification, pre-construction of CheckedProgram, gas calibration and persistence stay outside, unless an explicit rule says otherwise.
The operation classes are CHECK, INSPECT_SUMMARY, INSPECT_CLAIMS, RUN_MATCH, RUN_R1_GAS0, RUN_R1_FIXPOINT and REALIZE. There is no fallback for unknown workload identifier.
4. Fixtures and oracles
W01–W13 use UTF-8, LF only, one final LF, four-space indentation, no tabs, trailing spaces, comments or doc comments. SourceInput.revision = 1. The INDEX_WIDTH width is fixed after the family’s final scale selection and used in all its final fixtures.
The structural verifier consumes all bytes: bytes_consumed = bytes_total and unconsumed_bytes = 0. It can share with the generator only generic I/O, UTF-8 validation, hashing and generic error classes; it does not share item lists, counters, AST, expected identities, variable-slot logic or oracle-specific logic.
The W01–W13 fixture grammar remains governed by the workload vocabulary and its templates, with D235’s explicit substitutions. Book example data are not the oracles of those benchmarks.
5. Workload inventory and observables
W01 — CTL-MINIMAL-CHECK
A single scale-1 case contains exactly one empty bench_w01 module. The arm is CHECK; the result is accepted, with one module and zero semantic items. There is no contrast.
W02 — CHECK-DECLARATIONS
A module bench_w02 contains exactly the simple types T1–TN. It contains no specializations, subtypes, Claims, relations, applications, compositions or imports. CHECK must accept and the oracle requires N types and the exact identity set. There is no contrast.
W03 — CHECK-CLAIMS
The fixed basis contains Entity and Observed(subject:Entity). The variable part contains C1–CN, each Claim bound to the corresponding lexical subject and issued by $bench. CHECK must accept exactly two declarations and N Claims, with exact identity and authored order. There is no contrast.
W04 — CHECK-PARTITION
P is the total number of simple types and M the number of modules. P stays constant in all final cases; only M varies. There are M modules, P types T1–TP, P mod M = 0, uniform contiguous partition, without gaps, duplicates, imports or references. CHECK receives the whole source set. The oracle confirms M modules, P types and exact identities. Choosing P as a function of M in the final campaign is forbidden.
W05 — CHECK-XREF
CONTROL contains Root and simple T1–TN; XREF contains the same items, names and order, with specializes Root in each Ti. The only material difference is the N authored references. Replacing them by subtype changes the workload.
The structural oracle requires zero specializations in CONTROL, N in XREF, exact children T1–TN and parental reference Root. Both checks are accepted. The negative probe replaces exactly one Root by MissingRoot and requires rejection by unresolved reference. The arms are CONTROL and XREF; the contrast is XREF-CONTROL. The old requirement of an Inspect view counting specializes was withdrawn by D235.
W06/W07 — INSPECT family
Both use the W03 fixture and its same final scales. A CheckedProgram is built outside the timer. The arms CHECK, SUMMARY and CLAIMS call respectively check, inspect Summary and inspect Claims. W06 focuses SUMMARY and W07 focuses CLAIMS.
SUMMARY requires the complete structured view, including one module, revision 1, two declarations, N Claims and zero applications, compositions and subtypes. CLAIMS requires names/order, the Observed proposition, subject role/value, issuer and stable identities. The family monitors the three arms and the contrasts SUMMARY-CHECK, CLAIMS-CHECK and CLAIMS-SUMMARY, without duplicating or losing paired rounds.
W08 — MATCH-OCCURRENCE-VOLUME
N is the number of Observed occurrences, with exactly one hit at the final occurrence. The other buckets are miss. CHECK accepts; MATCH executes BenchMatch with request gas zero and returns MATCH_COMPLETE, one solution and the final occurrence’s witness. Gas is not applicable to that Match path. Arms CHECK/MATCH; contrast MATCH-CHECK.
W09 — MATCH-SELECTIVITY
A single N is fixed for the final campaign. The K values obtained from Q = {0,1/8,1/4,1/2,3/4,7/8,1} by K = round(q*N) vary, removing duplicates and requiring at least five distinct values. Additional quantiles are forbidden.
For K zero, the hit set is empty; for positive K, it is {ceil(j*N/K) | j=1..K}. The case is identified by (W09,N,K). CHECK accepts; MATCH returns exactly K witnesses, equal to the hit set, without non-hits. Arms CHECK/MATCH; contrast MATCH-CHECK.
W10 — R1-BODY-WIDTH
B varies the number of positive Seed atoms repeated in the body of the single rule R. One Seed fact, one Derived target and BenchInfer remain. The arms are CHECK, GAS0 and FIXPOINT. GAS0 returns OUT_OF_GAS with extension 1; FIXPOINT returns R1_FIXPOINT, extension 2, one Derived and one goal match. Contrasts GAS0-CHECK, FIXPOINT-CHECK and FIXPOINT-GAS0.
W11 — R1-PREMISE-VOLUME
N varies the number of Seed facts. The rule is Seed(x) → Derived(x). GAS0 keeps extension N; FIXPOINT returns the exact set of one Derived per Seed, N consequences, extension 2N and N matches. Count equality without set equality does not satisfy the oracle. Arms and contrasts are W10’s.
W12 — R1-CLOSURE-GROWTH
The input is the chain Edge(e0,e1)…Edge(e(L-1),eL). Base derives Path from each Edge; Step uses Edge(a,b) and Path(b,c) to derive Path(a,c). C(L)=L(L+1)/2. GAS0 keeps extension L; FIXPOINT requires the exact transitive closure, C(L) Paths, extension L+C(L) and C(L) matches. Arms and contrasts are W10’s.
W13 — REALIZE-TARGETS
T varies the number of named applications Cap1–CapT in a valid semantic source with Entity, Seed, one Claim and Match applications. They exist as targets; W13 does not execute them. The plan contains T app targets, each with its corresponding Cap’s prescribed external requirement and binding.
limit, prefer, budget, group, stage, composition, module, source or capability target are not admitted, nor explicit revision selector. The prior check accepts the exact applications; REALIZE must return BOUND, T bindings and a bijection with the existing targets in the source @r1. Removing an application while keeping its FSP target requires UNKNOWN_REALIZATION_TARGET. The old case “empty FSL + capability targets” was withdrawn. There is no contrast.
W14/W15 — Social profile
formasl.social, version 1 and seed 0 are fixed. At scale s: 128s Person, 8s Organization, 128s MemberOf and 512s Follows. W14 measures CHECK and requires exact digests and counts.
W15 uses the same dataset and exactly the same scales as W14. Its CHECK and MATCH arms are measured in W15 itself, not reused from W14. MATCH executes SocialFollows with the single Follows(from,to) pattern, returns 512s solutions, one distinct witness per occurrence and exact typed bindings, with gas not applicable. Contrast MATCH-CHECK.
W16/W17 — Financial profile
formasl.financial, version 1 and seed 0 are fixed. At scale s: 64s Account, 4s Institution, 64s AccountAt, 512s Transfer and max(1,floor(64s/16)) Flagged. W16 measures CHECK and requires exact digests and counts.
W17 uses exactly W16’s scales. The non-recursive rule is Transfer(from,to) and Flagged(to) → RiskEdge(from,to); RiskEdge does not appear in the body. Its CHECK and R1_FIXPOINT arms use their own paired controls. The oracle requires the exact set of corresponding pairs, without absence or excess. Contrast R1_FIXPOINT-CHECK.
6. Frozen calibration
Before the first pilot, the BenchmarkCalibrationManifest binds campaign, contract, environment, exponent limit per family, timeout, child max RSS, gas search limit, scheduling seed, LLC in bytes and stabilization wait. Changing a field after the pilot creates a new campaign.
The fixed values are: candidates in powers of two; three pilot repetitions; four to eight final points; cache scrub of 4*LLC_bytes; dispersion threshold 1/20; round stages [12,24,36]; no swap delta.
Generic selection
The candidates are 2^j, starting from j zero. A candidate is only safe if every mandatory operation/case of the family satisfies the oracles, timeout, RSS and absence of swap. After the first unsafe candidate, larger candidates are excluded. The safe exponents form 0…J. Fewer than four safe exponents makes calibration fail.
With M=min(8,J+1), the retained indices are floor(i*J/(M-1)), for i from zero to M−1, unique and increasing, including both extremes. The observed curve and presentation preferences do not change the selection.
Special families
W04 tests anchors Pj=8*2^j with M_probe=8. The largest safe P before the first failure is fixed as P_FINAL. The final Ms are powers of two dividing P_FINAL, selected by the generic rule.
W09 considers W08’s final Ns in decreasing order. It chooses the largest for which all the mandatory set’s K satisfy the pilots and limits. It fixes that single N and all corresponding K, without new quantiles.
W10, W11, W12 and W17 search gas in 1,2,4,8… up to the first fixpoint or the limit. Without fixpoint, the scale is unsafe. Then a binary search determines the smallest gas per scale. G_FIXPOINT=2*max(MIN_FIXPOINT_GAS) over the final scales. u64 overflow or inability to reach all final oracles makes calibration fail.
W06/W07 share W03’s scales. The social family only admits scales safe for W14 CHECK, W15 CHECK and W15 MATCH. The financial one requires W16 CHECK, W17 CHECK, gas calibration and the R1 oracle. W14/W15 and W16/W17 have equal final sets. Two safe financial points cannot be completed with CHECK-only scales.
7. Preconditioning and scheduling
Before each timed arm: read to EOF the sealed dependencies and fixtures in canonical order; traverse anonymous memory of exactly four LLCs with fixed 64-byte stride; wait precondition_settle_ms; verify the absence of swap; start and end the timer immediately around the public call.
The environment records target, system/kernel, CPU/topology, RAM, filesystem, virtualization, toolchain/build, power policy when observable and CPU affinity. An inapplicable mandatory precondition produces invalidity or inconclusiveness, without silent weakening.
The case order derives from the frozen seed, independent of the results. Two arms alternate order; three traverse the six permutations ABC, ACB, BAC, BCA, CAB, CBA. Pairing uses the round’s identity, not temporal proximity. A round can be repeated only before the first timed observation. Infrastructure failure after it invalidates the affected family’s campaign identity; there is no selective sample repetition.
8. Statistics and round extension
The case starts with twelve complete, balanced rounds. If any mandatory arm or contrast does not converge, the whole block is extended to 24 and, if needed, to 36. At the end, the remaining dispersion receives NOISY, keeping all observations. There is no outlier removal, selective exclusion, fixture/scale swap or post-hoc case substitution.
For T samples, dispersion=IQR(T)/median(T). In the admitted even counts, the median is the mean of the two ordered central values; Q1 and Q3 are the medians of the two halves; IQR=Q3−Q1.
For contrast A−B, each sample is Di=Ai−Bi of the same round. The published value is median(Di), not median(A)−median(B). The dispersion is IQR(Di)/median((Ai+Bi)/2). It converges when less than or equal to 1/20. The sign is preserved: no absolute value nor B−A is published under the A−B label.
NOISY is a valid characterization result, distinct from semantic or infrastructure failure.
9. Exact matrix of arms and contrasts
| Workload | Arms | Contrasts |
|---|---|---|
| W01–W04 | CHECK | None |
| W05 | CONTROL, XREF | XREF-CONTROL |
| W06/W07 | CHECK, SUMMARY, CLAIMS | SUMMARY-CHECK; CLAIMS-CHECK; CLAIMS-SUMMARY |
| W08/W09 | CHECK, MATCH | MATCH-CHECK |
| W10–W12 | CHECK, GAS0, FIXPOINT | GAS0-CHECK; FIXPOINT-CHECK; FIXPOINT-GAS0 |
| W13 | REALIZE | None |
| W14 | CHECK | None |
| W15 | CHECK, MATCH | MATCH-CHECK |
| W16 | CHECK | None |
| W17 | CHECK, R1_FIXPOINT | R1_FIXPOINT-CHECK |
Acceptance requires exact equality, not subset or superset.
10. Primary seal and evidence
The next conformant primary seal uses schema = formasl.t10_result_seal, schema_version = 3 and contract_id = formasl.t10.contract.v2. The version-2 seal is remediation evidence, not a primary result of the new contract.
Each case contains workload, scale, parameters, identity, fixture digest, structural oracle, semantic admission, raw rounds, arms and contrasts. Each arm binds arm_id, operation, operation parameters, subject, median_ns, iqr_ns, rounds and state CONVERGED or NOISY; an isolated convergence boolean does not satisfy version 3. All arms and contrasts of the same case have the same final number of rounds.
All W01–W17 and all final calibrated cases appear exactly once. Uncalibrated cases do not appear. The uniqueness key is (workload,scale,parameters). The W06/W07 joint evidence allows recovering both focuses and the six monitors without duplicating or losing paired rounds.
The semantic verifier checks contract/campaign/calibration identities, workload and case coverage, W04’s constant P, W09’s exact N and K, shared scales, exact arms/contrasts, operation binding, sign, fixture/oracle/admission digests, existence of the raw observations, round consistency and canonical digest. JSON Schema validation is necessary, but does not replace those judgments.
seal_digest is SHA-256 of the canonical-json-1 bytes of the complete logical object without seal_digest. The object’s member order does not change the identity; array order follows the contract.
11. Refusal of incomplete campaigns
Missing workload or scale, failed calibration, unsatisfied oracle, divergent shared scales, incompatible operation/fixture, wrong sign, invalid infrastructure or material contractual ambiguity prevent a primary seal.
In those cases, the artifact is formasl.t10_campaign_failure, with campaign, contract, environment, stage, family/workload, failure class and evidence digests. A partial characterization does not use formasl.t10_result_seal.
The campaign formasl.t10.campaign.0_1_0 stays historical, without force for Match, R1, Inspect, Realize or scalability in the cases where it measured CHECK under other operations’ labels. formasl.t10.campaign.0_1_1 is NON-CANONICAL REMEDIATION CHARACTERIZATION: it improves the operations’ execution, but does not satisfy W05/W13, W04/W09, shared financial scales and the v3 interface. The first conformant campaign receives a new identity.
12. Mandatory adversarial cases
| Case | Construction to refuse |
|---|---|
| A01/A02 | Omit W05 or W13 from the primary seal. |
| A03/A04 | Label W15 MATCH or W17 R1_FIXPOINT while executing CHECK. |
| A05 | Vary P along with M in W04. |
| A06/A07 | Multiple anchor Ns in W09 or quantiles 3/8 and 5/8. |
| A08/A09 | Divergent final scales in the social or financial families. |
| A10 | Invert or absolutize the MATCH-CHECK contrast. |
| A11/A12 | Omit a calibrated case or replace it by a duplicate. |
| A13/A14/A15 | Corrupt the structural oracle, semantic oracle or fixture digest. |
| A16 | Use fallback for unknown workload. |
| A17/A18 | Reintroduce capability-target in W13 or swap specializes for subtype in W05. |
| A19/A20 | Accept a semantically invalid seal despite the schema, or emit a partial campaign as primary. |
| A21 | Let JSON field order change the canonical digest. |
| A22/A23 | Accept W05’s MissingRoot probe or bind W13’s targetless application. |
The implementation also answers negatively to the closure questions: can it emit label without operation; omit workload; wrongly vary P/M or N/quantiles; diverge scales; lose sign; time invalid fixture/result; emit partial primary; accept a semantically invalid seal; confuse specialization/subtype; bind an absent target; change identity by object order; reclassify a required obligation as residual risk? Any positive or unknown answer prevents VERIFIED.
13. T10 gate and separation from optimization
All W01–W17, the calibration, the shared scales, the contrasts, the raw evidence and the semantic verifier must be conformant; JSON Schema, workspace gates and closing audit must pass. There is no majority approval.
Implementing that contractual repair does not modify Match, R1, Check, Realize, workloads, scale selection, gas or oracles to improve numbers. A later optimization requires separate authorized work. Correctly observed poor performance remains a characterization result.
Related documentation
The product contract basis establishes the topics and the release horizon. Queries and completeness distinguishes the Query semantics from this meter’s and Reasoning’s rules. The package’s origin manifests and correspondence matrices identify the technical assets used to reproduce those verifications.