Skip to content

Commit 48aebd1

Browse files
afflomclaude
andcommitted
Bump version to 0.4.14
Completes ADR-057's deferred surface (register_shape! macro, recurse:T / recurse(<bound>):T operand grammar, CYCLE_SIZE saturation rule) that v0.4.13 incorrectly shipped as "future work" — closes the implementation discipline violation. ShapeRegistryProvider sealed trait + const-aggregated registry: - `pipeline::shape_iri_registry::ShapeRegistryProvider` trait carries the application's `const REGISTRY: &'static [RegisteredShape]`. - `pipeline::shape_iri_registry::EmptyShapeRegistry` is the foundation default (empty registry) — used by applications without recursive shapes. - `pipeline::shape_iri_registry::lookup_shape_in::<R>(iri)` walks `R::REGISTRY` then falls back to the foundation-built-in registry. `lookup_shape(iri)` continues to consult only the foundation registry. - Implementation is no_std-safe, zero-dependency, zero-`unsafe`, and zero-allocation per foundation discipline. SDK `register_shape!` proc-macro (uor-foundation-sdk): - `register_shape!(MyAppRegistry, Shape1, Shape2, …)` emits a marker type implementing `ShapeRegistryProvider`. The `REGISTRY` const aggregates `RegisteredShape` entries populated from each shape's `ConstrainedTypeShape` associated items at the consumer's compile time. - Also emits a `pub const <NAME>_SHAPES: &[RegisteredShape]` for direct slice access by purely-const consumers. - Admits both bare-Ident shapes (`LeafA`) and generic-parameter-bearing types (`BigIntShape<128>`) per the v0.4.11 Type-operand widening. partition_product! / partition_coproduct! recurse-operand grammar: - New operand-marker syntax `recurse:T` (saturated at u32::MAX descent) and `recurse(<bound>):T` (bounded descent, where <bound> is any const-evaluable u32 expression — literal, const, HostBounds-derived). - Lowers to `ConstraintRef::Recurse { shape_iri: <T>::IRI, descent_bound: <bound> }` at the operand's position, instead of inlining T's CONSTRAINTS array. SITE_COUNT still consults <T>::SITE_COUNT to compute site offsets for adjacent inline-marked operands. - Works in both the named-field (`<name>: recurse:T`) and positional (`recurse:T`) forms; the proc-macro parser reserves `recurse` as a marker keyword (cannot be used as a field name). - Canonical operand ordering preserves the recurse marker with its type (paired canonicalization). - Foundation supplies `sdk_concat_product_constraints_v2` + `sdk_product_constraints_v2_len` const-fn helpers that emit the Recurse entry at the marked operand's position. CYCLE_SIZE saturation rule (ADR-057 step 4): - Shapes whose CONSTRAINTS contains a Recurse entry declare CYCLE_SIZE = u64::MAX. Applied uniformly across binary and variadic partition_product / partition_coproduct expansions; emitted by both the macro path and the v2 helper path. Conformance test coverage: - foundation/tests/behavior_adr_057_recursive_typing.rs (+5 tests): EmptyShapeRegistry returns empty slice; lookup_shape_in finds application-registered shapes; lookup_shape_in falls back to None on misses; finds second entry; EmptyShapeRegistry-typed lookup returns None. - uor-foundation-sdk/tests/smoke.rs (+7 tests): register_shape! emits ShapeRegistryProvider impl + named const; partition_product! admits recurse(<bound>):T with explicit bound; saturates CYCLE_SIZE; recurse:T defaults to u32::MAX; recurse on left operand; coproduct recurse-with-bound; coproduct CYCLE_SIZE saturation; both-operands- recurse-marked. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1420c6d commit 48aebd1

13 files changed

Lines changed: 1832 additions & 286 deletions

File tree

Cargo.lock

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ members = [
1818
resolver = "2"
1919

2020
[workspace.package]
21-
version = "0.4.13"
21+
version = "0.4.14"
2222
edition = "2021"
2323
rust-version = "1.83"
2424
license = "Apache-2.0"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ structure based on Z/(2^n)Z.
99

1010
## Ontology
1111

12-
Version 0.4.13: 34 namespaces · 474 classes · 948 properties · 3601 named individuals
12+
Version 0.4.14: 34 namespaces · 474 classes · 948 properties · 3601 named individuals
1313

1414
All terms are encoded as typed Rust data in `spec/` (`uor-ontology`) and exported as:
1515
- `foundation/` (`uor-foundation`) — typed Rust traits (published to crates.io)

0 commit comments

Comments
 (0)