首页 | 本学科首页   官方微博 | 高级检索  
     

常用循环摘要的自动生成方法及其应用
引用本文:翟娟,汤震浩,李彬,赵建华,李宣东.常用循环摘要的自动生成方法及其应用[J].软件学报,2017,28(5):1051-1069.
作者姓名:翟娟  汤震浩  李彬  赵建华  李宣东
作者单位:计算机软件新技术国家重点实验室(南京大学), 江苏 南京 210023;南京大学 软件学院, 江苏 南京 210023,计算机软件新技术国家重点实验室(南京大学), 江苏 南京 210023;南京大学 计算机科学与技术系, 江苏 南京 210023,计算机软件新技术国家重点实验室(南京大学), 江苏 南京 210023;南京大学 计算机科学与技术系, 江苏 南京 210023,计算机软件新技术国家重点实验室(南京大学), 江苏 南京 210023;南京大学 计算机科学与技术系, 江苏 南京 210023,计算机软件新技术国家重点实验室(南京大学), 江苏 南京 210023;南京大学 计算机科学与技术系, 江苏 南京 210023
基金项目:国家自然科学基金(61632015,61561146394);国家重点研发计划项目课题(2016YFB1000802)
摘    要:采用形式化方法证明软件的正确性是保障软件可靠性的有效方法,而对循环语句的分析与验证是形式化证明中的关键,对循环语句的处理一直是程序分析与验证中的一个难点问题.本文提出使用循环语句修改的内存和这些内存中存放的新值来描述循环语句的执行效果,并将该执行效果定义为循环摘要.同时,本文提出了一种自动生成循环摘要的方法,可以为操作常用数据结构的循环自动生成循环摘要,包含嵌套循环.此外,基于循环摘要,我们可以自动生成循环语句的规约,包括循环不变式、循环的前置条件以及循环的后置条件.我们已经实现了自动生成循环摘要以及循环规约的方法,并将它们集成到验证工具Accumulator中,实验表明,我们的方法可以有效地生成循环摘要,并生成多种类型的规约,从而辅助软件程序的形式化证明,提高验证的自动化程度和效率,减轻验证人员的负担.

关 键 词:循环摘要  循环不变式  前置条件  后置条件  程序验证
收稿时间:2016/7/15 0:00:00
修稿时间:2016/9/25 0:00:00

Automatic Approach of Generating Summaries for Common Loops and Its Application
ZHAI Juan,TANG Zhen-Hao,LI Bin,ZHAO Jian-Hua and LI Xuan-Dong.Automatic Approach of Generating Summaries for Common Loops and Its Application[J].Journal of Software,2017,28(5):1051-1069.
Authors:ZHAI Juan  TANG Zhen-Hao  LI Bin  ZHAO Jian-Hua and LI Xuan-Dong
Affiliation:State Key Laboratory for Novel Software Technology(Nanjing University), Nanjing 210023, China;Software Institute, Nanjing University, Nanjing 210023, China,State Key Laboratory for Novel Software Technology(Nanjing University), Nanjing 210023, China;Department of Computer Science and Technology, Nanjing University, Nanjing 210023, China,State Key Laboratory for Novel Software Technology(Nanjing University), Nanjing 210023, China;Department of Computer Science and Technology, Nanjing University, Nanjing 210023, China,State Key Laboratory for Novel Software Technology(Nanjing University), Nanjing 210023, China;Department of Computer Science and Technology, Nanjing University, Nanjing 210023, China and State Key Laboratory for Novel Software Technology(Nanjing University), Nanjing 210023, China;Department of Computer Science and Technology, Nanjing University, Nanjing 210023, China
Abstract:Formal verification is an effective method to guarantee software reliability by proving the correctness of a program.Analyzing and verifying loops which are important and frequently-used statements is not only vital for formal verification, but also a hot topic in the research area of software development.This paper proposes using memories modified by a loop and new values stored in these memories after executing the loop to describe the execution effect of the loop.Such execution effect is defined as loop summary.Also this paper proposes an approach to automatically synthesize loop summaries for loops manipulating commonly-used data structures, including nested loops.Based on loop summaries, specifications can be generated automatically, including loop invariants, preconditions and post-conditions of loops.We have implemented the proposed approach and integrated it into the code-verification tool Accumulator.We have evaluated the approach with a variety of programs, and the results show that our approach is able to generate loop summaries and different kinds of specifications, which eases the verification task by reducing the burden for programmers and improves the automatic level and efficiency.
Keywords:loop summary  loop invariant  precondition  post-condition  program verification
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号