Metraipolis › archive › dc_28834fad54c0

Template-Free Dynamic Invariant Detection — arXiv:2610.38130

Source
arXiv (en)
Original
https://arxiv.org/abs/2610.38130
License (as archived)
CC0-1.0
Archived
2026-11-01T02:28:57.571Z
SHA-256 of the archived text
1f4bcac5736d259153a9ade521691a161eb9b6b1e5940aa811b803d7f29970b3
Stable URL of this page
https://metraipolis.com/documento/dc_28834fad54c0

How to cite

Template-Free Dynamic Invariant Detection — arXiv:2610.38130 — arXiv (en), https://arxiv.org/abs/2610.38130 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_28834fad54c0 (Metraipolis archive dc_28834fad54c0, sha256 1f4bcac5736d259153a9ade521691a161eb9b6b1e5940aa811b803d7f29970b3)
BibTeX
@misc{dc28834fad54c0,
  title = {Template-Free Dynamic Invariant Detection — arXiv:2610.38130},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2610.38130},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_28834fad54c0; sha256 1f4bcac5736d259153a9ade521691a161eb9b6b1e5940aa811b803d7f29970b3},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2610.38130. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

A dynamic invariant detector proposes invariants, such as method pre- and postconditions, and rules out those that do not hold at run time. Traditional detectors propose invariants from a fixed library of templates, which limits their expressiveness. A large language model (LLM) can propose invariants instead of, or in addition to, template-derived ones. With the right prompt and context choices, we found that this idea can both improve the invariants' expressiveness and reduce the cost of inferring the invariants. Greater expressiveness brings complications: an LLM-proposed invariant can execute arbitrary code during invariant evaluation, causing side effects or infinite loops. Our novel instrumentation strategies mitigate these problems. We wrap each candidate and evaluate only one invariant per thread at a time, so nested invariant evaluations cannot trigger one another indefinitely. To recover from non-nested hangs, we monitor each run for stalls and retry it under a growing time budget. Because we cannot prove a candidate side-effect-free in advance, we use delta debugging over the invariants evaluated during a failing test to isolate and disable a side-effecting candidate without discarding the rest of the run. We compared our implementation, Oca, to the popular template-based Daikon invariant detector on real open-source Java projects. Oca produces more expressive invariants: on average, 28% of its held invariants call a project-specific method, which Daikon's templates cannot express. Its invariants are more often valid, with a false-positive rate of 18% in a manual inspection, vs. 76% for Daikon, and more useful: as properties for property-based testing, they exposed 9 of 25 real bugs, compared with 4 for Daikon. Oca also costs less, using 566 minutes and 27 GB of disk, compared with 2,817 minutes and 827 GB for Daikon.

Tema degli esploratori: calcolo e infrastrutture (elenco arXiv cs.SE, nuovi lavori del giorno).
Categorie arXiv: Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2610.38130 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-11-01T02:12:58.474Z dalla pagina https://arxiv.org/list/cs.SE/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).