While-guard Synthesis by Abstract Static Analysis and CHC Solving
This paper introduces a novel technique for automatically synthesizing assertion-safe while-guards in imperative programs.Given a partial program (sketch) with missing whileguards, the proposed algorithm synthesizes complete Boolean expressions for the missing ones, such that the obtained complete program satisfies the given assertions.To solve this problem, our technique uses forward and backward abstract static analyses of programs to generate (logical) constraints with unknown predicates that are subsequently solved by employing the logical Constraint Horn Clause (CHC) solvers.We have implemented our synthesis algorithm in a proofof-concept tool, and evaluated it on a set of C programs with missing while-guards.By experiments we prove the effectiveness of the proposed technique for synthesizing arbitrary Boolean expressions defined over program variables for some interesting program sketches written in C.
Authors
- Aleksandar S. Dimovski (ORCID: https://orcid.org/0000-0002-3601-2631)
Institutions
- Mother Teresa Hospital (AL)
- Mother Teresa University
Publication Details
- Journal
- Annals of Computer Science and Information Systems
- Published
- 2025-10-15
- DOI
- https://doi.org/10.15439/2025f8874
- Primary Topic
- Formal Methods in Verification
- Type
- article
- Field-Weighted Citation Impact
- 0.00