Skip to main content
QUICK REVIEW

[Paper Review] Rethinking Basis Path Testing: Mixed Integer Programming Approach for Test Path Set Generation

Chao Wei, Xinyi Peng|arXiv (Cornell University)|Jan 9, 2026
Software Testing and Debugging TechniquesComputer Science0 citations
TL;DR

The paper reframes basis path generation as a mixed integer programming optimization problem and introduces Holistic and Incremental MIP strategies to generate a complete, minimal, and independent basis path set for CFGs, with strong empirical results on real and synthetic graphs.

ABSTRACT

Basis path testing is a cornerstone of structural testing, yet traditional automated methods, relying on greedy graph-traversal algorithms (e.g., DFS/BFS), often generate sub-optimal paths. This structural inferiority is not a trivial issue; it directly impedes downstream testing activities by complicating automated test data generation and increasing the cognitive load for human engineers. This paper reframes basis path generation from a procedural search task into a declarative optimization problem. We introduce a Mixed Integer Programming (MIP) framework designed to produce a complete basis path set that is globally optimal in its structural simplicity. Our framework includes two complementary strategies: a Holistic MIP model that guarantees a theoretically optimal path set, and a scalable Incremental MIP strategy for large, complex topologies. The incremental approach features a multi-objective function that prioritizes path simplicity and incorporates a novelty penalty to maximize the successful generation of linearly independent paths. Empirical evaluations on both real-code and large-scale synthetic Control Flow Graphs demonstrate that our Incremental MIP strategy achieves a 100\% success rate in generating complete basis sets, while remaining computationally efficient. Our work provides a foundational method for generating a high-quality structural "scaffold" that can enhance the efficiency and effectiveness of subsequent test generation efforts.

Motivation & Objective

  • Motivate the need for higher-quality basis path sets beyond greedy DFS/BFS methods.
  • Formulate basis path generation as a declarative optimization problem.
  • Develop a Holistic MIP model that guarantees a globally optimal, simple basis set.
  • Propose a scalable Incremental MIP strategy with a novelty penalty to ensure independence and scalability.
  • Demonstrate robustness and scalability through empirical evaluation on real-code and large synthetic CFGs.

Proposed method

  • Formulate the CFG basis path generation as a MIP with variables capturing edge usage, node visitation, and path connectivity.
  • Enforce path validity, connectivity, and basis properties (completeness and linear independence) via constraints, including a network-flow-based subtour elimination.
  • Minimize total path length across all paths to promote simplicity and include a novelty penalty to encourage reuse of existing edges in the Incremental MIP formulation.
  • Provide a Holistic MIP model that solves for all k paths simultaneously with a subtour-elimination constraint.
  • Develop an Incremental MIP strategy that builds the basis path set path-by-path, using a dual objective to balance length and novelty (new edges).
  • Describe an iterative algorithm that updates the covered-edge set and enforces independence via a constraint ensuring each new path includes at least one previously unused edge.

Experimental results

Research questions

  • RQ1Can basis path generation be effectively framed as a global optimization problem rather than a procedural search?
  • RQ2Can a Holistic MIP model guarantee a globally optimal (short and simple) complete basis path set?
  • RQ3Does an Incremental MIP strategy with a novelty penalty reliably generate a complete basis set on largeCFGs while remaining scalable?
  • RQ4How do these MIP-based approaches compare to traditional BFS-based baselines in terms of success rate, path coverage, and runtime on real and synthetic data?
  • RQ5What are the trade-offs between global optimality and computational scalability in this context?

Key findings

  • Incremental MIP with a novelty-driven objective achieves 100% success rate in generating complete basis sets across diverse topologies.
  • Baseline BFS is unreliable for complete basis set generation, especially as cyclomatic complexity grows.
  • Holistic MIP guarantees global optimality but may timeout on large graphs; Incremental MIP scales and avoids timeouts.
  • Incr. MIP2 (Novelty-Driven) remains robust and efficient, solving the most complex instances in tens of seconds.
  • Novelty penalty preserves uncovered edges for later paths, mitigating the Greedy Trap and enabling complete basis sets.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.