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

基于模拟关系的编译优化实现正确性验证方法
引用本文:徐超,何炎祥,吴伟,陈勇,刘健博. 基于模拟关系的编译优化实现正确性验证方法[J]. 电子学报, 2012, 40(11): 2171-2176. DOI: 10.3969/j.issn.0372-2112.2012.11.005
作者姓名:徐超  何炎祥  吴伟  陈勇  刘健博
作者单位:1. 武汉大学计算机学院,湖北武汉 430072;2. 徐州工业职业技术学院,江苏徐州 221000;3. 软件工程国家重点实验室,湖北武汉 430072
基金项目:国家自然科学基金重点项目,国家自然科学基金面上项目
摘    要:编译器中通常采用各种优化方法来提高目标代码的质量,为了实现较好的效果,一些编译优化算法通常十分复杂,很容易给可靠性和安全性带来隐患.现有的编译器缺陷大部分是由优化阶段引起的.传统的编译优化正确性研究大部分只关注优化算法的正确性,但是只有该算法被正确的实现了才能确保实际运行的优化过程是正确的.本文提出一种基于模拟关系的方法来验证编译优化实现的正确性.在每次优化结束后,我们通过建立优化前代码和优化后代码之间的模拟关系生成优化正确应满足的逻辑条件,然后验证逻辑条件是否成立从而判定编译优化的实现是否正确性.以优化编译中的常量折叠优化和变量替换的验证作为示例显示了本方法的有效性和可靠性.

关 键 词:编译优化  正确性  模拟关系  定理证明  
收稿时间:2012-03-15

Verifying Implementation Correctness of Compiling Optimization Based on Simulation Relation
XU Chao , HE Yan-xiang , WU Wei , CHEN Yong , LIU Jian-bo. Verifying Implementation Correctness of Compiling Optimization Based on Simulation Relation[J]. Acta Electronica Sinica, 2012, 40(11): 2171-2176. DOI: 10.3969/j.issn.0372-2112.2012.11.005
Authors:XU Chao    HE Yan-xiang    WU Wei    CHEN Yong    LIU Jian-bo
Affiliation:1. Wuhan University Computer of School,Wuhan,Hubei 430072,China;2. Xuzhou College of Industrial Technology,Xuzhou,Jiangsu 221000,China;3. State Key Laboratory of Software Engineering,Wuhan,Hubei 430072,China
Abstract:Many optimization methods are used to raise the quality of target code in the process of compiling.Because some optimization methods for compiling are too complicated,hidden dangers won't be avoided for reliability and security of compiling.The existing defects of compiler are usually caused at the optimization phase.Mostly traditional correctness of compiling optimization only focus on correctness of optimization algorithm,but only when the algorithm is implemented correctly,the optimization process run in practice can be proved to be correct.This paper proposes a method based on simulation relation to verify correctness of compiling optimization realization.We build up simulation relation between code before optimization and code after optimization to generate logic condition that the correctness optimization should satisfy,and then we verify it if logic condition is satisfied or not to judge if compiling optimization realization is correct or not after each optimization is finished.The method is proved to be effective and reliable by verifying statement exchange and variable substitution in the process of optimization compiling.
Keywords:compiling optimization  correctness  simulation relation  theorem proving
本文献已被 万方数据 等数据库收录!
点击此处可从《电子学报》浏览原始摘要信息
点击此处可从《电子学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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