DDSL Foundations Documentation¶
Version: 0.2.0
Date: December 8, 2025
Status: Working Draft
Version History¶
| Version | Date | Tag | Summary |
|---|---|---|---|
| 0.2.1 | Dec 22, 2025 | foundations-v0.2.1 |
DDSL-SYM/T core two-layer architecture. Bijection requirement for backwards compatibility. |
| 0.2.0 | Dec 8, 2025 | foundations-v0.2.0 |
Three-file architecture: stage/methodization/calibration separation. Removed @methods from movers. Added operator declarations and settings profiles. |
| 0.1.0 | Nov 24, 2025 | foundations-v0.1.0 |
Initial foundations with Υ/ρ maps, symbol system, ADC structure. |
Tagging Convention¶
To tag a version in git:
git tag -a foundations-v0.2.0 -m "Foundations v0.2.0: Three-file architecture"
git push origin foundations-v0.2.0
Document Structure¶
This documentation is organized into separate files for each major section. Each file contains a complete, self-contained treatment of its topic.
Main Sections¶
- Mathematical Definition of the DDSL
- Universes and Spaces
-
Layer Architecture
- Primitive Numerical Objects
-
Primitive Function Objects (Backus Objects)
- Symbol Universe Partition
- Symbol Hierarchy (Spaces, Functions, Distributions, Movers)
- Operator Registry (E, argmax, ~, APPROX)
- Variables, Parameters, and Settings
-
Methods and Schemas
- Syntactic Stages
- Methodization Functor (M) — attaches schemes to operators
- Two-Part Calibration (Parameters vs. Settings)
-
From (operator, method) to AST under ρ
- Movers as Central Concept
- Built-in Operators Inside Movers
- ADC Structure and Perches
-
Convergence in the Limit
- Mathematical Meaning Map (Υ) — syntax → math
- Computational Representation Map (ρ) — methodized + calibrated → numerical
- Numerical Meaning Function (lookup table)
-
Equality Only in the Limit
- Complete 8-Stage Pipeline
- Methodization Before Calibration
- Threading Υ and ρ Through Pipeline
-
End-to-End Example
-
DDSL-SYM / T core Architecture (NEW - Dec 22, 2025)
- Two-Layer Syntax Architecture
- Bijection Requirement
- Backwards Compatibility Strategy
-
Integration with Υ/ρ Framework
-
Type System (Advanced - To be completed later)
Example Files (primitives/)¶
- operation-registry.yml — Global schemes/methods registry
- consind-stage.yml — Buffer-stock stage (purely symbolic)
- consind-methodization.yml — Method configuration
- consind-calibration.yml — Parameter/settings values
Appendices¶
A. Terminology
Reading Guide¶
For First-Time Readers¶
Start with Section 1 (Mathematical Definition) to understand the foundational framework, then proceed sequentially through Sections 2-4 to grasp the symbol system, operator registry, and the methodization/calibration distinction.
For Implementers¶
Focus on Sections 3 (Symbol System with Operator Registry), 4 (Methodization and Calibration), 6 (Representation Maps), and 7 (Execution Pipeline) for the practical aspects of parsing and code generation.
For Theorists¶
Sections 1 (Mathematical Definition), 5 (Bellman Theory with Movers), and 6.1-6.2 (Υ and ρ definitions) provide the theoretical foundations.
Key Concepts¶
| Concept | Definition | See Section |
|---|---|---|
| DDSL-SYM | Surface syntax layer: economist-friendly, backwards-compatible | §8 |
| T core | Internal representation: operator-theoretic, formally rigorous | §8 |
| φ (phi) | Bijective translation map: SYM ↔ T core | §8.3 |
| Perch | Information set / local context within a stage (a filtration step: arrival/decision/continuation) | §3.4.10, §5.2 |
| Mover | Functional operator transforming functions/distributions between perches | §3, §5 |
| Operator Registry | Built-in operators: E, argmax, ~, APPROX | §3.5 |
| Methodization (M) | Attaching schemes to operators (before calibration) | §4.2 |
| Υ (Upsilon) | Mathematical meaning map: syntax → math | §6.2 |
| ρ (rho) | Computational representation: calibrated → numerical | §6.3 |
| APPROX | Approximation operator that converts math to numerical | §3.5.5 |
Document Status¶
| Section | Status | Last Updated |
|---|---|---|
| 1. Mathematical Definition | Complete | Nov 24, 2025 |
| 2. Primitive Objects | Complete | Nov 24, 2025 |
| 3. Symbol System | Updated | Dec 8, 2025 |
| 4. Stages and Calibration | Updated | Dec 8, 2025 |
| 5. Bellman Theory | Updated | Dec 8, 2025 |
| 6. Representation Maps | Updated | Dec 8, 2025 |
| 7. Execution Pipeline | Updated | Dec 8, 2025 |
| 8. SYM/T core Architecture | NEW | Dec 22, 2025 |
| 9. Type System | Deferred | - |
Changes in v0.2.0 (Dec 8, 2025)¶
Based on AAS_notes.md and update-methodization-functor.md, the following key changes were integrated:
Structural Changes¶
- Three-File Architecture: Model specification is now split into:
stage.yml— purely symbolic, declares operators but NO methodsmethodization.yml— binds operators to schemes/methods-
calibration.yml— provides concrete parameter/setting values -
No
@methodsin Movers: Perches contain purely symbolic mover definitions. Methods are attached externally via methodization config. -
Clarification: kernels (transition functions, utility, auxiliary definitions) are pure Υ-level objects and do not need method attachments merely by existing. Methods attach to operator instances used when executing movers under ρ (expectations, argmax/rootfinding, draws/push-forwards,
APPROX/interpolation, etc.). -
Operator Declarations: Stages now include an
operators:block declaring which operators are used.
Conceptual Changes¶
-
Operator Registry (§3.5): Global registry of available schemes/methods in
operation-registry.yml. -
Settings Profiles: Methodization uses
settings_profilelabels that calibration resolves to concrete values. -
APPROX Operator: Methodization wraps mover outputs in APPROX operators with specified interpolation schemes.
-
Parameters vs. Settings: Parameters (Υ level) vs. settings profiles (ρ level after methodization).
Example Files¶
See foundations/primitives/ for complete examples:
- operation-registry.yml — global schemes/methods
- consind-stage.yml — buffer-stock stage (purely symbolic)
- consind-methodization.yml — method choices
- consind-calibration.yml — concrete values
Notation Conventions¶
- \(\mathbb{X}\) - Mathematical universes and spaces
code- DDSL syntax and code examples- Term - First use of important terminology
- \(f : A \to B\) - Function type signatures
@decorator- DDSL decorators!scheme- Primitive method constructors- \(\Upsilon\) - Mathematical meaning map
- \(\rho\) - Computational representation map
- \(\mathcal{M}\) - Methodization functor
- \(\mathbb{C}\) - Calibration functor