🤖 AI Summary
This work addresses the significant challenge of automatically generating inductive hypotheses—i.e., lemmas—required for rewriting induction in higher-order term rewriting systems with computational or constraint-based features. To this end, it introduces, for the first time, a template-based mechanism integrated into Bounded Rewriting Induction (Bounded RI). By recognizing common higher-order functional patterns in programs, the approach generates effective lemmas and establishes a complementary heuristic strategy for lemma synthesis. This method substantially expands the scope of provable program equivalences, successfully verifying previously intractable cases and thereby enhancing the practical applicability of rewriting induction in real-world code verification.
📝 Abstract
Rewriting Induction (RI) is a formal system in term rewriting to establish program equivalence. The recently defined Bounded RI for higher-order Logically Constrained Term Rewriting Systems (LCSTRSs) yields a convenient proof system for analyzing real programming code. A practical challenge in RI is the automatic generation of induction hypotheses, called lemmas. While various lemma generation techniques exist for plain term rewriting, there are much fewer that consider the intricacies brought on by calculations or constraints. Taking advantage of recent developments in higher-order RI, we here present a new approach based on templates, which operates by recognising typical programming constructs as instances of higher-order functions. While templates have been used as a stand-alone method to justify the correctness of program transformations, we here consider their integration in Bounded RI to obtain a complementary lemma generation heuristic. This allows us to prove equivalences that were previously out of reach.