Papers
Topics
Authors
Recent
Search
2000 character limit reached

DiffRefiner: Difference Analysis in APAs

Updated 28 November 2025
  • DiffRefiner is a formal tool that analyzes and decomposes differences between abstract probabilistic automata (APAs) used in compositional verification.
  • It employs over- and under-approximations with symbolic constraint manipulation to capture counterexamples when refinement fails.
  • Its quantitative framework uses discounted metrics to ensure convergence, rigorously balancing soundness and completeness in system analysis.

A DiffRefiner is a formal tool designed for analyzing and decomposing differences between specifications given as Abstract Probabilistic Automata (APAs), particularly in the context of compositional verification and quantitative model reasoning. When two APAs, representing system behaviors or requirements, stand in a non-refinement relation, DiffRefiner systematically synthesizes a new APA that captures all counterexample stochastic systems (implementations) attesting to the failure of refinement. The tool produces both sound over-approximations as well as convergent under-approximations of the difference, with rigorous quantitative control. At its core are distance metrics on automata, discounted convergence, and algorithms for symbolic manipulation of constraint-transition systems (Delahaye et al., 2012).

1. Formal Structure of APAs and Refinement

An Abstract Probabilistic Automaton (APA) in single-valuation normal form is a tuple: N=(S,A,L,AP,V,S0)N = (S,\, A,\, L,\, AP,\, V,\, S_0) where SS is the finite set of states, AA an action alphabet, APAP atomic propositions, V:S22APV:S\to 2^{2^{AP}} assigns at most one set of atomic proposition valuations per state, S0S_0 are initial states, and

$L:S \times A \times C(S) \to \{\bot,\, \may,\, \top\}$

maps each state-action-constraint triple to a modality. Here, C(S)C(S) is a set of transition constraints on distributions over SS: L(s,a,ϕ)=L(s,a,\phi)=\top means “must”, $\may$ means “may”, and \bot means “must not”.

Refinement is defined by a relation RS1×S2R\subseteq S_1 \times S_2 (for two APAs N1,N2N_1, N_2) such that, for every (s1,s2)R(s_1,s_2) \in R:

  • The valuation V1(s1)V2(s2)V_1(s_1) \subseteq V_2(s_2).
  • Must-part: for every "must" outgoing from s2s_2, there is a corresponding "must" in s1s_1 satisfying distribution coupling via RR.
  • May-part: for every "may" outgoing from s1s_1, there is a "may" in s2s_2 with correspondingly coupled distributions.

Refinement (N1N2N_1 \preceq N_2) holds if there exists such a relation covering all initial states. This definition generalizes simulation-like relations to the probabilistic and modal setting and is critical for sound refinement and difference reasoning (Delahaye et al., 2012).

2. Difference Operators and Approximation Schemes

When N1⪯̸N2N_1 \not\preceq N_2, it is often useful to characterize the set difference of their implementations, i.e., those PAs allowed by N1N_1 that do not conform to N2N_2. In general, the exact difference

Impl(N1)Impl(N2)\mathrm{Impl}(N_1) \setminus \mathrm{Impl}(N_2)

need not correspond to an APA, so the DiffRefiner computes:

  • An over-approximation N1N2N_1 \setminus^{*} N_2, admitting a superset of the actual difference,
  • A family of under-approximations N1KN2N_1 \setminus^{K} N_2 (for depth KNK \in \mathbb{N}), which grow increasingly tight as KK \to \infty.

These operators are defined by symbolic construction on APA states and transitions, carefully tracking modalities and constraints, and ensuring that under-approximations are contained in the true difference while the over-approximation contains it (Delahaye et al., 2012).

3. Quantitative Theory and Convergence

