Proving Functional Program Equivalence via Directed Lemma Synthesis

Proving equivalence between functional programs is a fundamental problem in program verification, which often amounts to reasoning about algebraic data types (ADTs) and compositions of structural recursions. Modern theorem provers address this problem by applying structural induction, which is insuf...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Sun, Yican, Ji, Ruyi, Fang, Jian, Jiang, Xuanlin, Chen, Mingshuai, Xiong, Yingfei
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Sun, Yican
Ji, Ruyi
Fang, Jian
Jiang, Xuanlin
Chen, Mingshuai
Xiong, Yingfei
description Proving equivalence between functional programs is a fundamental problem in program verification, which often amounts to reasoning about algebraic data types (ADTs) and compositions of structural recursions. Modern theorem provers address this problem by applying structural induction, which is insufficient for proving many equivalence theorems. In such cases, one has to invent a set of lemmas, prove these lemmas by additional induction, and use these lemmas to prove the original theorem. There is, however, a lack of systematic understanding of what lemmas are needed for inductive proofs and how these lemmas can be synthesized automatically. This paper presents directed lemma synthesis, an effective approach to automating equivalence proofs by discovering critical lemmas using program synthesis techniques. We first identify two induction-friendly forms of propositions that give formal guarantees to the progress of the proof. We then propose two tactics that synthesize and apply lemmas, thereby transforming the proof goal into induction-friendly forms. Both tactics reduce lemma synthesis to a specialized class of program synthesis problems with efficient algorithms. Experimental results demonstrate the effectiveness of our approach: Compared to state-of-the-art equivalence checkers employing heuristic-based lemma enumeration, directed lemma synthesis saves 95.47% runtime on average and solves 38 more tasks over an extended version of the standard benchmark set.
doi_str_mv 10.48550/arxiv.2405.11535
format Article
fullrecord <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2405_11535</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2405_11535</sourcerecordid><originalsourceid>FETCH-LOGICAL-a675-33cbc5f5e8da96598ac1f3290fd76cd4d71e7aa6086f8c177a45c997da7ef3cf3</originalsourceid><addsrcrecordid>eNotz7FOwzAUhWEvDKjwAEz4BRLsOtd2xiq0gBSpSHSPLvZ1aylxwUkj-vZAYTrSPxzpY-xOirKyAOIB81ecy2UloJQSFFyz5jUf55j2fHNKborHhD3_SfuMA19_nuKMPSVHfI7IH2MmN5HnLQ0D8rdzmg40xvGGXQXsR7r93wXbbda75rlot08vzaotUBsolHLvDgKQ9VhrqC06GdSyFsEb7XzljSSDqIXVwTppDFbg6tp4NBSUC2rB7v9uL4ruI8cB87n71XQXjfoGXsNF4A</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Proving Functional Program Equivalence via Directed Lemma Synthesis</title><source>arXiv.org</source><creator>Sun, Yican ; Ji, Ruyi ; Fang, Jian ; Jiang, Xuanlin ; Chen, Mingshuai ; Xiong, Yingfei</creator><creatorcontrib>Sun, Yican ; Ji, Ruyi ; Fang, Jian ; Jiang, Xuanlin ; Chen, Mingshuai ; Xiong, Yingfei</creatorcontrib><description>Proving equivalence between functional programs is a fundamental problem in program verification, which often amounts to reasoning about algebraic data types (ADTs) and compositions of structural recursions. Modern theorem provers address this problem by applying structural induction, which is insufficient for proving many equivalence theorems. In such cases, one has to invent a set of lemmas, prove these lemmas by additional induction, and use these lemmas to prove the original theorem. There is, however, a lack of systematic understanding of what lemmas are needed for inductive proofs and how these lemmas can be synthesized automatically. This paper presents directed lemma synthesis, an effective approach to automating equivalence proofs by discovering critical lemmas using program synthesis techniques. We first identify two induction-friendly forms of propositions that give formal guarantees to the progress of the proof. We then propose two tactics that synthesize and apply lemmas, thereby transforming the proof goal into induction-friendly forms. Both tactics reduce lemma synthesis to a specialized class of program synthesis problems with efficient algorithms. Experimental results demonstrate the effectiveness of our approach: Compared to state-of-the-art equivalence checkers employing heuristic-based lemma enumeration, directed lemma synthesis saves 95.47% runtime on average and solves 38 more tasks over an extended version of the standard benchmark set.</description><identifier>DOI: 10.48550/arxiv.2405.11535</identifier><language>eng</language><subject>Computer Science - Programming Languages</subject><creationdate>2024-05</creationdate><rights>http://creativecommons.org/licenses/by/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,780,885</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2405.11535$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2405.11535$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Sun, Yican</creatorcontrib><creatorcontrib>Ji, Ruyi</creatorcontrib><creatorcontrib>Fang, Jian</creatorcontrib><creatorcontrib>Jiang, Xuanlin</creatorcontrib><creatorcontrib>Chen, Mingshuai</creatorcontrib><creatorcontrib>Xiong, Yingfei</creatorcontrib><title>Proving Functional Program Equivalence via Directed Lemma Synthesis</title><description>Proving equivalence between functional programs is a fundamental problem in program verification, which often amounts to reasoning about algebraic data types (ADTs) and compositions of structural recursions. Modern theorem provers address this problem by applying structural induction, which is insufficient for proving many equivalence theorems. In such cases, one has to invent a set of lemmas, prove these lemmas by additional induction, and use these lemmas to prove the original theorem. There is, however, a lack of systematic understanding of what lemmas are needed for inductive proofs and how these lemmas can be synthesized automatically. This paper presents directed lemma synthesis, an effective approach to automating equivalence proofs by discovering critical lemmas using program synthesis techniques. We first identify two induction-friendly forms of propositions that give formal guarantees to the progress of the proof. We then propose two tactics that synthesize and apply lemmas, thereby transforming the proof goal into induction-friendly forms. Both tactics reduce lemma synthesis to a specialized class of program synthesis problems with efficient algorithms. Experimental results demonstrate the effectiveness of our approach: Compared to state-of-the-art equivalence checkers employing heuristic-based lemma enumeration, directed lemma synthesis saves 95.47% runtime on average and solves 38 more tasks over an extended version of the standard benchmark set.</description><subject>Computer Science - Programming Languages</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNotz7FOwzAUhWEvDKjwAEz4BRLsOtd2xiq0gBSpSHSPLvZ1aylxwUkj-vZAYTrSPxzpY-xOirKyAOIB81ecy2UloJQSFFyz5jUf55j2fHNKborHhD3_SfuMA19_nuKMPSVHfI7IH2MmN5HnLQ0D8rdzmg40xvGGXQXsR7r93wXbbda75rlot08vzaotUBsolHLvDgKQ9VhrqC06GdSyFsEb7XzljSSDqIXVwTppDFbg6tp4NBSUC2rB7v9uL4ruI8cB87n71XQXjfoGXsNF4A</recordid><startdate>20240519</startdate><enddate>20240519</enddate><creator>Sun, Yican</creator><creator>Ji, Ruyi</creator><creator>Fang, Jian</creator><creator>Jiang, Xuanlin</creator><creator>Chen, Mingshuai</creator><creator>Xiong, Yingfei</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20240519</creationdate><title>Proving Functional Program Equivalence via Directed Lemma Synthesis</title><author>Sun, Yican ; Ji, Ruyi ; Fang, Jian ; Jiang, Xuanlin ; Chen, Mingshuai ; Xiong, Yingfei</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a675-33cbc5f5e8da96598ac1f3290fd76cd4d71e7aa6086f8c177a45c997da7ef3cf3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Computer Science - Programming Languages</topic><toplevel>online_resources</toplevel><creatorcontrib>Sun, Yican</creatorcontrib><creatorcontrib>Ji, Ruyi</creatorcontrib><creatorcontrib>Fang, Jian</creatorcontrib><creatorcontrib>Jiang, Xuanlin</creatorcontrib><creatorcontrib>Chen, Mingshuai</creatorcontrib><creatorcontrib>Xiong, Yingfei</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Sun, Yican</au><au>Ji, Ruyi</au><au>Fang, Jian</au><au>Jiang, Xuanlin</au><au>Chen, Mingshuai</au><au>Xiong, Yingfei</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Proving Functional Program Equivalence via Directed Lemma Synthesis</atitle><date>2024-05-19</date><risdate>2024</risdate><abstract>Proving equivalence between functional programs is a fundamental problem in program verification, which often amounts to reasoning about algebraic data types (ADTs) and compositions of structural recursions. Modern theorem provers address this problem by applying structural induction, which is insufficient for proving many equivalence theorems. In such cases, one has to invent a set of lemmas, prove these lemmas by additional induction, and use these lemmas to prove the original theorem. There is, however, a lack of systematic understanding of what lemmas are needed for inductive proofs and how these lemmas can be synthesized automatically. This paper presents directed lemma synthesis, an effective approach to automating equivalence proofs by discovering critical lemmas using program synthesis techniques. We first identify two induction-friendly forms of propositions that give formal guarantees to the progress of the proof. We then propose two tactics that synthesize and apply lemmas, thereby transforming the proof goal into induction-friendly forms. Both tactics reduce lemma synthesis to a specialized class of program synthesis problems with efficient algorithms. Experimental results demonstrate the effectiveness of our approach: Compared to state-of-the-art equivalence checkers employing heuristic-based lemma enumeration, directed lemma synthesis saves 95.47% runtime on average and solves 38 more tasks over an extended version of the standard benchmark set.</abstract><doi>10.48550/arxiv.2405.11535</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier DOI: 10.48550/arxiv.2405.11535
ispartof
issn
language eng
recordid cdi_arxiv_primary_2405_11535
source arXiv.org
subjects Computer Science - Programming Languages
title Proving Functional Program Equivalence via Directed Lemma Synthesis
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2024-12-27T08%3A07%3A32IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Proving%20Functional%20Program%20Equivalence%20via%20Directed%20Lemma%20Synthesis&rft.au=Sun,%20Yican&rft.date=2024-05-19&rft_id=info:doi/10.48550/arxiv.2405.11535&rft_dat=%3Carxiv_GOX%3E2405_11535%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true