Expand description
EDD Showcase Demos - Interactive demonstrations of the EDD methodology.
This module provides interactive demonstrations that embody the Equation-Driven Development methodology. Each demo follows the complete cycle:
- Equation - Define the governing equation
- Failing Test - Write a test that fails without implementation
- Implementation - Implement the simulation
- Verification - Test passes, equation verified
- Falsification - Demonstrate conditions that break the equation
§Architecture (SIMULAR-DEMO-001)
All demos implement the DemoEngine trait which ensures:
- YAML-first: Single source of truth for configuration
- Deterministic replay: Same seed → same output
- Renderer independence: TUI/WASM produce identical state sequences
- Metamorphic testing: Per Chen et al. (2018)
- Falsification criteria: Per Popperian methodology
§Demos
harmonic_oscillator- Energy conservation with symplectic integratorslittles_law_factory- WIP = Throughput × Cycle Timemonte_carlo_pi- O(n^{-1/2}) convergence ratekingmans_hockey- Queue wait times at high utilizationkepler_orbit- Orbital mechanics conservation lawstsp_grasp- TSP with randomized greedy + 2-opt (GRASP)
§WASM Compatibility
All demos compile to wasm32-unknown-unknown and export a standard interface
for integration with web frontends.
Re-exports§
pub use engine::CriterionResult;pub use engine::DemoEngine;pub use engine::DemoError;pub use engine::DemoMeta;pub use engine::DeterministicReplay;pub use engine::FalsificationCriterion;pub use engine::MetamorphicRelation;pub use engine::MrResult;pub use engine::RendererIndependent;pub use engine::Severity;pub use harmonic_oscillator::HarmonicOscillatorDemo;pub use kepler_orbit::KeplerOrbitDemo;pub use kingmans_hockey::KingmanHockeyDemo;pub use littles_law_factory::LittlesLawFactoryDemo;pub use monte_carlo_pi::MonteCarloPlDemo;pub use orbit_engine::OrbitConfig;pub use orbit_engine::OrbitalEngine;pub use orbit_engine::OrbitalState;pub use orbit_engine::OrbitalStepResult;pub use tsp_engine::TspConfig;pub use tsp_engine::TspEngine;pub use tsp_engine::TspState;pub use tsp_engine::TspStepResult;pub use tsp_grasp::TspGraspDemo;pub use tsp_instance::Coords;pub use tsp_instance::TspAlgorithmConfig;pub use tsp_instance::TspCity;pub use tsp_instance::TspInstanceError;pub use tsp_instance::TspInstanceYaml;pub use tsp_instance::TspMeta;pub use tsp_instance::TspParams;
Modules§
- engine
- Unified Demo Engine Trait
- harmonic_
oscillator - Demo 1: Harmonic Oscillator Energy Conservation
- kepler_
orbit - Demo 5: Kepler Orbit Conservation Laws
- kingmans_
hockey - Demo 4: Kingman’s Hockey Stick
- littles_
law_ factory - Demo 2: Little’s Law Factory Simulation
- monte_
carlo_ pi - Demo 3: Monte Carlo π Convergence
- orbit_
engine OrbitalEngine:DemoEngineImplementation for Orbit Demos- tsp_
engine TspEngine:DemoEngineImplementation for TSP Demos- tsp_
grasp - Demo 6: TSP Randomized Greedy Start with 2-Opt
- tsp_
instance - TSP Instance YAML Configuration
Structs§
- Criterion
Status - Status of a single falsification criterion.
- Falsification
Status - Falsification status for a demo.
Enums§
- Integrator
Type - Integrator type for physics simulations.
Traits§
- EddDemo
- Common trait for all EDD demos.