Skip to main content

Module place_time

Module place_time 

Source
Expand description

Place / space / time binding — an artefact NQuin queried by the spatio-temporal AND deontic modalities over one shared identity (Phase 3); delegates to the inherited modality stack. Gated to exactly the configs where crate::modalities (the values/logic layer it builds on) is compiled — native always; on wasm only with the logic/scientific/full feature sets, not the minimal portal bundle. Phase 3 — place / space / time binding for artefacts (STELLAR §E step 3).

An artefact is an identifier (subject); facts about it are companion NQuins that share that subject (see crate::render::assets::mesh_to_nquins, where a mesh’s subject is the q_hash of its asset IRI and its bbox/centroid/type are quins keyed by it). Phase 3 adds the spatio-temporal facts — where (a world/geo point + a jurisdiction frame) and when (a valid-time interval) — and demonstrates that the same artefact is queryable by the inherited modality stack two ways:

One entity, one substrate, many modalities — this module is only a thin renderer-side binding (it packs the artefact’s place/time into NQuin fields and shapes a footprint polygon); all the actual logic is delegated to the existing modalities. That is the Phase-3 rail: spatio-temporal logic uses the inherited modality stack, not a bespoke engine.

The artefact’s situatedness is one NQuin:

fieldcarries
subjectthe artefact id (shared with its mesh facts and any norm about it)
predicate[P_SITUATED_AT] semantic stamp
objectthe artefact’s (x, y) location, via [pack_point] (shared encoding with RCC-8)
contextthe jurisdiction / frame id
metadatathe valid-time interval [from, to], via [pack_interval]

Structs§

SituatedVerdict
The structured outcome of querying ONE artefact NQuin across both modalities.

Constants§

MAX_RENDER_NORMS
Max render norms evaluated in one render_permitted pass (stack-bounded, zero-heap).
P_RENDER_DISPLAY
Property-path for a render/display norm (the action a deontic rule governs).
P_SITUATED_AT
Predicate stamp for an artefact’s situatedness fact (place + valid-time).

Functions§

active_during
True iff the artefact’s valid-time falls wholly during the window (Allen During).
artefact_interval
Recover the artefact’s valid-time interval [from, to] from its situatedness NQuin.
artefact_location
Recover the artefact’s (x, y) location from its situatedness NQuin.
pack_interval
Pack a valid-time interval [start, end] (whole seconds) into one u64: start in the high 32 bits, end in the low 32 bits. Values are truncated to i32 (≈ ±68 years around the epoch — honest demo range; a wider encoding is a file-format-v2 concern, STELLAR §C).
place_relation
Spatio-temporal query. The RCC-8 topological relation of the artefact’s footprint (a square of half-side radius centred on its location) to a jurisdiction polygon. Delegates to evaluate_rcc8_points — no bespoke geometry.
render_norm
Build a rights norm bound to the artefact’s identity: (party) OPCODE display(artefact) in a frame, optionally expiring at expiry_unix32 (0 = no expiry). The action target (object) is the artefact’s id, so this norm and the artefact’s situatedness fact share the artefact identity — the deontic and spatio-temporal queries are over the same artefact.
render_permitted
Deontic query. Evaluate the render norms and return whether displaying this artefact is permitted: it is, unless some Active FORBID norm’s action targets this artefact’s id.
situate_artefact
Build the artefact’s situatedness NQuin: the same subject as its mesh facts, carrying its world/geo location (object) and valid-time interval (metadata) in a jurisdiction frame (context). Parity is the XOR fold used throughout the engine.
situated_render_verdict
Phase-3 acceptance in one call: given a single artefact NQuin, query it by the spatio-temporal modality (place + time) and the deontic modality (render norms bound to its identity), and combine. Render is admitted only when the artefact is situated within the jurisdiction, active during the window, and not under an Active prohibition.
situated_within
True iff the artefact’s footprint is within the jurisdiction (a proper part — tangential or not — or equal). A footprint that straddles the boundary (PartiallyOverlapping) is not within: a rights-bounded view does not render an artefact that pokes outside permitted space.
time_relation
Temporal query. The Allen relation op between the artefact’s valid-time and a window. Delegates to evaluate_temporal.
unpack_interval
Inverse of pack_interval (sign-extends each 32-bit half back to i64).