mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-09-30 01:15:10 +00:00
Resolve economy organ toolchains: ECLiPSe 7.2 + COIN-OR, M3g to Fortran, BoundedPrediction fields
Hook: - ECLiPSe upgraded 7.1_13 → 7.2_13, adds ic + eplex (if_osiclpcbc) with COIN-OR system dep, sha256 pinned, ECLIPSEDIR exported, correct paths (lib/x86_64_linux/eclipse.exe not bin/) - fpm switched from GitHub binary download to pip (0.12.0) — proxy blocks GitHub release downloads in this environment - Alire download gets sha256 verification on both install and presence check - Fortran comment updated M3d,M3e → M3d,M3e,M3g - Foundry section comment clarified as hosted separately Specs: - M3g §3: Zig → Fortran 2018 (gfortran/fpm/OpenBLAS, hand-rolled Riccati) - M3 hub §3: sub-process list Zig(M3g) → Fortran(M3g) - M3 hub §5: BoundedPrediction adds token_ticker and recent_shift (ground truth from M2, same source as correctness scoring and calibration) - M3b §3: ECLiPSe 7.2 + ic + eplex (COIN-OR CLP/CBC) - M3f §3: ECLiPSe 7.2 + ic + eplex (COIN-OR CLP/CBC) - M3c §3: Solidity + Foundry confirmed, hosted separately, same Hub path
This commit is contained in:
@@ -18,8 +18,8 @@ established); specific model parameters C1.
|
||||
## 3. Language & location
|
||||
**Tcl** · `src/economy/sims/`. The hub is a syntax-agnostic coordinator: Tcl manages
|
||||
lifecycle, tick-advancement, and query routing for sub-sims in their native runtimes via
|
||||
stdin/stdout JSON — **Fortran** (M3d, M3e), **Prolog** (M3b, M3f), **R** (M3a),
|
||||
**Solidity** (M3c), **Zig** (M3g). Tcl imposes no type system or paradigm on the
|
||||
stdin/stdout JSON — **Fortran** (M3d, M3e, M3g), **Prolog** (M3b, M3f), **R** (M3a),
|
||||
**Solidity** (M3c). Tcl imposes no type system or paradigm on the
|
||||
sub-processes it orchestrates.
|
||||
|
||||
## 4. Does / does-not
|
||||
@@ -50,17 +50,22 @@ sub-processes it orchestrates.
|
||||
`SimType` ∈ { `statistical`, `sociological`, `amm_liquidity`, `mev_adversarial`,
|
||||
`tokenomics_macro`, `consensus_staking`, `market_microstructure` } (M3a–M3g).
|
||||
- `BoundedPrediction { value, lower_bound, upper_bound, confidence, correctness, certainty,
|
||||
time_horizon, sim_type, timestamp }`.
|
||||
time_horizon, sim_type, timestamp, token_ticker, recent_shift }`.
|
||||
Every output is bounded — no point estimates without uncertainty ranges.
|
||||
Three quality metrics, each ∈ [0.00, 10.00]:
|
||||
**confidence** — how sure the model is of this prediction;
|
||||
**correctness** — how accurate the model has been historically;
|
||||
**correctness** — how accurate the model has been historically (scored against literal
|
||||
market values from M2);
|
||||
**certainty** — how stable the estimate is across perturbations.
|
||||
**token_ticker** — which asset this prediction concerns (e.g. `"ETH"`, `"BTC"`).
|
||||
**recent_shift** — literal observed market movement (ground truth from M2, not sim output).
|
||||
Same M2 source feeds calibration and `correctness` scoring.
|
||||
Gain rates print as `lower - value - upper / 10.00`
|
||||
(e.g. `2.31 - 4.44 - 7.11 / 10.00 gain over next 30 days`);
|
||||
the denominator aids legibility — gain is not capped at 10.00.
|
||||
Example: `{ value: 7.2, lower_bound: 5.8, upper_bound: 8.9, confidence: 7.30,
|
||||
correctness: 8.10, certainty: 6.50, time_horizon: "4h", sim_type: "amm_liquidity" }`.
|
||||
correctness: 8.10, certainty: 6.50, time_horizon: "4h", sim_type: "amm_liquidity",
|
||||
token_ticker: "ETH", recent_shift: -0.023 }`.
|
||||
- `status(sim_type?) -> { running, pop_count, last_calibration, data_freshness }` — health check.
|
||||
- `calibrate(sim_type, feed_data: [NormalizedDatum])` — Data Feeds (M2) pushes live data for
|
||||
model recalibration.
|
||||
|
||||
@@ -17,11 +17,12 @@ solvers C3). Crypto pump-and-dump ABM C3 (3-agent protocol validated on historic
|
||||
Pop behavioral models C1.
|
||||
|
||||
## 3. Language & location
|
||||
ECLiPSe Prolog · `src/economy/sims/sociological/`. **Prolog** — game-theoretic equilibria, replicator
|
||||
dynamics, and strategy evolution are naturally expressed as logical relations over population
|
||||
states; Nash equilibrium search is constraint satisfaction. Needs efficient population iteration,
|
||||
strategy mutation, PDE solvers for MFG (HJB + Fokker-Planck), and bandit algorithms
|
||||
(UCB/Thompson).
|
||||
**ECLiPSe Prolog 7.2** · `src/economy/sims/sociological/`. Libraries: **ic** (interval
|
||||
constraints — bounds propagation for BoundedPrediction ranges), **eplex** (LP/MIP via COIN-OR
|
||||
CLP/CBC — Nash equilibrium computation). Game-theoretic equilibria, replicator dynamics, and
|
||||
strategy evolution are naturally expressed as logical relations over population states; Nash
|
||||
equilibrium search is constraint satisfaction. Needs efficient population iteration, strategy
|
||||
mutation, PDE solvers for MFG (HJB + Fokker-Planck), and bandit algorithms (UCB/Thompson).
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate populations of behavioral archetypes competing in a market; apply
|
||||
|
||||
@@ -12,9 +12,11 @@ impermanent loss formula C5 (closed-form: $\text{IL}(r) = \frac{2\sqrt{r}}{1+r}
|
||||
simulation parameterization C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/amm/`. **Solidity** — on-chain-equivalent fixed-point arithmetic
|
||||
reproduces the exact invariant calculations DEXs execute, eliminating precision-mismatch bugs
|
||||
between sim and production contracts.
|
||||
**Solidity** + **Foundry** (forge, anvil) · `src/economy/sims/amm/`. Foundry is hosted
|
||||
separately from the session container — not a session-start install. M3c's output enters the
|
||||
system through Hub like every other sim, same `BoundedPrediction` schema, same M2 path.
|
||||
On-chain-equivalent fixed-point arithmetic reproduces the exact invariant calculations DEXs
|
||||
execute, eliminating precision-mismatch bugs between sim and production contracts.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate constant-product pools with fee parameter $\gamma$:
|
||||
|
||||
@@ -14,10 +14,11 @@ validator populations C4 (Lasry & Lions 2007; validator-specific application C3)
|
||||
simulation parameterization C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/consensus/`. **Prolog** — Markov chain transition rules, Nash
|
||||
equilibrium search, and replicator dynamics are constraint-satisfaction problems over validator
|
||||
populations; Prolog's backtracking search finds equilibria declaratively rather than
|
||||
imperatively iterating toward them.
|
||||
**ECLiPSe Prolog 7.2** · `src/economy/sims/consensus/`. Libraries: **ic** (interval
|
||||
constraints), **eplex** (LP/MIP via COIN-OR CLP/CBC — Nash equilibrium via linear programming).
|
||||
Markov chain transition rules, Nash equilibrium search, and replicator dynamics are
|
||||
constraint-satisfaction problems over validator populations; Prolog's backtracking search finds
|
||||
equilibria declaratively rather than imperatively iterating toward them.
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate validator populations where honesty evolves via **evolutionary game theory**
|
||||
|
||||
@@ -15,9 +15,11 @@ optimal execution C5 (industry standard since 2001; crypto adaptations validated
|
||||
Kurz CMC thesis). DEX-specific microstructure C2 (emerging). Implementation C1.
|
||||
|
||||
## 3. Language & location
|
||||
TBD · `src/economy/sims/microstructure/`. **Zig** — tick-level event-driven simulation with
|
||||
deterministic memory layout, no GC pauses, and sub-microsecond latency for Riccati solvers and
|
||||
order-book state updates; comptime generics eliminate runtime dispatch on hot paths.
|
||||
**Fortran 2018** (gfortran) · `src/economy/sims/microstructure/`. Build: **fpm**. Dependencies:
|
||||
**OpenBLAS** (LAPACK/BLAS via native Fortran interfaces). Hand-rolled: Riccati ODE solver,
|
||||
order-book state arrays, JSON I/O against fixed schemas. Almgren-Chriss optimal execution is a
|
||||
dense ODE (Riccati equations) — Fortran's home turf; LAPACK is native, array intrinsics map
|
||||
directly to order-book depth vectors, and zero new toolchain is needed (same as M3d/M3e).
|
||||
|
||||
## 4. Does / does-not
|
||||
- **Does:** simulate order flow across venues (DEXs and CEXs); model bid-ask spread dynamics as a
|
||||
|
||||
Reference in New Issue
Block a user