DiffRefiner introduces a discounted quantitative metric: d(s1,s2)={1,s1,s2 incompatible max{maxa,ϕ1minϕ2λD(ϕ1,ϕ2),  maxa,ϕ2=minϕ1=λD(ϕ1,ϕ2)},otherwised(s_1, s_2) = \begin{cases} 1, & s_1, s_2 \ \text{incompatible}\ \max\Bigl\{ \max_{a,\phi_1 \neq \bot}\min_{\phi_2 \neq\bot} \lambda D(\phi_1, \phi_2),\; \max_{a,\phi_2= \top}\min_{\phi_1= \top} \lambda D(\phi_1, \phi_2) \Bigr\}, & \text{otherwise} \end{cases} where 0<λ<10<\lambda<1 is a discount factor and D(ϕ1,ϕ2)D(\phi_1, \phi_2) compares sets of distributions via a Hausdorff-like distance. This metric supports rigorous statements about the convergence of under-approximate difference automata: limKd(N1N2,N1KN2)=0,limKdt(Impl(N1)Impl(N2),Impl(N1KN2))=0\lim_{K \to \infty} d(N_1 \setminus^* N_2, N_1 \setminus^K N_2) = 0, \quad \lim_{K \to \infty} d_t(\mathrm{Impl}(N_1)\setminus\mathrm{Impl}(N_2), \mathrm{Impl}(N_1 \setminus^K N_2)) = 0 ensuring precision can be controlled arbitrarily by depth KK (Delahaye et al., 2012).

Both soundness (over-approximation admits all true witnesses to non-refinement) and completeness (every true difference appears in some under-approximation) are guaranteed, with convergence governed by the choice of λ\lambda.

4. Core Algorithmic Workflow

The difference computation proceeds as follows:

  1. Maximal Refinement Computation: Compute the largest refinement relation RR and the associated index function indRind_R (witnessing depth to breakdown) between N1,N2N_1, N_2.
  2. Depth Selection: Choose minimal KK such that λKε\lambda^K \leq \varepsilon, for the desired precision ε\varepsilon.
  3. Construction of Under-Approximation: Build the under-approximate difference automaton N1KN2N_1 \setminus^K N_2 by symbolically constructing state tuples (s1,s2,e,k)(s_1, s_2, e, k), with transitions handled according to six "breaking" cases (detailed in the source (Delahaye et al., 2012), Table V).
  4. Distance Evaluation and Termination: Optionally, measure the (discounted) distance to verify convergence and sufficiency with respect to ε\varepsilon.

Pseudocode for this high-level process:

1
2
3
4
5
6
7
function ApproxDifference(N1, N2, λ, ε):
    if N1  N2:
        return 
    R, ind_R  ComputeMaxRefinement(N1, N2)
    K  ceil( log(ε) / log(λ) )
    Ndiff  BuildUnderApprox(N1, N2, R, ind_R, K)
    return Ndiff

Complexity is modest: for fixed λ\lambda and ε\varepsilon, asymptotically dominated by the cost of the underlying refinement computation and symbolic constraint solving.

5. Implementation and Practical Considerations

Efficient implementation of DiffRefiner entails:

  • Representation of APA states, transitions, and constraints (often as SMT objects for C(S)C(S)).
  • Bit-matrix storage and queue management for RR.
  • Implicit handling of under-approximation states using hash-maps keyed on tuples (s1,s2,e,k)(s_1, s_2, e, k).
  • Iterative value-iteration for distance calculations if convergence needs to be explicitly monitored.
  • Tuning of λ\lambda for the sensitivity/convergence tradeoff, and setting KK accordingly.

Discounting guarantees that cycles and infinite behaviors contribute at most λK\lambda^K at depth KK.

6. Example and Characterization of Results

Consider two APAs NAN_A and NBN_B (each with two states, simple Boolean-atomic-propositions). Suppose NAN_A enables an action aa leading deterministically to a state s1s_1, and NBN_B requires action aa to hit state t1t_1 with probability at least 0.5. All implementations of NAN_A actually refine NBN_B, so the DiffRefiner returns the empty difference.

If instead NAN_A allows any mixture between s0s_0 and s1s_1 on aa, there are behaviors excluded by NBN_B; the under-approximate difference at increasing KK will include more concrete counterexamples (e.g., those assigning less than 0.5 mass to s1s_1), and as KK\to\infty, approaches the set of all such witness PAs. Over-approximation represents all possible ways to fail refinement, possibly admitting infinitesimal cases (Delahaye et al., 2012).

7. Theoretical and Practical Significance

The DiffRefiner approach is theoretically grounded, delivering both soundness and completeness guarantees via over-/under-approximation, all under explicit metric control. This enables precision-tunable difference analyses not only for exhaustively distinguishing implementable behaviors but also for understanding specification robustness and root causes in system design.

The construction is as efficient as ordinary refinement-checking. Its rigor and algorithmic transparency make it suitable for runtime integration in probabilistic/verifiable system design and analysis workflows.

For formal details, soundness proofs, construction of difference automata, and worked examples, see "Refinement and Difference for Probabilistic Automata" (Delahaye et al., 2012).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DiffRefiner.