Algebro-geometric Algorithms for Template-Based Synthesis of Polynomial Programs
Amir Kafshdar Goharshady, S. Hitarth, Fatemeh Mohammadi, Harshit J. Motwani
摘要
Template-based synthesis, also known as sketching, is a localized approach to program synthesis in which the programmer provides not only a specification, but also a high-level "sketch" of the program. The sketch is basically a partial program that models the general intuition of the programmer, while leaving the low-level details as unimplemented "holes". The role of the synthesis engine is then to fill in these holes such that the completed program satisfies the desired specification. In this work, we focus on template-based synthesis of polynomial imperative programs with real variables, i.e. imperative programs in which all expressions appearing in assignments, conditions and guards are polynomials over program variables. While this problem can be solved in a sound and complete manner by a reduction to the first-order theory of the reals, the resulting formulas will contain a quantifier alternation and are extremely hard for modern SMT solvers, even when considering toy programs with a handful of lines. Moreover, the classical algorithms for quantifier elimination are notoriously unscalable and not at all applicable to this use-case.
In contrast, our main contribution is an algorithm, based on several well-known theorems in polyhedral and real algebraic geometry, namely Putinar's Positivstellensatz, the Real Nullstellensatz, Handelman's Theorem and Farkas' Lemma, which sidesteps the quantifier elimination difficulty and reduces the problem directly to Quadratic Programming (QP). Alternatively, one can view our algorithm as an efficient way of eliminating quantifiers in the particular formulas that appear in the synthesis problem. The resulting QP instances can then be handled quite easily by SMT solvers. Notably, our reduction to QP is sound and semi-complete, i.e. it is complete if polynomials of a sufficiently high degree are used in the templates. Thus, we provide the first method for sketching-based synthesis of polynomial programs that does not sacrifice completeness, while being scalable enough to handle meaningful programs. Finally, we provide experimental results over a variety of examples from the literature.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Practical Approximate Quantifier Elimination for Non-linear Real Arithmetic 引用了 Polynomial invariant generation for non-deterministic recursive programs
- Practical Approximate Quantifier Elimination for Non-linear Real Arithmetic 引用了 Asparagus: Automated Synthesis of Parametric Gas Upper-Bounds for Smart Contracts
- Practical Approximate Quantifier Elimination for Non-linear Real Arithmetic 引用了 Polynomial reachability witnesses via Stellensätze
- Parallel Abstract Interpretation for Polynomial Programs with Range Bound Assertions 引用了 Practical Approximate Quantifier Elimination for Non-linear Real Arithmetic
- Parallel Abstract Interpretation for Polynomial Programs with Range Bound Assertions 引用了 Polynomial invariant generation for non-deterministic recursive programs
- Asparagus: Automated Synthesis of Parametric Gas Upper-Bounds for Smart Contracts 引用了 Polynomial invariant generation for non-deterministic recursive programs
- Asparagus: Automated Synthesis of Parametric Gas Upper-Bounds for Smart Contracts 引用了 Polynomial reachability witnesses via Stellensätze
- Solvable Polynomial Ideals: The Ideal Reflection for Program Analysis 引用了 Polynomial invariant generation for non-deterministic recursive programs
- Polynomial reachability witnesses via Stellensätze 引用了 Polynomial invariant generation for non-deterministic recursive programs
引用它的顶会 Paper5
- Asparagus: Automated Synthesis of Parametric Gas Upper-Bounds for Smart ContractsZhuo Cai, Soroush Farokhnia, Amir Kafshdar Goharshady, S. HitarthOOPSLA 2023 · 16 次引用
- Solvable Polynomial Ideals: The Ideal Reflection for Program AnalysisJohn Cyphert, Zachary KincaidPOPL 2024 · 11 次引用
- From Batch to Stream: Automatic Generation of Online AlgorithmsZiteng Wang, Shankara Pailoor, Aaryan Prakash, Yuepeng Wang 等PLDI 2024 · 4 次引用
- Practical Approximate Quantifier Elimination for Non-linear Real ArithmeticS. Akshay, Supratik Chakraborty, Amir Kafshdar Goharshady, R. Govind 等FM 2024 · 3 次引用
- Parallel Abstract Interpretation for Polynomial Programs with Range Bound AssertionsS. Akshay, Supratik Chakraborty, Soroush Farokhnia, Amir Goharshady 等CAV 2026
它引用的 Paper3
- Polynomial invariant generation for non-deterministic recursive programsKrishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady, Ehsan Kafshdar GoharshadyPLDI 2020 · 46 次引用
- Program synthesis by type-guided abstraction refinementZheng Guo, Michael James, David Justo, Jiaxiao Zhou 等POPL 2020 · 45 次引用
- Polynomial reachability witnesses via StellensätzeAli Asadi, Krishnendu Chatterjee, Hongfei Fu, Amir Kafshdar Goharshady 等PLDI 2021 · 28 次引用
相关 Paper
- Quantified Linear and Polynomial Arithmetic Satisfiability via Template-based SkolemizationKrishnendu Chatterjee, Ehsan Kafshdar Goharshady, Mehrdad Karrabi, Harshit J. Motwani 等AAAI 2025 · 3 次引用
- Breaking the Mold: Nonlinear Ranking Function Synthesis Without TemplatesShaowei Zhu, Zachary KincaidCAV 2024 · 2 次引用
- Verified Quadratic Virtual Substitution for Real ArithmeticMatias Scharager, Katherine Cordwell, Stefan Mitsch, André PlatzerFM 2021 · 3 次引用
- Sound and Complete Witnesses for Template-Based Verification of LTL Properties on Polynomial ProgramsKrishnendu Chatterjee, Amir Kafshdar Goharshady, Ehsan Kafshdar Goharshady, Mehrdad Karrabi 等FM 2024 · 11 次引用
- Recursive Program Synthesis using ParamorphismsQiantan Hong, Alex AikenPLDI 2024 · 7 次引用
