Expand description
Additive annotation domains and deterministic annotated relation support. Additive annotation-domain and annotated-relation foundations.
In this G4 slice, an annotation is a value combined by semiring-like
operations and stored in a deterministic annotated relation. Facts are kept
in a BTreeMap, so iteration order follows fact order. Only non-zero
annotations are stored; exact support materialization forgets annotation
values and keeps only the facts whose stored annotation is not zero.
Unlike crate::provenance, this module does not model witness sets or
explanation queries. An annotation here is the stored algebraic value for a
fact, not a derivation witness. Relation-level exact support materialization
for annotated surfaces is also available generically through
crate::ExactSupport.
Ordinary exact relations correspond to the boolean semiring, where false
means absence, true means presence, add models union-like combination,
and mul models composition-like chaining.
Structs§
- Annotated
Relation - Deterministic annotated facts over a semiring-like annotation domain.
- Boolean
Semiring - Boolean semiring for ordinary exact relation semantics.
Traits§
- Semiring
- Semiring-like annotation domain for additive relation semantics.