Abstract Interpretation, Polyhedral Domains & Continuous Reachability
Implementation:
- Abstract Interpretation Domains:
packages/runtime/src/formal/abstract_interpretation/ - DDE Method-of-Steps Flowpipes:
DdeFlowpipeSolverinpackages/runtime/src/analysis/wasm_dde_flowpipe.ts - Hamilton-Jacobi-Isaacs (HJI) Level-Set Solver:
HjiLevelSetSolverinpackages/runtime/src/analysis/wasm_hji_solver.ts
1. Bourdoncle Weak Topological Ordering (WTO) Fixpoint Solver
Academic Citations
- Bourdoncle, F. (1993). "Efficient chaotic iteration strategies with widenings."
Formal Methods in Programming and Their Applications, LNCS 735, pp. 128–141. DOI: 10.1007/BFb0039704 - Cousot, P., & Cousot, R. (1977). "Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints."
ACM POPL'77, pp. 238–252. DOI: 10.1145/512950.512973
ModelScript Rationale & Modifications
Computes sound abstract over-approximations of state variables across complex nested loops and recursion without simulating unbounded trajectories.
- Modifications: Implements Bourdoncle's recursive hierarchical WTO decomposition to identify minimal loop heads; accelerates convergence using delayed widening (
) followed by monotonic narrowing ( ).
2. Two Variables Per Inequality (TVPI) Polyhedral Domain
Academic Citations
- Simon, A., King, A., & Howe, J. M. (2002). "Two Variables per Inequality as an Abstract Domain."
LOPSTR 2002, LNCS 2664, pp. 71–89. DOI: 10.1007/3-540-36388-2_7 - Nelson, G. (1978). "An
algorithm for the two-variable-per-inequality integer programming problem."
Technical Report, Stanford University.
ModelScript Rationale & Modifications
Captures planar relational linear invariants of the form:
Much more expressive than simple intervals or octagons, allowing ModelScript to prove physical conservation laws (e.g.
- Modifications: Planar Graham-scan convex hull algorithms in WebAssembly typed memory; relational projection routines optimized for physical parameter spaces.
3. Octagon Difference Bound Matrices (DBM) Domain
Academic Citations
- Miné, A. (2006). "The octagon abstract domain."
Higher-Order and Symbolic Computation, 19(1), pp. 31–100.
DOI: 10.1007/s10990-006-8609-1
ModelScript Rationale & Modifications
Restricts linear relationships to constraints of the form:
Achieves cubic time complexity
- Modifications: Direct integration into the
@modelscript/dsltype inference system andAbstractDomainOraclein the Nelson-Oppen coordinator.
4. Array Segment Partitioning
Academic Citations
- Cousot, P., Cousot, R., & Logozzo, F. (2011). "A Parametric Segmentation Functor for Fully Automatic and Scalable Array Content Analysis."
ACM POPL'11, pp. 505–518. DOI: 10.1145/1926385.1926444
ModelScript Rationale & Modifications
Verifies large array equations and indexed multi-dimensional components in Modelica without unrolling every array index into separate scalar variables. Partitions index sets into contiguous segments whose bounds and elements share uniform properties.
5. Delay Differential Equation (DDE) Method-of-Steps Flowpipes (wasm_dde_flowpipe.ts)
Academic Citations
- Bellman, R., & Cooke, K. L. (1963). Differential-Difference Equations.
Academic Press. - Zou, L., Fränzle, M., Xue, B., & Zhan, N. (2015). "orda: An Ode and Dde Reachability Analysis Tool."
SETTA 2015, LNCS 9409, pp. 109–123. DOI: 10.1007/978-3-319-25942-0_8
ModelScript Rationale & Modifications
Physical transport delays, networked control loops, and Modelica delay(x, tau) operators yield infinite-dimensional Delay Differential Equations (DDEs):
DdeFlowpipeSolver (packages/runtime/src/analysis/wasm_dde_flowpipe.ts) implements Method-of-Steps reachability propagation across consecutive delay horizons
- History Interval Buffering: Maintains a timestamped ring buffer
historyMapstoring both nominal trajectoriesand interval/zonotope tube enclosures . For , queries evaluate the initial functional history enclosure ; for , historical enclosures are interpolated from stored flowpipe steps. - Interval Picard Enclosure Step: Advances the state tube across
by combining current state bounds and delayed history bounds : - Epistemic Soundness Tagging: Explicitly tags the resulting
VerificationVerdictwith rigor metadata (heuristicvs.certified) so downstream safety monitors distinguish fast corner-sampled delay tube estimates from fully Taylor-enclosed flowpipes.
6. Hamilton-Jacobi-Isaacs (HJI) PDE Level-Set Reachability (wasm_hji_solver.ts)
Academic Citations
- Mitchell, I. M., Bayen, A. M., & Tomlin, C. J. (2005). "A time-dependent Hamilton-Jacobi formulation of reachable sets for continuous dynamic games."
IEEE Transactions on Automatic Control, 50(7), pp. 947–957.
DOI: 10.1109/TAC.2005.851439 - Jiang, G. S., & Shu, C. W. (2000). "Weighted ENO schemes for Hamilton-Jacobi equations."
SIAM Journal on Scientific Computing, 21(6), pp. 2126–2143.
DOI: 10.1137/S106482759732455X
ModelScript Rationale & Modifications
When verifying safety of nonlinear control systems under worst-case adversarial disturbances HjiLevelSetSolver (packages/runtime/src/analysis/wasm_hji_solver.ts) computes the exact Backward Reachable Tube (BRT) by solving the zero-sum differential game Hamilton-Jacobi-Isaacs (HJI) PDE viscosity solution on an Eulerian level-set grid:
where the sub-zero level set
- 5th-Order WENO Upwind Spatial Reconstruction (
weno5Derivatives): Approximates left and right spatial derivativesalong each state axis using 3-stencil smoothness indicators ( ) and nonlinear weights , eliminating spurious oscillations near non-smooth value-function kinks. - Lax-Friedrichs Numerical Hamiltonian: Evaluates the saddle-point Hamiltonian
at central gradients augmented by artificial viscosity dissipation: - Monotone BRT Accumulation: Steps the level-set array backward in time with
nextV[idx] = Math.min(V[idx], V[idx] - dt * dVdt)and reports the exact unsafe volume fraction across the state space.
Upstream & Downstream Pipeline Connections
- Upstream Inputs:
- Control-flow graphs,
delay(x, tau)equations, and continuous vector fields fromModelicaFlattener. - Adversarial disturbance bounds
and safety level-set specifications from SysML v2 verification cases.
- Control-flow graphs,
- Downstream Consumers:
- Feeds numeric intervals into
HC4 ContractorandNelson-Oppen Coordinator. - Certifies backward reachable tubes and delay flowpipes in
UnifiedVerifier(msx verify). - Eliminates out-of-bounds array access and division-by-zero compiler warnings at compile time.
- Feeds numeric intervals into

