期刊文献+

一种用于类C语言环境的安全的类型化内存模型 被引量:3

A Kind of Safe Typed Memory Model for C-Like Languages
下载PDF
导出
摘要 使用形式化方法对程序进行验证是保证软件可信的重要手段.对于像C语言这样的较低级的命令式语言可以直接对内存进行操作,对其操作语义或公理语义的形式化需要基于合适的内存模型.传统的字节内存模型可以很好地描述各种内存操作,但是无法保证安全性,同时使程序验证变得异常复杂.面向对象语言的内存模型则具有较高的抽象性,便于程序验证,但不适合描述低级的内存操作.结合字节内存模型和面向对象语言内存模型,提出一种安全的类型化的内存模型,既可用于对语义的形式化,也可用于基于霍尔逻辑的程序验证.此内存模型既允许指针算术、结构赋值、类型转换等内存操作,同时也可以有效减少因指针别名给程序验证带来的复杂度.基于Coq辅助定理证明工具,对内存模型进行了形式化实现和验证. Verifying program by formal method is an important way to ensure software trusted. For low level imperative language like C language which can operate memory directly, a suitable memory model is needed to formalize the operational semantics or axiomatic semantics. The traditional byte memory model can describe various memory operations very well, however, it can't guarantee safety and make program-verifying complex. The memory model of object oriented language is high-level. It is suitable for program verification but not for describing low level memory operation. A safe typed memory model is proposed by combining the previous two kind models. It can be used to formalize semantics and to verify program based on Hoare logic. This memory model allows pointer arithmetic, structure assignment, type cast and other memory operations, and makes pointer-based programs verification easier. The memory model is formalized and verified using Coq proof assistant.
出处 《计算机研究与发展》 EI CSCD 北大核心 2012年第11期2440-2449,共10页 Journal of Computer Research and Development
基金 国家自然科学基金项目(90818018 91018009)
关键词 操作语义 形式化验证 内存模型 霍尔逻辑 内存安全 operational semantics formal verification memory model Hoare logic memory safety
  • 相关文献

参考文献31

  • 1Winskel G. The Formal Semantics of Programming Languages [M]. London: The MIT Press, 1993:10-50.
  • 2Tennent R D, Ghica D R. Abstract models of storage [J]. Higher-Order and Symbolic Computation, 2000, 13 ( 1 ) : 119-129.
  • 3Bertot Y, Casteran P. Interactive Theorem Proving and Program Development [M]. New York: Springer, 2004: 10- 120.
  • 4Kernighan B W, Ritchie D M. The C Programming Language[M]. New York: Prentice Hall, 1989:1-300.
  • 5Hoare C A R. An axiomatic loasis for computer programming [J]. Communications of the ACM, 1969, 12(10): 576 -580.
  • 6Burstall R M. Some techniques for proving correctness of programs which alter data structures [J]. Machine Intelligence, 1972, 7(1): 23-50.
  • 7Luckham D C, Suzuki N. Verification of array, record, and pointer operations in Pascal [J]. ACM Trans on Programming Languages and Systems, 1979, 1(19) : 226-244.
  • 8Kowaltowski T. Data structures and correctness of programs [J]. Journal of theACM, 1979, 2(1): 283-301.
  • 9Morris J M. A general axiom of assignment and linked data structure [J]. Theoretical Foundations of Programming Methodology, 1982, 91(1): 25-34.
  • 10Bii[sma A. Calculating with pointers [J]. Science of Computer Programming, 1989, 12(1): 191-205.

二级参考文献25

  • 1Sankaranarayanan S, Sipma H B, Manna Z Non-linear loop invariant generation using gr?bner bases[C] //Proceedings ofACM SIGPLAN Principles of Program-ming Languages(POPL'04), 2004:318-329.
  • 2Kovacs L I, Jebelean T. Finding polynomial invariants for imperative loops in the theorema system[C] //Proceedings of Verify'06, FLoC'06, 2006:52-67.
  • 3Magill S, Nanevski A, Clarke E, et al. Inferring invariants in separation logic for imperative list-processing programs [C]. Proceedings of Workshop on Semantics, Program Analysis, and Computing Environments for Memory Management (SPACE'06), January 2006.
  • 4Zhang-Y, Li Z P, Chen Y Y, et al. Shape graphlogie and shape system(extended versio-n)[EB/OL]. http://ssg.ustcsz.edu.cn/content/shape-graph-logic.Nov. 2010.
  • 5张志天 陈意云 刘刚.一个验证指针程序的方法[J].电子技术杂志,.
  • 6King J C.Symbolic Execution and Program Testing[J].Communications of the ACM,1976,19(7):385-394.
  • 7Shannon D,Hajra S,Lee A,et al.Abstracting Symbolic Execution with String Analysis[C]∥Proc of the Testing:Academic and Industrial Conference Practice and Research Techniques,2007:13-22.
  • 8Xie T,Marinov D,Schulte W,et al.Symstra:A Framework for Generating Object-Oriented Unit Tests Using Symbolic Execution[C]∥Proc of the TACAS’05,2005:365-381.
  • 9Saswat A,Patrice G,Nikolai T.Demand-Driven Compositional Symbolic Execution[C]∥Proc of the 14th Int’l Conf on Tools and Algorithms for the Construction and Analysis of Systems,2008:367-381.
  • 10Zhang J.Symbolic Execution of Program Paths Involving Pointer and Structure Variables[C]∥Proc of the Fourth Int’l Conf on Quality Software,2004:87-92.

共引文献4

同被引文献50

  • 1Ehringer D. The Dalvik virtual machine architecture. Technical Report, 2010. http://davidehringer.com/software/android/The_ Dalvik_Virtual_Machine.pdf.
  • 2Davis B, Beatty A, Casey K, Gregg D, Waldron J. The case for virtual register machines. In: Prec. of the 2003 Workshop on Interpreters, Virtual Machines and Emulators (IVME 2003). ACM Press, 2003.41-49. [doi: 10.1145/858570.858575].
  • 3Security Engineering Research Group. Analysis of Dalvik virtual machine and class path library. Technical Report, Pakistan: Institute of Management Sciences Peshawar, 2009.
  • 4He YX, Wu W. Theory and key technology of trusted compiler. Beijing: Science Press, 2013. 15-58 (in Chinese).
  • 5Sebesta RW. Concepts of Programming Languages. 10th ed., Boston: Addison-Wesley Educational Publishers, Inc., 2012.
  • 6Slonneger K, Kurtz BL. Formal Syntax and Semantics of Programming Languages. Boston: Addison Wesley Longman, 1995.
  • 7He YX, Wu W, Liu T, Li QA, Chen Y, Hu MH, Liu JB, Shi Q. Theory and key implementation techniques of trusted compiler: A survey. Journal of Frontiers of Computer Science and Technology, 2011,5(1):1-22 (in Chinese with English abstract). [doi: 10.3778/j.issn.1673-9418.2011.01.001 ].
  • 8Xu C, He YX, Wu W, Chen Y, Liu JB. Verifying implementation correctness of compiling optimization based on simulation relation. Chinese Journal of Electronics, 2012,40(11): 2171-2176 (in Chinese with English abstract). [doi: 10.3969/j.issn.0372- 2112.2012.11.005].
  • 9Nipkow T, Klein G. Concrete semantics--A proof assistant approach. Technical Report. http://www21.in.tum.de/-nipkow/ Concrete-Semantics.
  • 10Nipkow T, Paulson CL, Wenzel M. A Proof Assistant for Higher-Order Logic. Berlin, Heidelberg: Springer-Verlag, 2010.

引证文献3

二级引证文献19

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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