Verification of Machine Codes using an Effect Type System

효과 타입 시스템을 이용한 기계어 코드의 검증

  • 정재윤 (한국과학기술원 전자전산학과) ;
  • 류석영 (한국과학기술원 전자전산학과) ;
  • 이광근 (한국과학기술원 전자전산학과)
  • Published : 2000.08.15

Abstract

Verification of the safety of untrusted codes becomes an important issue in the mobile computing environment and the safety-critical software systems. Recently, it is very common to run the codes attached to the electronic mails or downloaded from the web browsers. We propose the verification method of the machine code property. The code producer delivers the machine code and its property, then the code consumer checks whether the delivered code satisfies the delivered property. The safety of source codes is verified by the well-defined compiler systems but the verification mechanism for machine codes is not well defined yet. We design an intermediate language etySECK and propose the verification method of the property of etySECK programs. And then we prove the soundness of our system which is the type system with effect extension.

네트웍을 이용한 분산 컴퓨팅 환경이나 소프트웨어의 안전성이 중요한 시스템 등에서, 외부로 부터 전달되는 코드의 안전성을 검증하는 일이 점점 더 중요한 문제가 되고 있다. 전자메일에 첨부되어 온 코드나 웹브라우저를 통해 외부로부터 전달된 코드를 수행하는 일이 일상생활에서 자주 발생하고 있다. 본 논문에서는 기계어 코드의 성질을 검증하는 방법을 제안한다. 코드제공자가 기계어를 만듦과 동시에 그 기계어 코드의 성질을 만들어내어 전달하면, 코드사용자는 전달받은 코드와 그 성질이 부합하는지를 검사하는 것이다. 소스언어의 안전성은 잘 정의된 컴파일러 시스템이 검증해 주지만, 중간언어나 기계어 코드의 성질을 검증하는 잘 정의된 방법은 아직 개발되어있지 않다. 중간언어로 etySECK을 설계하고 이 언어로 작성된 프로그램의 성질을 검증하는 방법을 제안한다. 그리고 타입과 효과분석방식을 사용하여 설계된 시스템의 안전성을 증명한다.

Keywords

References

  1. James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, 1996
  2. G. Morrisett, D. Walker, K. Cray, and N. Glew. From system F to typed assembly language (extended version). Technical report, Cornell University, Nov. 1997
  3. G. Necula. Proof-carrying code. In Twenty-Fourth ACM Symposium on Principles of Programming Languages, 1997
  4. Xavier Leroy. An overview of Types in Compilation. In Lecture Notes in ComputerScience, volume 1473, pages 1-8. Springer-Verlag, mar 1998
  5. Dexter Kozen. Language-based security. Technical report, Cornell University, 1999
  6. Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1996
  7. Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification, Second Edition. Addison-Wesley, 1999
  8. Stephen N. Freund and John C. Mitchell. A Type System for Object Initialization In the Java Bytecode Language. In ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications, pages 310-327, Oct. 1998
  9. Greg Morrisett, Karl Crary, Neal Glew, Dan Grossman, Richard Samuels, Frederick Smith, David Walker, Stephanie Weirich, and Steve Zdancewic. TALx86: A realistic typed assembly language. In 1999 ACM SIGPLAN Workshop on Compiler Support for System Software, pages 25-35, 1999
  10. Greg Morrisett, Karl Crary, Neal Glew, and David Walker. Stack-based typed assembly language. In Lecture Notes in Computer Science. Springer-Verlag, 1998
  11. Hongwei Xi and Robert Harper. A Dependently Typed Assembly Language. Unpublished, 5 1999
  12. Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348-375, 1978 https://doi.org/10.1016/0022-0000(78)90014-4
  13. John M. Lucassen and David K. Gifford. Polymorphic effect systems. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 47-57, 1988 https://doi.org/10.1145/73560.73564
  14. Luis Damas and Robin Milner. Principal typescheme for functional programs. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1982
  15. Mads Tofte. Operational Semantics and Polymorphic Type Inference. (tech report ecs-lfcs-88-54), University of Edinburgh, May 1988
  16. Xavier Leroy. Polymorphic Typing of an Algorithmic Language. PhD thesis, University Paris VII, October 1992
  17. Oukseh Lee and Kwangkeun Yi. Proofs about a Folklore Let-polymorphic Type Inference Algorithm. ACM Transactions on Programming Languages and Systems, 20(4):707-723, 1998 https://doi.org/10.1145/291891.291892
  18. Pierre Jouvelot and David K. Gifford. Reasoning about continuations with control effects. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation, 1989 https://doi.org/10.1145/73141.74837
  19. Francois Pessaux and Xavier Leroy. Type-based analysis of uncaught exceptions. In ACM Symposium on Principles of Programming Languages, pages 276-290, January 1999 https://doi.org/10.1145/292540.292565
  20. Pierre Jouvelot and David K. Gifford. Algebraic reconstruction of types and effects. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 303-310, 1991 https://doi.org/10.1145/99583.99623
  21. Jean-Piere Talpin and Pierre Jouvelot. Polymorphic type, region and effect inference. Journal of Functional Programming, 2(3): 245-271, July 1992
  22. Mads Tofte and Jean-Pierre Talpin. Implementation of the typed call-by-value ${\lambda}$ - calculus using a stack of regions. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 188-201, January 1994 https://doi.org/10.1145/174675.177855
  23. Mads Tofte and Jean-Pierre Talpin. Regionbased memory management. Information and Computation, 132(2):109-176, 1997 https://doi.org/10.1006/inco.1996.2613
  24. Jean-Piere Talpin and Pierre Jouvelot. Compiling FX on the CM-2. In Lecture Notes in Computer Science, volume 724, pages 87-98. Springer-Verlag, proceedings of the 3rd workshop on semantics analysis edition, September 1993
  25. P. J. Landin. The mechanical evaluation of expressions. The Computer Journal, 6(4):308-320, January 1964
  26. P. J. Landin. A correspondence between ALGOL 60 and Church's lambda-notation: Part I. Communications of the ACM, 8(2):89-101, February 1965 https://doi.org/10.1145/363744.363749
  27. P. J. Landin. A correspondence between ALGOL 60 and Church's lambda-notation: Part II. Communications of the ACM, 8(3):158-165, March 1965 https://doi.org/10.1145/363791.363804
  28. Gordon D. Plotkin. Call-by-name, call-by-value and the ${\lambda}$ -calculus. Theoretical Computer Sicence, 1:125-159, 1975 https://doi.org/10.1016/0304-3975(75)90017-1
  29. Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Technical Report TR91-160, 1992