작용 식 기반 점진 해석기

Incremental Interpreter based on Action Equations

  • 한정란 (협성대학교 경영정보학과) ;
  • 이기호 (이화여자대학교 컴퓨터학과)
  • 발행 : 1999.08.01

초록

속성 문법은 언어의 정적인 의미구조를 표현하는 형식적인 표기법으로 동적인 의미구조를 표현하기는 부적절하다. 동적 의미구조를 잘 명세하고 명세된 언어를 구현하기 위해서 기존의 속성 문법을 확장하여 언어 구현에 필요한 동적인 작용들(actions)을 잘 표현해야 한다. 본 논문에서는 속성 문법을 확장하여 정적이고 동적인 의미구조를 잘 표현할 수 있는 새로운 작용 식(action equation)을 제시한다. 제시된 작용 식(action equation)의 동적인 의미 구조로 부터 SIMP 언어의 점진 해석기(incremental interpreter)를 설계하고 구현한다. 점진 해석기는 언어 기반의 프로그래밍 환경에서 수정된 부분만을 번역하여 프로그램의 전체 실행 결과를 얻는 해석기를 의미한다. 본 해석기는 SUN 1000에서 Lex와 Yacc을 사용해서 C 언어로 설계하고 구현하였다. 예제 프로그램을 실행시켰을 때 배정 문이나 IF문의 경우는 매우 효율적이었고 Loop의 경우는 재실행될 필요가 있는 영향받는 명령문들이 적을수록 점진 해석이 더 효율적으로 수행된다.Abstract Attribute grammars are a formal notation which expresses the static semantics of programming languages, but they are not suitable for expressing dynamic semantics. To describe dynamic semantics and implement a specified language, we extend attribute grammars and present new action equations which describe static and dynamic semantics. The incremental interpreter of a SIMP language is designed and implemented from the dynamic semantics of presented action equations. The incremental interpreter is to translate only modified part in the language-based programming environments and have results of whole program.Our interpreter is implemented in C with Lex and Yacc on SUN 1000. When we execute example programs, the incremental evaluation of any assignment and IF statements executes efficiently. But in the case of loop, we execute efficiently when the effected statements to be reexecuted in the loop are of small number.

키워드

참고문헌

  1. Carnegie-mellon Computer Science Department Research Report CS-81-145 ALOE user's and implementers' guide Raul Medina Rora;David S. Notkim
  2. Computer Science Research Review The Gandalf Research project A. N. Habermann
  3. IEEE Transactions on Software Engineering v.17 no.7 Incremental Scanning and Parsing With Galaxy John F. Beetem;Anne F. Beetem
  4. Communication ACM v.24 no.9 The Cornell Program Synthesizes: A Syntax-directed Environment T. Teitelbaum;T. Reps
  5. An Introduction to Editor Allen Poe Charles N. F.;Greg J.;Jon M.
  6. ACM SIGPLAN Notices Alphonse : Incremental Computation as a Programmer Abstraction Roger Hoover
  7. Proceeding Infoscience '93 An Efficient Incremental Evaluation and Application of Circular Attribute Grammar Junglan Han;Kiho Lee
  8. ACM Trans. on Prog. and Sys. v.11 no.2 Incremental Dynamic Semantic for Language-Based Programming Environments Gail E. Kaiser
  9. ACM SIGPLAN Notices Incremental Compilation in Magpie Mayer D. Schwartz;Norman M. Delisle;Vimal S. Begwani
  10. ACM SIGPLAN Notices An approach to Incremental Compilation Steven P. Reiss
  11. Specification of Programming Language Frank G. Pagan
  12. Compilers Principles, Techniques, and Tools Alfred V. Aho;Ravi Sethi;Jeffrey D. Ullman