Algebro-geometric Algorithms for Template-Based Synthesis of Polynomial Programs

Author:

Goharshady Amir Kafshdar1ORCID,Hitarth S.1ORCID,Mohammadi Fatemeh2ORCID,Motwani Harshit Jitendra3ORCID

Affiliation:

1. Hong Kong University of Science and Technology, Hong Kong

2. KU Leuven, Belgium

3. Ghent University, Belgium

Abstract

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.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference70 articles.

1. Alessandro Abate Cristina David Pascal Kesseli Daniel Kroening and Elizabeth Polgreen. 2018. Counterexample guided inductive synthesis modulo theories. In CAV. 270–288. Alessandro Abate Cristina David Pascal Kesseli Daniel Kroening and Elizabeth Polgreen. 2018. Counterexample guided inductive synthesis modulo theories. In CAV. 270–288.

2. Sheshansh Agrawal Krishnendu Chatterjee and Petr Novotnỳ. 2017. Lexicographic ranking supermartingales: an efficient approach to termination of probabilistic programs. In POPL. Sheshansh Agrawal Krishnendu Chatterjee and Petr Novotnỳ. 2017. Lexicographic ranking supermartingales: an efficient approach to termination of probabilistic programs. In POPL.

3. Rajeev Alur , Rastislav Bodik , Garvit Juniwal , Milo MK Martin , Mukund Raghothaman, Sanjit A Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2013 . Syntax-Guided Synthesis. FMCAD. Rajeev Alur, Rastislav Bodik, Garvit Juniwal, Milo MK Martin, Mukund Raghothaman, Sanjit A Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2013. Syntax-Guided Synthesis. FMCAD.

4. Rajeev Alur Dana Fisman Saswat Padhi Andrew Reynolds Rishabh Singh and Abhishek Udupa. 2019. SyGuS-Comp: Syntax-guided Synthesis Competition. https://sygus.org/ Rajeev Alur Dana Fisman Saswat Padhi Andrew Reynolds Rishabh Singh and Abhishek Udupa. 2019. SyGuS-Comp: Syntax-guided Synthesis Competition. https://sygus.org/

5. Search-based program synthesis

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Solvable Polynomial Ideals: The Ideal Reflection for Program Analysis;Proceedings of the ACM on Programming Languages;2024-01-05

2. Asparagus: Automated Synthesis of Parametric Gas Upper-Bounds for Smart Contracts;Proceedings of the ACM on Programming Languages;2023-10-16

3. Algebro-geometric Algorithms for Template-Based Synthesis of Polynomial Programs;Proceedings of the ACM on Programming Languages;2023-04-06

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3