Skip to content

Commit 4859e96

Browse files
author
rohan
committed
Merge dev: Tier 0 + Tier 1 complete
2 parents 2796838 + 507fa02 commit 4859e96

121 files changed

Lines changed: 4380 additions & 236 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,91 @@
11
# Changelog
22

3+
## 2026-04-03 — Tier 0 + Tier 1 Complete
4+
5+
Driven by external reviews from Zargham and Jamsheed (Shorish) against the
6+
GDS paper (Zargham & Shorish 2022). The reviews identified foundational gaps
7+
in notation alignment, formal property statements, ControlAction semantics,
8+
temporal agnosticism documentation, and execution contract formalization.
9+
This release closes all Tier 0 and Tier 1 roadmap items.
10+
11+
### gds-framework v0.3.0
12+
13+
**Breaking:** `CanonicalGDS.input_ports` now contains only controlled inputs (U_c);
14+
disturbance-tagged BoundaryAction ports are in the new `disturbance_ports` field.
15+
16+
New capabilities:
17+
- **ExecutionContract** — DSL-layer time model declaration (`discrete`, `continuous`,
18+
`event`, `atemporal`) with Moore/Mealy ordering. Attached as optional field on
19+
GDSSpec. A spec without a contract remains valid for structural verification.
20+
- **ControlAction canonical projection**`CanonicalGDS` now extracts output ports
21+
(Y) and renders the output map `y = C(x, d)` in the formula.
22+
- **Disturbance input partition**`disturbance_ports` on `CanonicalGDS` separates
23+
policy-bypassing exogenous inputs (W) from controlled inputs (U_c) via
24+
`tags={"role": "disturbance"}` on BoundaryAction.
25+
- **TypeDef.constraint_kind** — optional named constraint pattern (`non_negative`,
26+
`positive`, `probability`, `bounded`, `enum`) enabling round-trip export via SHACL.
27+
28+
New verification checks:
29+
- **SC-010** — ControlAction outputs must not feed the g pathway (Policy/BoundaryAction)
30+
- **SC-011** — ExecutionContract well-formedness
31+
- **DST-001** — Disturbance-tagged BoundaryAction must not wire to Policy
32+
33+
Documentation:
34+
- Formal property statements for all 15 core checks (G-001..G-006, SC-001..SC-009)
35+
- Requirement traceability markers on all verification tests
36+
- Tests for SC-005..SC-009 (previously untested)
37+
- Controller-plant duality design document
38+
- Temporal agnosticism invariant with three-layer stack diagram
39+
- Audit of 30+ docs replacing "timestep" with temporally neutral vocabulary
40+
- Assurance claims document with verification passport template
41+
- Execution semantics design document with DSL contract mapping
42+
- Disturbance formalization design document
43+
- Notation harmonized with Zargham & Shorish (2022)
44+
45+
### gds-owl v0.2.0
46+
47+
- **SHACL constraint promotion**`TypeDef.constraint_kind` metadata exports as SHACL
48+
property shapes (`sh:minInclusive`, `sh:maxInclusive`, `sh:minExclusive`, `sh:in`).
49+
Constraints with a `constraint_kind` are now R2 round-trippable; those without remain
50+
R3 lossy. Import reconstructs Python callable constraints from SHACL metadata.
51+
- New ontology properties: `constraintKind`, `constraintLow`, `constraintHigh`, `constraintValue`
52+
- New `build_constraint_shapes()` public API
53+
54+
### gds-psuu v0.2.1
55+
56+
- **Parameter schema validation**`ParameterSpace.from_parameter_schema()` creates
57+
sweep dimensions from declared ParameterDef entries. `validate_against_schema()`
58+
catches missing params, type mismatches, and out-of-bounds sweeps.
59+
- **PSUU-001 check** following the GDS Finding pattern
60+
- Sweep runner validates against schema when `parameter_schema` is provided
61+
62+
### gds-stockflow v0.1.1
63+
64+
- Emit `ExecutionContract(time_domain="discrete")` from `compile_model()`
65+
66+
### gds-control v0.1.1
67+
68+
- Emit `ExecutionContract(time_domain="discrete")` from `compile_model()`
69+
70+
### gds-games v0.3.2
71+
72+
- Emit `ExecutionContract(time_domain="atemporal")` from `compile_pattern_to_spec()`
73+
74+
### gds-software v0.1.1
75+
76+
- Emit `ExecutionContract` from all 6 compilers: `atemporal` for DFD, C4, component,
77+
ERD, dependency; `discrete` for state machines
78+
79+
### gds-business v0.1.1
80+
81+
- Emit `ExecutionContract` from all 3 compilers: `discrete` for CLD and supply chain,
82+
`atemporal` for value stream maps
83+
84+
### gds-analysis v0.1.1
85+
86+
- Guard `gds-continuous` import in `backward_reachability.py` (previously caused
87+
ImportError when gds-continuous wasn't installed)
88+
389
## gds-framework v0.2.3
490

591
- Add `StructuralWiring` to public API (compiler intermediate for domain DSL wiring emitters)

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Five domain DSLs (stockflow, control, games, software, business) compile to GDS.
114114
- `compile_to_system(model)``SystemIR` (builds composition tree, delegates to `gds.compiler.compile.compile_system`)
115115
4. **Verification** — domain-specific checks on the model, plus optional delegation to G-001..G-006 via SystemIR
116116

117-
All DSLs map to the same GDS roles: exogenous inputs → `BoundaryAction`, decision/observation logic → `Policy`, state updates → `Mechanism` + `Entity`. `ControlAction` is unused across all DSLs. Canonical `h = f ∘ g` holds cleanly for all three domains.
117+
All DSLs map to the same GDS roles: exogenous inputs → `BoundaryAction`, decision/observation logic → `Policy`, state updates → `Mechanism` + `Entity`. `ControlAction` is unused by DSL compilers (all non-state-updating blocks resolve to Policy). It is available for hand-built models as the output map y = C(x, d). See docs/framework/design/controller-plant-duality.md. Canonical `h = f ∘ g` holds cleanly for all three domains.
118118

119119
The composition tree follows a convergent tiered pattern:
120120
```
@@ -149,8 +149,8 @@ Only 5 concrete Block types exist — domain packages subclass `AtomicBlock` onl
149149
- `AtomicBlock` — leaf node
150150
- `StackComposition` (`>>`) — sequential, validates token overlap
151151
- `ParallelComposition` (`|`) — independent, no validation
152-
- `FeedbackLoop` (`.feedback()`) — backward within timestep, CONTRAVARIANT
153-
- `TemporalLoop` (`.loop()`) — forward across timesteps, COVARIANT only
152+
- `FeedbackLoop` (`.feedback()`) — backward within evaluation, CONTRAVARIANT
153+
- `TemporalLoop` (`.loop()`) — forward across temporal boundaries, COVARIANT only
154154

155155
Block roles (`BoundaryAction`, `Policy`, `Mechanism`, `ControlAction`) subclass `AtomicBlock` and enforce constraints at construction via `@model_validator`.
156156

docs/control/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The compiler builds a tiered composition tree:
6969
- **Across tiers:** sequential composition (`>>`) -- sensors feed controllers, controllers feed state dynamics
7070
- **Temporal recurrence:** `.loop()` -- state outputs at timestep *t* feed back to sensors at timestep *t+1*
7171

72-
**Design decision:** All non-state-updating blocks use `Policy`. `ControlAction` is deliberately not used -- it sits outside the canonical *g* partition, which would break the clean `(A, B, C, D) <-> (X, U, g, f)` mapping.
72+
**Design decision:** All non-state-updating blocks use `Policy`. gds-control deliberately maps everything to the `(A, B, C, D) -> (X, Z, g, f)` state-space decomposition, where sensors and controllers both contribute to the input map `g`. The `ControlAction` role (output map `y = C(x, d)`) is orthogonal to this mapping -- it models inter-system output, not internal control flow. See [Controller-Plant Duality](../framework/design/controller-plant-duality.md).
7373

7474
## Canonical Form
7575

docs/examples/building-models.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Count = typedef("Count", int,
2929

3030
### 2. Define Entities (state space X)
3131

32-
What persists across timesteps.
32+
What persists across temporal boundaries.
3333

3434
```python
3535
from gds import entity, state_var
@@ -40,7 +40,7 @@ agent = entity("Agent",
4040

4141
### 3. Define Spaces (communication channels)
4242

43-
Transient signals within a timestep — NOT state.
43+
Transient signals within an evaluation -- NOT state.
4444

4545
```python
4646
from gds import space
@@ -104,7 +104,7 @@ def build_system():
104104
| State vs Signal | State persists (Entity). Signals are transient (Space). |
105105
| Parameter vs Input | Parameters fixed per run (Θ). Inputs vary per step (BoundaryAction). |
106106
| Which operator | Linear → `>>`. Independent → `\|`. Backward → `.feedback()`. Iteration → `.loop()`. |
107-
| ControlAction vs Policy | Policy = decision logic (g). ControlAction = admissibility constraint (d). |
107+
| ControlAction vs Policy | Policy = decision logic g(x, z) → d. ControlAction = output observable y = C(x, d). |
108108

109109
## Role Constraints
110110

docs/examples/examples/insurance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ flowchart LR
2929

3030
## What You'll Learn
3131

32-
- **ControlAction** role — the 4th block role, for admissibility/control decisions
32+
- **ControlAction** role — the 4th block role, for output observables
3333
- Complete 4-role taxonomy: BoundaryAction → Policy → ControlAction → Mechanism
34-
- ControlAction vs Policy: Policy is core decision logic (g), ControlAction constrains the action space (d)
35-
- `params_used` on ControlAction — parameterized admissibility rules
34+
- ControlAction vs Policy: Policy is decision logic g(x, z) → d, ControlAction is the output observable y = C(x, d)
35+
- `params_used` on ControlAction — parameterized output computation
3636

3737
!!! note "Key distinction"
38-
Premium Calculation is **ControlAction** because it enforces admissibility constraints — it decides what's *allowed*, not what to do.
38+
Premium Calculation is **ControlAction** because it computes an observable output signal — the premium rate that downstream mechanisms consume. It maps state and decisions to an output, rather than making the core risk assessment decision.
3939

4040
## Files
4141

docs/examples/examples/lotka-volterra.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lotka-Volterra
22

3-
**Adds temporal loops** — forward iteration across timesteps.
3+
**Adds temporal loops** -- structural recurrence across temporal boundaries.
44

55
## GDS Decomposition
66

@@ -31,11 +31,11 @@ flowchart TD
3131

3232
## What You'll Learn
3333

34-
- `.loop()` composition for cross-timestep temporal feedback
34+
- `.loop()` composition for cross-boundary temporal recurrence
3535
- **COVARIANT** flow direction — mandatory for `.loop()` (CONTRAVARIANT raises GDSTypeError)
3636
- Mechanism with `forward_out` — emitting signals after state update
3737
- `exit_condition` parameter for loop termination
38-
- Contrast with `.feedback()`: within-timestep vs across-timestep
38+
- Contrast with `.feedback()`: within-evaluation vs across-boundary
3939

4040
!!! note "Key distinction"
4141
Temporal wirings must be **COVARIANT**`.loop()` enforces this at construction time.

docs/examples/examples/thermostat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Thermostat PID
22

3-
**Adds feedback** backward information flow within a single timestep.
3+
**Adds feedback** -- backward information flow within a single evaluation.
44

55
## GDS Decomposition
66

docs/examples/learning-path.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ The foundation. Learn TypeDef, Entity, Space, BoundaryAction, Policy, Mechanism,
1212

1313
### 2. [Thermostat PID](examples/thermostat.md) — Feedback
1414

15-
Adds `.feedback()` for within-timestep backward information flow. Introduces CONTRAVARIANT flow direction and the ControlAction role.
15+
Adds `.feedback()` for within-evaluation backward information flow. Introduces CONTRAVARIANT flow direction and the ControlAction role.
1616

1717
**New:** `.feedback()`, backward ports, ControlAction
1818

1919
### 3. [Lotka-Volterra](examples/lotka-volterra.md) — Temporal Loops
2020

21-
Adds `.loop()` for cross-timestep iteration. Introduces COVARIANT temporal wiring and Mechanism with `forward_out`.
21+
Adds `.loop()` for cross-boundary recurrence. Introduces COVARIANT temporal wiring and Mechanism with `forward_out`.
2222

2323
**New:** `.loop()`, temporal wiring, exit conditions
2424

0 commit comments

Comments
 (0)