Skip to content

Abstract Interpretation, Polyhedral Domains & Continuous Reachability ​

Implementation:


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 nO(log⁡n) 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:

axi+bxj≤c(a,b,c∈Q)

Much more expressive than simple intervals or octagons, allowing ModelScript to prove physical conservation laws (e.g. p1+p2=const) without the exponential vertex-facet explosion of general convex polyhedra.

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

±xi±xj≤c

Achieves cubic time complexity O(n3) via Floyd-Warshall shortest path algorithms over 2n×2n potential graphs.

  • Modifications: Direct integration into the @modelscript/dsl type inference system and AbstractDomainOracle in 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):

x˙(t)=f(t,x(t),x(t−τ)),x(t)∈Φ(t) for t∈[−τ,0]

DdeFlowpipeSolver (packages/runtime/src/analysis/wasm_dde_flowpipe.ts) implements Method-of-Steps reachability propagation across consecutive delay horizons [0,τ],[τ,2τ],…:

  • History Interval Buffering: Maintains a timestamped ring buffer historyMap storing both nominal trajectories x¯(t) and interval/zonotope tube enclosures X(t)=[x―(t),x―(t)]. For t−τ≤t0, queries evaluate the initial functional history enclosure Φ(t−τ); for t−τ>t0, historical enclosures are interpolated from stored flowpipe steps.
  • Interval Picard Enclosure Step: Advances the state tube across [tk,tk+Δt] by combining current state bounds X(tk) and delayed history bounds X(tk−τ):X(tk+1)=X(tk)+Δt⋅◻f(tk,X(tk),X(tk−τ))
  • Epistemic Soundness Tagging: Explicitly tags the resulting VerificationVerdict with rigor metadata (heuristic vs. 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 d∈D and control authority u∈U, convex set-propagation (zonotopes) can suffer from wrapping effects. 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:

∂V∂t+min{0,minu∈Umaxd∈D∇V(x,t)⋅f(x,u,d)}=0,V(x,0)=ℓ(x)

where the sub-zero level set Kunsafe={x∣ℓ(x)≤0} defines the target failure region and {x∣V(x,T)≤0} captures all initial states from which the adversary d can force the trajectory into Kunsafe within horizon T despite optimal safety control u.

  • 5th-Order WENO Upwind Spatial Reconstruction (weno5Derivatives): Approximates left and right spatial derivatives (p−,p+) along each state axis using 3-stencil smoothness indicators (s1,s2,s3) and nonlinear weights ak=γk(ϵ+sk)2, eliminating spurious oscillations near non-smooth value-function kinks.
  • Lax-Friedrichs Numerical Hamiltonian: Evaluates the saddle-point Hamiltonian H(x,p)=minu∈Umaxd∈Dp⋅f(x,u,d) at central gradients p=12(p−+p+) augmented by artificial viscosity dissipation:H^(x,p−,p+)=H(x,p−+p+2)−12∑iαi(pi+−pi−),αi=maxu,d|fi(x,u,d)|
  • 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 from ModelicaFlattener.
    • Adversarial disturbance bounds D and safety level-set specifications ℓ(x)≤0 from SysML v2 verification cases.
  • Downstream Consumers:
    • Feeds numeric intervals into HC4 Contractor and Nelson-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.

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