- 모나드를 이용한 어셈블리 언어 인터프리터 개발
- ㆍ 저자명
- 변석우,Byun. Sug-Woo
- ㆍ 간행물명
- 정보과학회논문지. Journal of KIISE. 소프트웨어 및 응용
- ㆍ 권/호정보
- 2010년|37권 5호|pp.403-410 (8 pages)
- ㆍ 발행정보
- 한국정보과학회
- ㆍ 파일정보
- 정기간행물| PDF텍스트
- ㆍ 주제분야
- 기타
하스켈의 모나드는 순수 함수형 프로그래밍뿐만 아니라 명령형 형태의 프로그래밍도 가능케 하고 있다. 본 연구에서는 순수 함수형 프로그래밍 방식으로 코딩된 어셈블리 언어 인터프리터 구현을 모나드 방식으로 재 구성함으로써 모나드 추상화와 프로그래밍 기법의 특성을 부각시킨다. 모나드 프로그래밍은 스택과 심볼 테이블에 상태 모나드를 적용하는 것과, 이 모나드들을 상태 모나드 트랜스포머를 이용하여 통합 구성하는 두 단계로 이루어진다. 결과적으로, 모나드 프로그래밍에 의한 코드는 순수 함수형 스타일의 코드보다 훨씬 더 간결하고 직관적임을 볼 수 있다.
Monad in Haskell allows one to do imperative-style programming as well as pure functional programming. In this work, we characterize monadic abstraction and its programming technique by restructuring an assembly language interpreter coded in pure functional style into the one by the monadic style. Monad programming consists of two phases; the State monad is applied to a stack and a symbol table, and then a State Monad Transformer integrating these two monads is constructed. As a result, we can see that the program code by monad programming is much clearer and more intuitive than one written in the pure functional style.