Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omnet/tree/main/om/quantity # omnet aien-dev/omnet Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omnet / om / quantity` `83f605b` fix(store): charge record framing with checked quantities aien-spark committed 2026-10-26 ``` .. fixtures/ test/ README.md 3275 demo.om 2070 mutate.om 1699 oracle-export.om 1111 quantity.om 2504 tests.om 7741 ``` README.md # Checked quantities (SC1-Q) Apache-2.0 source imported byte-for-byte from Omega's `om/quantity/` proposal #771 , not a second implementation. The `q` function prefix names this unit. Compiler pin is unchanged. `qty {val,cap}` distinguishes bounded quantities from modular scalar words; `qobj {ident,ver,extent}` and `qslic {ident,ver,off,count}` bind a view to an owner-assigned nonreused object/version, not an fd number. Raw fields remain trusted construction boundaries, not sealed capabilities or physical units. All calls return int:0 success,1 malformed input,2 domain mismatch/negative signed ingress/widening through narrow,3 overflow/underflow,4 object mismatch. Refusal leaves output unchanged. Output/input structs must be distinct (seed alias rule). - `qword`, `qsigned`: validate original ingress before conversion/effects. - `qadd`, `qsub`, `qmul`: validate both inputs/equal caps before guarded arithmetic. - `qnarrow`: target cap cannot exceed source cap; value must fit. - `qnext`: refuse cap exhaustion; no wrapping policy epoch. - `qtyslice`: validate expected/current identity, version, extent, then offset and count by subtraction before address formation. A constructor applied after a wrapped sum cannot recover the original operands. Revalidate serialized slices from original offset/count against the trusted current object immediately before effects. Same caps do not distinguish application units. Actual consumer: `dsframe` and `dsio` validate decoded lengths and cursor arithmetic before socket effects; `dsgrow` checks positive signed syscall results before conversion and checked addition. `dsbound` rechecks final response length, but it cannot prove that all upstream response-writer arithmetic was checked. The remaining producer/effect inventory is in `qualification/security3-consumer/quantities.json`. ## Qualification The imported runtime fixtures cover widths1..8, u64 wrapping products, negative input, narrowing, object/version mismatches, unchanged refusal outputs and epoch exhaustion. Four mixed nominal fixtures must compile-refuse7; crypto wrapping must execute0. The exact-source add/mul guard mutants must compile and normally fail their named assertions. `oracle-export.om` emits262140 actual records for external exact-arithmetic comparison; raw corpus evidence lives in Omega #771. These are finite/native tests, not a language-wide or translation theorem. `sh om/quantity/test/run.sh` is registered by the existing `tools/test.sh` glob. It only bootstraps the pinned compiler and executes the existing security3 `.om` coordinator. All selection, source composition, mutation, exit/output checks and verdicts are in `qualification/security3/run.om --consumer-units`, not shell. That mode also exercises actual transport/no-op and secret-comparison fixtures; see `qualification/security3/README.md` for exact commands and retained results. ## Third-party material and notices No third-party algorithm or vector text is copied into this unit. Omega source is Apache-2.0, the same license as omnet. Imported deterministic fixtures are synthetic. The independent arbitrary-precision arithmetic oracle is a development tool, not shipped production/test-runner logic.