PBLInv: Postcondition-based Loop Invariant Learning for C Programs

Hong Lu, Chengyi Wang, Jiacheng Gui, Hao Huang
{"title":"PBLInv: Postcondition-based Loop Invariant Learning for C Programs","authors":"Hong Lu, Chengyi Wang, Jiacheng Gui, Hao Huang","doi":"10.1109/QRS51102.2020.00013","DOIUrl":null,"url":null,"abstract":"It is challenging to generate loop invariants for programs automatically in the field of software analysis and verification. Loop invariants are the weakened forms of the postconditions for loops. Therefore, we propose PBLInv, a postcondition-based approach to generate loop invariants for C programs with the machine learning method. First, we generate the postcondition for a loop program automatically. Second, we learn classifiers as the updated candidate loop invariants with the Kernel Support Vector Machine (KSVM) method iteratively. PBLInv is evaluated with 60 benchmark programs collected from the recent papers and the 2019 Software Verification Competitions (SV-Comp 2019). The experimental results show that PBLInv is efficient at learning loop invariants for C programs. Compared with five state-of-the-art methods of generating loop invariants, PBLInv not only generates loop invariants for more benchmarks, but also reduces the number of used samples and iterations for learning loop invariants.","PeriodicalId":301814,"journal":{"name":"2020 IEEE 20th International Conference on Software Quality, Reliability and Security (QRS)","volume":"34 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE 20th International Conference on Software Quality, Reliability and Security (QRS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/QRS51102.2020.00013","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

It is challenging to generate loop invariants for programs automatically in the field of software analysis and verification. Loop invariants are the weakened forms of the postconditions for loops. Therefore, we propose PBLInv, a postcondition-based approach to generate loop invariants for C programs with the machine learning method. First, we generate the postcondition for a loop program automatically. Second, we learn classifiers as the updated candidate loop invariants with the Kernel Support Vector Machine (KSVM) method iteratively. PBLInv is evaluated with 60 benchmark programs collected from the recent papers and the 2019 Software Verification Competitions (SV-Comp 2019). The experimental results show that PBLInv is efficient at learning loop invariants for C programs. Compared with five state-of-the-art methods of generating loop invariants, PBLInv not only generates loop invariants for more benchmarks, but also reduces the number of used samples and iterations for learning loop invariants.
基于后置条件的C程序循环不变量学习
在软件分析与验证领域,自动生成程序的循环不变量是一个具有挑战性的问题。循环不变量是循环后置条件的弱化形式。因此,我们提出了PBLInv,这是一种基于后置条件的方法,可以使用机器学习方法为C程序生成循环不变量。首先,自动生成循环程序的后置条件。其次,我们使用核支持向量机(KSVM)方法迭代学习分类器作为更新的候选循环不变量。PBLInv使用从最近的论文和2019年软件验证竞赛(SV-Comp 2019)中收集的60个基准程序进行评估。实验结果表明,PBLInv能够有效地学习C程序的循环不变量。与五种最先进的生成循环不变量的方法相比,PBLInv不仅可以为更多的基准测试生成循环不变量,而且可以减少使用样本的数量和学习循环不变量的迭代次数。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信