🤖 AI Summary
This study investigates the feasibility and computational complexity of the edge-cover problem on control flow graphs under semantic constraints. Focusing on five constraint types—POSITIVE, NEGATIVE, ONCE, MAX ONCE, and ALWAYS—it systematically characterizes their complexity landscape through polynomial-time constructions, NP-completeness reductions via SAT variants, and fixed-parameter tractability (FPT) analysis. The results show that the problem is polynomial-time decidable only under POSITIVE constraints; for the other four constraint types, it remains NP-complete even on directed acyclic graphs. Notably, the NEGATIVE-constrained variant admits an FPT algorithm when parameterized by the number of constraints. This work establishes a theoretical foundation and provides algorithmic insights for constrained test generation in program analysis.
📝 Abstract
The article studies edge coverage for control flow graphs extended with explicit constraints. Achieving a given level of white-box coverage for a given code is a classic problem in software testing. We focus on designing test sets that achieve edge coverage \textit{while respecting additional constraints} between vertices. The paper analyzes how such constraints affect both the feasibility and computational complexity of edge coverage.
The paper discusses five types of constraints. POSITIVE constraints require at least one test path where a given vertex precedes another. NEGATIVE constraints forbid any such test path. ONCE constraints require exactly one test path with a single occurrence of one vertex before another. MAX ONCE constraints allow such precedence in at most one test path. ALWAYS constraints require every test path containing a given vertex to also contain another vertex later on the same path. Each type models a different test requirement, such as mandatory flows, semantic exclusions, or execution cost limits.
We investigate the computational complexity of finding a test set that achieves edge coverage and respects a given set of constraints. For POSITIVE constraints, the existence of an edge covering test set is decidable in polynomial time by extending standard edge coverage constructions with additional paths for each constraint. For NEGATIVE, MAX ONCE, ONCE, and ALWAYS constraints, the decision problem is NP-complete. The proofs rely on polynomial reductions from variants of SAT. The NP-completeness results hold even for restricted graph classes, including acyclic graphs, for all these four constraints.
Finally, we study the fixed-parameter tractability of the NEGATIVE constraint. Although the general problem is NP-complete, the paper presents an FPT algorithm with respect to the number of constraints.