Building High-Stakes Domain-Specific Languages: A Retrospective
I have designed and led designs of Domain Specific Languages (DSLs) in high-demand industries from semiconductor physics and algorithmic trading to distributed ledgers and industrial security. The systems that depend on the DSLs have powered industry-standard CAD tools, secured critical infrastructure, and driven core technologies acquired by global leaders. A key early lesson: mathematically clean domain invariants guarantee simplicity, safety, and scalability.
Below is a selection of these projects. Whether you are an organization seeking strategic architectural guidance, or an engineer looking to master advanced language design in my upcoming workshop, this portfolio illustrates the power of a well-engineered DSL.
Design Rule Checker (DRC)
Domain and Context: Validating and finalizing integrated circuits masks in microelectronics (my first role).
DSL: The DSL specifies 2d mask operations. Input is given set of masks (e.g. made by CAD automation or human layout designers). Some outputs of computing the DSL are expected to be empty. When not empty, these are violations of the layout rules, which are reported with a context provided in part by the DSL expressions. The main outputs are masks needed for the integrated circuit production line (for example some optics need the original masks boundaries to be extended or shrinked).
Core algorithm: 2d scanline.
Outcome: Licensed to Mentor Graphics as part of a larger analog CAD automation package (ILAC/IDAC).
Key techniques: Strict separation of topology and state; Integer only even when working with angles.
Physical Model Description Language (PMDL)
Domain and Context: Semiconductor technology (PhD work).
DSL: A physical modeling language designed for semiconductor devices. It extends C with specific modifiers to handle equations, physical variables, and external parameters. To support physical equations, PMDL introduces vector types and spatial discretization operators. Both variable and equation data can be forced to exist at a specific mesh locations using the vertex, edge, face, or element specifiers. An automatic mesh discretization engine determines the best data mesh position when not specified. Operators grad, div, diff, egrade and ediv work across mesh positions.
Core algorithm: A hybrid mesh-graph continuous time simulator based on a Newton-like solver (e.g., gradient descent). The DSL compiler used static analysis for the derivatives as I did not know yet how to do sparse backward auto-diff in 1995. A generic "god's eye" global to local to global sparse indexing scheme across a full system.
Outcome: The foundational "geometric subspace as a language property" paved the way to later work. The engine of the DSL, the simulator Dessis which I wrote during my PhD, was later acquired by Synopsys and has been the #1 TCAD simulator for the last thirty years!
Key techniques: "God's Eye" topological indexing; Subspaces as language semantics; Structural embedding of physical dualities
Future based distributed object protocol
Domain and Context: Algo trading & market making (as CTO).
DSL: Embedded composable and distributable futures in C++ running on Windows NT and VMS.
Core algorithm: Serializable monad like C++. A socket protocol based only on the serialization rules.
Outcome: Was later replaced by FSM based logic to simplify support.
Key techniques: Temporal state composability; Serialization as a strict boundary condition; Deterministic distributed transitions.
Algorithmic cross-exchange trading
Domain and Context: Algo trading & market making (as CTO).
DSL: A stream oriented reactive language where prices and exchange actions (order and trade updates) continuously drive both active and virtual quotes and orders, either directly in the market, or as "hidden triggers" (the virtual case) conditional to the market situation.
Core algorithm: Incremental monadic interpretation in F#. (Later in C++).
Outcome: Not the original concept. However, it was reexpressed and implemented as a proprietary reactive spreadsheet (see ExStream).
Key techniques: Hierarchical Flux Management; Reversible execution flows; Embedding continuous macro-models into discrete execution bounds.
Smart contract of rights and obligations
Domain and Context: Distributed Ledgers (as Product Owner and CTO at Elevence).
DSL: Proprietary.
Core algorithm: From the patent abstract (
): A system and method are provided for modeling and interpreting a modeled digital asset and its evolution with respect to the rights of a plurality of parties, the method comprising: executing an await function instance no more than once using one of at least one choice defined therein for disposition of the digital asset with respect to the rights of at least one of the plurality of parties...https://patents.google.com/patent/US20170316391A1 Outcome: "As part of this transaction, Digital Asset acquired Zurich-based blockchain specialist Elevence Digital Finance AG, ..." (From
).https://www.bearingpoint.com/en/about-us/news-and-media/press-releases/bearingpoint-spin-off-elevence-joins-forces-with-digital-asset-holdings/
Sensor based industrial intrusion detection
Domain and Context: Protecting subsea and land based industrial assets (as senior advisor).
DSL: The DSL specifies real-time streaming spatial temporal grid andmask operations. The inputs are real-time sensor data. The outputs of computing the DSL are expected to be empty. When not, these are anomalies, and reported (as possible intrusions).
Core algorithm: Incremental progression of spatial temporal computations. Incremental block oriented, spatial-temporal, frequency domain, geometrical (scanline!) and dynamic programming operations.
Outcome: Passed external audit and handed over.
Key techniques: Real-time structural quantification.