Skip to main content

Module demos

Module demos 

Source
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:

  1. Equation - Define the governing equation
  2. Failing Test - Write a test that fails without implementation
  3. Implementation - Implement the simulation
  4. Verification - Test passes, equation verified
  5. 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

  1. harmonic_oscillator - Energy conservation with symplectic integrators
  2. littles_law_factory - WIP = Throughput × Cycle Time
  3. monte_carlo_pi - O(n^{-1/2}) convergence rate
  4. kingmans_hockey - Queue wait times at high utilization
  5. kepler_orbit - Orbital mechanics conservation laws
  6. tsp_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: DemoEngine Implementation for Orbit Demos
tsp_engine
TspEngine: DemoEngine Implementation for TSP Demos
tsp_grasp
Demo 6: TSP Randomized Greedy Start with 2-Opt
tsp_instance
TSP Instance YAML Configuration

Structs§

CriterionStatus
Status of a single falsification criterion.
FalsificationStatus
Falsification status for a demo.

Enums§

IntegratorType
Integrator type for physics simulations.

Traits§

EddDemo
Common trait for all EDD demos.