DOI QR코드

DOI QR Code

Formal Semantics Based on Action Equation 2.0 for Python

작용식 2.0 기반 파이썬에 대한 형식 의미론

  • Received : 2020.12.15
  • Accepted : 2021.01.06
  • Published : 2021.06.30

Abstract

To specify a formal semantics for a programming language is to do a significant part for design, standardization and translation of it. The Python is popular and powerful, it is necessary to do research for a formal semantics to specify a static and dynamic semantics for Python clearly in order to design a similar language and do an efficient translation. This paper presents the Action Equation 2.0 that specifies a formal semantics for Python to change and update Action Equation. To measure the execution time for Python programs, we implemented the semantic structure specified in Action Equation 2.0 in Java, and prove through simulation that Action Equation 2.0 is a real semantic structure that can be implemented. The specified Action Equation 2.0 is compared to other descriptions, in terms of readability, modularity, extensibility, and flexibility and then we verified that Action Equation 2.0 is superior to other formal semantics.

프로그래밍 언어의 형식적인 의미를 적절하게 표현하면 언어를 표준화하고 최적화하여 번역하는 과정에서 중요한 역할을 수행한다. 파이썬은 주목받는 강력한 언어이고, 파이썬에 대한 형식적인 의미 구조를 정의하고 표현하는 것은 향후 유사한 언어를 설계할 때 참고할 수 있고 표준화하는 과정이나 최적화된 번역기를 구현하는 과정에서도 필요하다. 본 연구에서는 파이썬에 대한 의미 구조를 표현하기 위해 기존의 작용식을 수정하고 업그레이드해서 파이썬의 정적이고 동적인 의미 구조를 표현하는 작용식 2.0을 새롭게 제시한다. 작용식 2.0에 명세된 의미구조를 자바로 구현해 파이썬 프로그램들에 대한 실행시간을 측정하고 시뮬레이션을 통해 작용식 2.0이 구현 가능한 실제적인 의미 구조임을 입증하고, 판독성(Readability), 모듈성(Modularity), 확장성(Extensibility), 융통성(Flexibility)의 네 영역에서 명세된 작용식 2.0을 기존의 대표적인 의미 표현법과 비교하여 본 작용식 2.0의 우월성을 확인하고자 한다.

Keywords

Acknowledgement

이 연구는 2020년도 협성대학교 교내연구비 지원에 의한 연구임(20200041).

References

  1. Jung Lan Han, "Formal Semantics for Processing Exceptions," KIPS Transactions on Computer and Communication Systems, Vol.17, No.4, pp.173-180, Apr. 2010.
  2. Jung Lan Han, "Specification of Semantics for Object Oriented Programming Language," KSII Transactions on Internet and Information Systems, Vol.8, No.5, pp.35-43, 2007.
  3. Jung Lan Han and Sung Choi, "Building of Integrated Increment Interpretation System Based on Action Equations," KIPS Transactions on Computer and Communication Systems, Vol.11, No.3, pp.149-156, Mar. 2004.
  4. Jung Lan Han, "Incremental Interpretation Based on Action Equations," Ph. D Thesis Ewha Womans University, 1999.
  5. Gideon Joachim Smeding, "An executable operational semantics for Python," Master's thesis, Utrecht University, 2009.
  6. Dwight Guth, "A Formal Semantics of Python 3.3," Master's thesis, University of Illinois, 2013.
  7. Suhwan Ji, Hyeonseung Im, "Implementing Structural Operational Semantics in Python," Jorunal of Korean Institute of Information Scientists and Engineers, Vol.45, No.11, 2018.
  8. Yingzhou Zhang and Baowen Xu, "A Survey of Semantic Description Frameworks for Programming Languages," ACM SIGPLAN Notices, Vol.39, No.3, pp.14-30, Mar. 2004. https://doi.org/10.1145/981009.981013
  9. J. Alves-Foss, editor. Formal Syntax and Semantics of Java, Vol 1523 of Lecture Notes in Computer Science. Springer-Verlag.
  10. David A. Watt and Deryck F. Brown, "Formalising the Dynamic Semantics of Java," 2006.