Research#

EB is a domain specific language (DSL) with two goals:

  1. EB is a language worth learning and using

    A tool that modelers reach for because it makes Monte Carlo simulation clearer to write and faster to run than general purpose language (GPL) alternatives.

  2. EB’s specification is an exemplar for AI-assisted DSL creation

    Scientists and engineers who want to create their own DSLs can use EB’s spec as a starting point—one designed for AI tools to read, understand, and build upon.

This is early-stage work. The examples on this site demonstrate the core concepts as they evolve.

Goal 1: A Language Worth Using#

Monte Carlo simulation is widely used in finance, physics, and engineering. Practitioners typically write simulations in Python, R, or MATLAB—languages that are general-purpose and flexible but require significant boilerplate for simulation-specific patterns:

  • Nested loops for iterations and runs

  • Manual collection of observations

  • Explicit random number generation

  • Post-hoc statistical analysis

EB provides first-class constructs for these patterns, reducing code size and eliminating common errors.

Goal 2: An Exemplar for AI-Assisted DSL Creation#

This work is useful to engineers and scientists who run Monte Carlo simulations but have no experience building programming languages. They would benefit from a DSL tailored to their domain—if only creating one weren’t so difficult.

These users need more than one-off LLM prompting. Ad-hoc requests produce inconsistent results — the LLM reinvents the wheel each time. A DSL provides structure:

  • A defined language that the LLM can learn deeply

  • Documentation the LLM can reference for accurate assistance

  • Consistent patterns for debugging and generating first drafts

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ [ DSL Development & Use ] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                                                     ┃
┃                                                                                                     ┃
┃                                                                                                     ┃
┃                                                                                                     ┃
┃                                                                                                     ┃
┃          ┌────────────────────┐          ┌────────────────────┐         ┌────────────────────┐      ┃
┃ Person   │                    │          │    Compiler and    │         │   Model creation   │      ┃
┃   ──────▶│   Specification    │─────────▶│   documentation    │────────▶│      and use       │      ┃
┃          │                    │          │                    │         │                    │      ┃
┃          └────────────────────┘          └────────────────────┘         └────────────────────┘      ┃
┃                                                                                                     ┃
┃                                                                                                     ┃
┃                                                 iteration                                           ┃
┃                    ◀ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ (Person / LLM)  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ▶                ┃
┃                                                                                                     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