Problem and inspected code
At omega-mv main acb3f15cdc691b1b046b48b0dad0f9255a12ba4b, seed/omc/omc.om bo_fix canonicalizes narrow unsigned arithmetic; binop and vt_un implement the arithmetic semantics. Crypto intentionally uses wrapping words. Lengths, offsets, counts, quotas and generations must not inherit wrapping accidentally. Existing #625 and the frozen translation-v1 S1 pure-u64 profile retain their meaning.
Implement
- Under #625/#621, specify distinct semantic domains for modular words, bounded sizes/counts and object-indexed offsets. Syntax is an owner-reviewed design choice, not an assertion that these types already exist.
- No implicit modular-to-quantity conversion. Explicit conversions require checked range/meaning; serializers, parsers, ABI boundaries and native lowering preserve the distinction. Preserve source-adapter modulo contracts through explicit versioning.
- Addition/multiplication/narrowing either carry an independently checked range proof or return a declared checked failure before effects. For slices establish 0 <= offset <= length and count <= length-offset before computing offset+count.
- Preserve intentional cryptographic modular operations and prove/check their limb assumptions separately. Do not globally reinterpret unsigned arithmetic or break the compiler bootstrap.
- Prevent generation wrap/ABA from resurrecting authority; exhaustion must refuse or use an explicitly proved rotation protocol.
- Integrate through the existing seeded compiler and #623 validation boundary. Migrate at least one real omnet parser length and one authority/budget quantity; record remaining consumers.
Acceptance
- Reproduce wrap counterexample: (2^64-8)+16 modulo 2^64 equals 8 and passes a naive <=16 check. The quantity path refuses before addressing/storage/admission.
- Exhaust small bit widths independently; test 64-bit extrema, multiply-before-check, negative ingress, narrowing, zero/exact capacity and mixed-domain calls.
- Compile refusal fixtures and accepted crypto fixtures; prove/check source-to-native overflow behavior for the supported slice. A runtime trap alone is not proof of all length semantics.
- Existing seed fixed point, typed calls, S1 translation and crypto vectors remain valid. Mutants remove checks or swap modular/quantity lowering and fail named oracles.
Dependencies: #625 profile agreement; #623 source/native obligations; #671 ingress consumers. This leaf owns quantity semantics/lowering, not a replacement parser or compiler.
Delivery contract
Parent: aien-dev/omega-mv#673. Additive scoped work; preserve existing programme, compiler, authority/store, verifier and publication owners. Reconcile main, live branches/PRs, issue comments and applicable repository instructions before edits. One writer per shared path. New first-party implementation, test and runner logic is seeded .om; independent third-party provers/Wolfram may be development oracles outside the delivered runtime. No second compiler, scheduler, authority or store. Version semantic changes; qualify consumers before removing superseded active implementations; preserve historical evidence.
Separate implementation status from assurance: formal proof, exact finite-model result, differential tests, native/emulated run and hardware qualification are distinct. Unknown/timeouts/build errors/missing evidence never establish safety. Record exact source, semantic profile, compiler, target, executable, checker, model/config/fixtures, raw commands/exits and independent final-source review. No deployment or live workload interruption is authorized by this issue.
Linked dependencies
Contracts: #625; validation: #623; ingress: #671. Consumers: #757 and aien-dev/omnet#3.