31 lines
850 B
Markdown
31 lines
850 B
Markdown
DSL Sketch: LocalProblem -> SharedVariables -> PlanDelta
|
|
|
|
- LocalProblem (Object) represents a device/problem instance with attributes like id, name, and data.
|
|
- SharedVariables (Morphism-like channel) captures signals shared across locals, with a versioned schema.
|
|
- PlanDelta (Delta) captures changes to local plans to reconcile with the global objective.
|
|
- Minimal DSL flavor (pseudocode):
|
|
|
|
```
|
|
LocalProblem {
|
|
id: string
|
|
name: string
|
|
data: dict
|
|
}
|
|
|
|
SharedVariables {
|
|
src: string
|
|
dst: string
|
|
version: string
|
|
schema: dict
|
|
}
|
|
|
|
PlanDelta {
|
|
plan_id: string
|
|
delta: dict
|
|
timestamp: int
|
|
}
|
|
```
|
|
|
|
- Adapters implement a mapping from a device-specific representation into the canonical LocalProblem/SharedVariables/PlanDelta contracts.
|
|
- The registry stores the contract schemas and their versions to enable conformance checks for adapters.
|