期刊文献+

一种基于栈区内存模型的C程序别名判断算法 被引量:1

Alias Analysis Algorithm for C Programs Based on a Stack Memory Model
下载PDF
导出
摘要 C语言中的指针导致C程序中会出现表达式别名的情况.在基于演绎推理的程序验证中,使用Hoare逻辑的赋值规则前必须消除断言中的别名.别名增加了程序验证的难度.本文根据C语言的语义提出了一种栈区内存模型,可以精确地跟踪栈区的多种类型的表达式,包括取地址、多级解引用、指针关系运算、结构体和数组等.基于上述内存模型,本文提出了一种判断别名的算法,使得验证工具在使用Hoare逻辑的赋值公理之前可以准确的消除断言中的别名.目前该模型已经在一个名为Safe-C验证器的程序验证工具中实现,并且成功验证了多例经典程序. Pointers in the C language causes potential aliasing among expressions in a C program. In program verification based on deductive reasoning,the aliases in the assertions must be eliminated before applying the Hoare logic assignment rule. Aliasing increases the difficulty of verifying C programs. Based on C semantics,this paper proposes a memory model that can accurately trace various kind of C expressions in the stack area,including address-taking,multi-level de-reference,pointer relation operation,structure and array,etc. According to this model,this paper proposes an algorithm to identify aliases,which enables the verification tool to accurately eliminate the aliases in the assertions before using the Hoare logic assignment axiom. We have implemented the proposed model in a program verification tool named Safe-C Verifier,which has successfully verified many classic C programs.
作者 常欢 罗奇鸣 李薛剑 陈意云 CHANG Huan;LUO Qi-ming;LI Xue-jian;CHEN Yi-yun(Department of Computer Science and Technology,University of Science and Technology of China,Hefei 230026,China;USTC-USTC Sinovate Software Co.Ltd Engineering Center of High Confidence Software,Institute of Advanced Technology,University of Science and Technology of China,Heifei 231283,China)
出处 《小型微型计算机系统》 CSCD 北大核心 2019年第2期353-358,共6页 Journal of Chinese Computer Systems
基金 国家自然科学基金项目(61170018 61229201)资助
关键词 程序验证 HOARE逻辑 内存模型 别名 栈区 program verification Hoare logic memory model aliasing stack segment
  • 相关文献

参考文献3

二级参考文献60

  • 1Hoare C A R. An axiomatic basis for computer programming [J]. Communications of the ACM, 1969, 12(10):576-585.
  • 2Paulson L C. Isabelle~ A Generic Theorem Prover [M]. Berlin: Springer, 1994:1-300.
  • 3The Coq Development Team. The Coq proof assistant reference manual, Version 8.2 lOLl. [2009-08-01]. http: //coq. inria, fr.
  • 4Aleksandar N, Morrisett G, Sbinnar A, et al. Ynot: Dependent types for imperative programs [C] //Proe of the 13th ACM SIGPLAN Int Conf on Functional Programming (ICFP'08). New York: ACM, 2008:229-240.
  • 5Barnett M, Rustan M, Leino M, et al. The spec programming system, An overview [G] //LNCS 3362: Proc of Int Workshop Construction and Analysis of Safe, Secure, and Interoperable Smart Devices (CASSIS 2004). Berlin: Springer, 2004: 49-69.
  • 6Flanagan C, Leino K R M, Lillibridge M, et al. Extended static checking for Java [C] //Proc of the Conf on Programming Language Design and Implementation (PLDI'02). New York. ACM, 2002: 234-245.
  • 7Berdine J, Calcagno C, O'Hearn P W. Smallfoot: Modular automatic assertion checking with separation logic [G] // LNCS 4111~ Proc of Formal Methods for Components and Objects(FMCO 2005). Berlin: Springer, 2005:115-137.
  • 8Distefano D, Parkinson M J. jStar: Towards practical verification for Java [C] //Proc of ACM SIGPLAN Int Conf on Object-Oriented Programming, Systems, Languages, and Applications(OOPSLA 2008). New York: ACM, 2008: 213-226.
  • 9Carter G, Monahan R, Morris J M. Software refinement with perfect developer [C] //Proc of the 3rd IEEE Int Conf on Software Engineering and Formal Methods(SEFM 2005). Piscataway, NJ: IEEE, 2005:363-372.
  • 10Reynolds J C. Separation logic: A logic for shared mutable data structures [C] //Proc of the 17th Annual IEEE Symp on Logic in Computer Science (LICS 2002). Piscataway, NJ: IEEE, 2002:55-74.

共引文献11

同被引文献4

引证文献1

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部