Software Performability Analysis Using Fast Parametric Model Checking

Xinwei Fang, Radu Calinescu, Simos Gerasimou, Faisal AlhwikemarXiv 2022

TL;DR

This paper introduces Fast Parametric Model Checking (fPMC), a compositional technique that breaks down complex probabilistic software models into smaller, manageable fragments. By analyzing these fragments independently and combining the results, fPMC achieves orders-of-magnitude speedups and handles models with far more parameters than state-of-the-art monolithic tools.

What Problem Does This Paper Address?

Modern software often operates in unpredictable environments, requiring engineers to model performance and reliability using Parametric Discrete-Time Markov Chains (pDTMCs). These models use variables (parameters) for unknown probabilities, like the chance of a network failure or a specific user action.

The goal of Parametric Model Checking (PMC) is to turn these models into algebraic formulas (e.g., $SuccessRate = p \cdot 0.9 + (1-p) \cdot 0.8$). These formulas are incredibly useful for "what-if" analysis and runtime adaptation. However, existing PMC tools suffer from a "state-space explosion": as the number of parameters or states grows, the time to compute the formula and the complexity of the formula itself grow exponentially. Many real-world models simply time out or produce formulas too massive to be useful.

Methods

The authors propose a "divide and conquer" approach called fPMC. Instead of tackling a massive model head-on, the process follows four main steps:

  1. Automated Fragmentation: The tool partitions the model's graph into "fragments"—subgraphs with a single entry point and multiple exit points.
  2. Local Analysis: Each fragment is analyzed independently using standard PMC tools (like Storm) to generate local algebraic sub-expressions.
  3. Model Abstraction: The original model is simplified into an "abstract model" where each complex fragment is replaced by a single representative state.
  4. Composition: The local sub-expressions and the abstract model's results are combined into a final system of equations.

A key innovation is the use of a fragmentation threshold ($\alpha$). This parameter acts as a soft upper bound on fragment size. If a fragment grows too large or complex, fPMC uses novel model restructuring techniques—such as inserting auxiliary states or rerouting transitions—to "force" the creation of a valid fragment boundary without changing the model's underlying logic.

Fig. 1: pDTMC fragment F = (Z, z0, Zout)

Datasets

The authors evaluated fPMC using 62 model variants across three distinct domains:

  • FX System: A service-based foreign exchange trading system with various retry and parallel execution strategies.
  • PL System: A software product line for a vending machine controller, varying in feature count and parameter density.
  • COM Process: A communication protocol model inspired by honeybee collective defense behavior.

These models were selected because they represent common architectural patterns and include complex structures like nested loops that typically break standard PMC tools.

Key Insights and Ideas

  • Flexibility over Rigidity: Unlike previous methods that partition models based strictly on "Strongly Connected Components" (SCCs), fPMC is flexible. It can split a large SCC into multiple fragments or group small SCCs together, guided by the $\alpha$ threshold.
  • Formula Simplicity: By breaking the problem down, fPMC avoids the massive polynomial expansions that occur in monolithic analysis. The resulting "system of expressions" is often significantly smaller than a single monolithic rational function.
  • Heuristic Switching: The tool includes a heuristic to decide when to use fPMC. For models with fewer than ~20 parameters, standard monolithic checking is often faster; for anything more complex, the compositional approach of fPMC becomes essential.

Key Results

The experimental results demonstrate a clear advantage for fPMC in complex scenarios:

  • Scalability: fPMC successfully analyzed models that caused leading tools like Storm and PRISM to time out after 60 minutes.
  • Formula Complexity: In one extreme case (the FX system), fPMC produced a formula with 2,629 arithmetic operations, while the monolithic tool produced one with 593,426 operations—a 225x reduction in complexity.
  • Evaluation Speed: Because the formulas are simpler, evaluating them at runtime is much faster. For a complex model, evaluating the fPMC result took 16ms, compared to over 7,500 seconds (two hours!) for the monolithic result.
  • Efficiency: For models with more than 30 parameters, fPMC was consistently faster, often by two orders of magnitude.
Fig. 2: Parametric model checking through fragmentation

Limitations and Future Work

While fPMC is a major step forward, the authors note a few areas for improvement:

  • Optimal Thresholding: Currently, the fragmentation threshold $\alpha$ is chosen based on a "rule of thumb" (typically 10–30). Finding a way to automatically determine the mathematically optimal $\alpha$ for a specific model remains an open challenge.
  • Recursive Fragmentation: The current implementation performs one level of fragmentation. For truly massive "mega-models," the authors suggest that applying fPMC recursively (fragmenting the fragments) could unlock even more scalability.
  • Tool Integration: The authors plan to further optimize their tool by automatically replacing parameters with constant values when fragments don't actually contain any variables, further simplifying the final output.

Summary updated

BibTeX
@misc{fang2022software,
  author = {Xinwei Fang and Radu Calinescu and Simos Gerasimou and Faisal Alhwikem},
  title = {{Software Performability Analysis Using Fast Parametric Model Checking}},
  year = {2022},
  eprint = {2208.12723},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.12723},
}
Figure