Skip to content

Multi-Domain Theory Coordinator (Nelson-Oppen & CDCL(T)) ​

The Multi-Domain Theory Coordinator (packages/runtime/src/formal/theory_coordinator.ts) is ModelScript's cross-language formal verification engine. It combines Nelson-Oppen equality sharing with Conflict-Driven Clause Learning Modulo Theories (CDCL(T)) to verify system-wide invariants across ontological, structural, geometric, physical, causal, and dynamic simulation domains simultaneously.


Architectural Motivation ​

In traditional Model-Based Systems Engineering (MBSE), each engineering tool operates in an isolated semantic silo:

  • A SysML v2 requirement specifies maxBatteryTemp <= 333.15 [K].
  • A STEP / OpenSCAD 3D CAD enclosure defines the heat-sink surface area Asink.
  • A CFD configuration computes the convective heat transfer coefficient h(v∞).
  • A Modelica thermal-electrical DAE integrates CthT˙=I2Rint−hAsink(T−Tamb).

No single solver understands all four representations. The Theory Coordinator bridges these silos by treating each engineering domain as a decidable or semi-decidable Theory Oracle (Ti) sharing a common set of interface variables (Vshared).


The 13 Domain Theory Oracles ​

packages/runtime/src/formal/theory_coordinator.ts and packages/runtime/src/formal/oracles/index.ts coordinate 13 specialized domain theory oracles implementing the TheoryOracle interface:

Rendering diagram...
#Oracle ClassDomain (TheoryDomain)Decision / Propagation Procedure
1OntologyTheoryOracleontologySROIQ(D) Tableau reasoning over OWL 2 axioms, class disjointness, and property domains
2ConstraintTheoryOracleconstraintsInterval arithmetic and relational constraint propagation over SysML v2 requirements
3AbstractDomainOracleabstract_interpretationFloyd-Warshall Difference Bound Matrix (DBM) closure over Zone (xi−xj≤c) and Octagon (±xi±xj≤c) domains
4ContinuousSafetyOraclecontinuous_safetyControl Barrier Function (CBF) Lie-derivative positivity (LfB+LgB⋅u+α(B)≥0) and Taylor-model flowpipe safety
5DynamicSimulationOraclesimulationSensitivity-guided DAE trajectory integration (CVODE/IDA) with exact zero-crossing root finding
6SpatialPhysicsOraclespatial3D CAD bounding-box, B-Rep minimum clearance distance, mass budget, and interference checks
7CaeContractOraclecaeFEA structural safety factor (σvon Mises≤σyield/SF) and CFD aerodynamic/thermal drag polar bounds
8CausalizationOraclecausalizationHopcroft-Karp maximum bipartite matching (O(EV)), Tarjan BLT decomposition, and Pantelides DAE index reduction
9DimensionalOracledimensionalGaussian elimination over the 7-base SI unit exponent matrix [m,kg,s,A,K,mol,cd]
10EntailmentOracleentailmentAssume-Guarantee contract compatibility (⋀Ai≠⊥) and compositional refinement (AP⇒AC∧GC⇒GP)
11FlowAlgebraOracleflow_algebraAcausal connection graph conservation (∑ik=0 for flow variables, v1=v2=⋯=vn for potential variables)
12ToleranceStackOracletoleranceSTEP AP242 GD&T 1D/3D tolerance chain stack-up via Worst-Case (∑ti) and Root-Sum-Square (∑ti2)
13UqOracleuqLatin Hypercube Sampling (LHS), Polynomial Chaos Expansion (PCE) Sobol indices, and distribution-free conformal prediction bounds

The Verification Loop ​

  1. Initialization: Shared variables (Vshared) are initialized to [−∞,+∞] or extracted from SysML v2 requirement bounds and .ssv parameter sets.
  2. Domain Propagation (propagate): Each registered TheoryOracle inspects the current shared interval store and tightens bounds monotonically:I(k+1)(x)=I(k)(x)∩⋂m=1MOraclem.propagate(I(k))(x)
  3. Nelson-Oppen Equality Deduction: Whenever I(k+1)(x)=[c,c] and I(k+1)(y)=[c,c] (or linear relational equalities x−y≤0∧y−x≤0 hold in the Octagon DBM), the coordinator deduces the inter-theory equality x=y and broadcasts it to all oracles.
  4. Conflict & Unsat Core Extraction (CDCL(T)): If any oracle detects I(x)=∅ (i.e., lo>hi) or an axiomatic contradiction, it emits a minimal Unsatisfiable Core (UnsatCore) pinpointing the exact offending AST nodes across files (e.g., battery.mo:42, enclosure.step:118, thermal_req.sysml:15).
  5. CEGAR Counterexample Guided Refinement: If all static/algebraic oracles return SAT or UNKNOWN, DynamicSimulationOracle synthesizes worst-case corner parameters from the narrowed interval box and executes a numerical DAE simulation to either confirm satisfaction or extract a concrete counterexample trajectory x(t).
bash
# Run multi-domain formal verification across Modelica, SysML v2, and STEP artifacts
npx msx verify SystemRequirement model.mo architecture.sysml chassis.step

Open-Core under the GNU AGPL v3 License; Enterprise Edition (ee/) under the ModelScript Enterprise License. • Trademark Policy