Expand description
FrameLayout — the single canonical registry for the ~6 computational-support bytes of the 48-byte NQuin Frame.
A Frame is 6 × u64 = 48 bytes: roughly 42 bytes of semantics (the
subject / property-path / object / context hashes and packed literals) plus
~6 bytes of computational support (opcode, flags, datatype tags, a clock,
ECC parity) — which is what makes a Frame both data and executable code in
one cell. Every modality reads and writes those computational bytes through
here, so the primitive stays universal and no two conventions silently collide
(enforced by the tests below).
§predicate — opcode | property-path | defeater (co-resident; MUST NOT overlap)
[0..7] deontic/epistemic opcode · [8..62] property-path hash · [63] defeater.
“Proposition-mode” modalities (LTL/CTL/modal/abductive/causal/…) use the WHOLE
predicate as a plain q_hash (no opcode) — a documented mode, not a collision.
§object — MSB pointer flag | inline datatype tag | value (co-resident)
[63] set ⇒ the value is a lexicon/embedded pointer. When [63] is clear,
[60..62] is an inline datatype tag and [0..59] is the value. Canonical tags
(from resolver): INTEGER 001 · DECIMAL 010 · BOOLEAN 011 · BLOB 100 ·
FLOAT 101 (new — raw f32 bits; resolves the prior clash where f32 squatted
on the INTEGER tag).
§Tag policy — closed datatypes inline, open identifier kinds in the graph
The object inline-tag region is reserved STRICTLY for the small, CLOSED set of
structural datatypes the GPU/SIMD hot path must read in-register (the tags
above: INTEGER/DECIMAL/BOOLEAN/BLOB/FLOAT + the embedded-triple / pointer flags).
Open, extensible identifier kinds / namespaces (Webizen, did:q42, DID,
content-hash, instrument-language, cluster-node, …) are NOT inline tags — they are
scoped by modal predicates in the graph (<X> <has-modality-kind> <…>),
resolved at the logic layer via indexing::QuinIndex point lookups, with the
lexicon as the collision backstop (the u64 is a handle to a full value, so a
handle collision is detectable + resolvable, never silent corruption). Rationale:
datatypes are a fixed vocabulary that belongs in the bit-budget; identifier kinds
are an open fabric that belongs in the relations (identifiers-not-identity). This
is why a dictionary identity is 60-bit (top nibble = the datatype overlay) while
identifier-kind breadth lives in predicates, not in more inline tag bits.
§metadata — a ROLE-KEYED OVERLAY field (read this carefully)
Unlike predicate/object, the 32 high bits of metadata are NOT a flat set
of independently-addressable sub-fields. They are a union of overlays, each
valid only for a particular quin role, several of which share bit positions.
Two overlays sharing bits is safe iff their roles are mutually exclusive
(a quin is never both at once). The ONE invariant that always holds — and is
enforced below — is that the low-32 payload is disjoint from every high
overlay, so a degree/expiry/timestamp can never silently corrupt a type/flag.
[0..31]low payload (any quin): exactly ONE of expiry / f32 truth-degree / 32-bit timestamp / packed (alpha,mu,sigma) — selected by role.[32..59]tensor-baketclock — ONLY on Tensor10D ground-truth nodes (tensor::bake_pipeline).[50..59]per-modality flag bits — ONLY on that modality’s quins (each flag is a single distinct bit; see the pairwise-distinct test).[56..59]ODRL sensitivity tier — ONLY on access-controlled quins.[60..63]quin-type nibble — general typing;[61..62]of it doubles as the permissive-routing lane (cbor_compiler,daemon_swarm). Typed vs routed are treated as exclusive roles. quin_type was deliberately NOT relocated lower: every lower slot lands inside the[32..59]bake clock, which would be a worse (cross-role) collision than the documented[61..62]overlap.
Re-exports§
pub use crate::resolver::INLINE_TAG_BOOLEAN;pub use crate::resolver::INLINE_TAG_DECIMAL;pub use crate::resolver::INLINE_TAG_FLOAT;pub use crate::resolver::INLINE_TAG_INTEGER;pub use crate::resolver::INLINE_TAG_MASK;pub use crate::resolver::INLINE_VALUE_MASK;pub use crate::resolver::MSB_FLAG;
Constants§
- ARGUMENT_
BIT - ATTACK_
BIT - BAKE_
CLOCK_ MASK - Tensor-bake
tclock (only on Tensor10D ground-truth nodes). Matchesbake_pipeline’s(metadata >> 32) & 0x1FFF_FFFF, i.e. bits[32..60]— it even grazes quin_type’s bit 60, an existing tensor-only quirk. Documentary only; never asserted disjoint (its role excludes the others). - CONSUMED_
BIT - CONTROL_
BIT - COUNTERFACTUAL_
BIT - DEFEATER_
BIT - DEFENSE_
BIT - DO_
INTERVENTION_ BIT - FEEDBACK_
BIT - INLINE_
TAG_ BLOB - Blob/byte-offset pointer tag (canonical in
dicom). - LOW32_
MASK - Low-32 payload mask: expiry | f32 truth-degree | 32-bit timestamp (typed).
- OPCODE_
MASK - PATH_
MASK - QUIN_
TYPE_ MASK - QUIN_
TYPE_ SHIFT - quin-type nibble
[60..63](general typing). Its low two bits[61..62]are reused as the permissive-routing lane on routed quins — typed vs routed are exclusive roles. NOT relocated lower: every lower slot collides with the[32..59]tensor-bake clock (a worse, cross-role collision). - ROUTING_
LANE_ MASK - ROUTING_
LANE_ SHIFT - Permissive-routing lane
[61..62](only on routed quins; shares bits with the quin-type nibble by role-exclusivity). - SENSITIVITY_
MASK - SENSITIVITY_
SHIFT - ODRL sensitivity tier
[56..59](only on access-controlled quins). - STABILIZATION_
BIT - SYNTHESIZED_
BIT
Functions§
- expiry
- is_
defeater - object_
tag - The 3-bit inline datatype tag of an object value (only meaningful when MSB clear).
- opcode
- pack_
float_ object - Pack an f32 into an object field with the canonical FLOAT tag.
- pack_
predicate - Canonical norm-predicate packing — MUST equal
deontic::compile_norm_quin. - parity
- parity_
valid - path_
bits - quin_
type - sealed
- timestamp
- truth_
degree - CANONICAL truth/belief/confidence/fuzzy degree (IEEE-754 f32 in the low 32 bits).
- unpack_
float_ object - Recover an f32 from a FLOAT-tagged object field.
- with_
quin_ type - with_
truth_ degree