π€ AI Summary
This work addresses the lack of native support for date and calendar-period constraints in existing program analysis and verification tools, which hinders symbolic reasoning about such operations. The paper presents the first satisfiability-solving framework that natively supports date and periodic constraints, formally defining an input language and the semantics of calendar arithmetic. It translates these constraints into integer-based SMT formulas and implements five solving strategies on top of Z3. A test suite comprising 450 synthetic constraints is constructed by integrating LLM prompting, grammar-based sampling, and legal document mining. Experimental results demonstrate that the framework effectively handles irregularities, ambiguities, and boundary conditions inherent in calendar computations, significantly enhancing the solverβs capability for real-world date-reasoning tasks.
π Abstract
Dates and calendar periods (i.e., days, months, years) appear frequently in tasks involving analysis of software, data, and documents. Prior research has shown that computer logic involving dates and calendrical calculations is error-prone due to tricky rules (e.g., irregularly sized months), ambiguities (e.g., scheduling one month from "Jan 31st"), and edge cases (e.g., leap years). However, existing program analysis and verification tools do not provide native support for dates, making it hard to reason about operations involving calendrical arithmetic symbolically.
This paper presents DateSAT, the first framework for expressing and solving satisfiability constraints involving dates and calendar periods. The paper first formalizes an input language and the semantics of date and period arithmetic. The paper then presents five separate strategies for solving DateSAT constraints based on reductions to SMT formulas involving integers, which we have implemented using Z3 as a backend. We curate a dataset of 450 DateSAT constraints synthesized using LLM prompting, grammar-based sampling, and mining legal documents, and then present an empirical evaluation of DateSAT solver performance.