arXiv · 2609.27806
DualMine: Static-Dynamic REST API Constraint Discovery with Dual Validation
Abstract
REST API constraints capture semantic properties of API responses and are essential for automated test oracle generation, but they are difficult to discover reliably. Static approaches infer constraints from API specifications and documentation, but their results may be affected by incomplete, ambiguous, or outdated specifications. Dynamic approaches mine invariants from execution traces, but their results depend on execution coverage and may include coincidental properties that hold only for the observed executions. This paper presents DualMine, a hybrid framework for REST API constraint discovery that integrates specification-based constraint mining with runtime invariant mining. It first extracts candidate constraints from OpenAPI specifications using an LLM-based static miner and from request-response traces using dynamic invariant mining. It then performs asymmetric dual validation: runtime evidence is used to validate or refute specification-derived constraints, while specification-aware LLM reasoning is used to filter implausible log-derived invariants~without discarding plausible undocumented behaviors. Finally, it applies counterexample-guided refinement by performing targeted API executions to resolve uncertain, overlapping, or conflicting constraints. We evaluate DualMine on 39 real-world REST APIs and compare it against state-of-the-art static-only, dynamic-only, and constraint discovery approaches. The results show that it improves the quality of discovered constraints by reducing unsupported constraints, retaining complementary constraints missed by individual approaches, which helps detect 48 real REST API faults.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Tu Nguyen, Huy Nguyen, Juan C. A. Valenzuela, Thanh Nguyen, Tien N. Nguyen, Vu Nguyen. 2026-08-18. DualMine: Static-Dynamic REST API Constraint Discovery with Dual Validation. https://arxiv.org/abs/2609.27806
Cite the original work for its findings. Save a collection to share your selection of sources.