DOI QR코드

DOI QR Code

임베디드 시스템을 위한 실시간 함수형 반응적 프로그램 변환기

Real-Time Functional Reactive Program Translator for Embedded Systems

  • 이동주 (부산대학교 컴퓨터공학과) ;
  • 우균 (부산대학교 정보컴퓨터공학부)
  • 발행 : 2006.12.31

초록

함수형 반응적 프로그래밍(FRP: Functional Reactive Programming)은 하스켈(Haskell)에 내장된 언어로서 두 핵심 고차 타입인 행위(Behavior)와 이벤트(Event)를 기반으로 반응적 시스템을 선언적으로 프로그래밍 한다. 이 논문은 다양한 제약사항을 가진 임비디드 시스템에 FRP를 이용하기 위해 실시간 함수형 반응적 프로그래밍(RT-FRP: Real-time Functional Reactive Programming) 변환기를 설계하고 구현한다. RT-FRP 변환기는 RT-FRP 언어의 기능적 의미론을 기반으로 RT-FRP 프로그램에서 C 프로그램을 생성한다. RT-FRP 변환기의 효과적인 변환을 입증하기 위해, 변환기에서 생성된 테스트 프로그램을 실제 임베디드 시스템, 레고 마인드스톰(LEGO Mindstorm)에 탑재하고 수행하였다. 실험 결과, RT-FRP를 이용할 경우 목적파일의 크기가 조금 증가하였으나 명령형 언어를 이용한 프로그램 보다 간결하게 반응적 시스템 소프트웨어를 프로그래밍 할 수 있었다.

FRP(Functional Reactive Programming) is a kind of embedded language in Haskell, it declaratively program reactive system based on two essential high-order types named behavior and events. This Paper design and implementation RT-FRP(Real-time Functional Reactive Programming) translator for using FRP in embedded systems with many constraints. The RT-FRP translator generates a C Program from an RT-FRP program according to the operational semantics of the RT-FRP language. To show the effectiveness of the RT-FRP translator, we loaded and executed the test program generated by the translator onto a real embedded system, LEGO Mindstorm. According to the experimental result, the reactive system software can be programmed more concisely using RT-FRP than using an imperative counter part although the size of the binary code is rather increased.

키워드

참고문헌

  1. Thierry Gautier, Paul Le Guernic, and Loic Besnard. Signal: A declarative language for synchronous programming of real-time system. In Gilles Kahn, editor, Functional programming Languages and Computer Architecture, volume 274 of Lect Notes in Computer Science, edited by G. Goos and J. Hartmanis, pp.257-277, Springer-Verlag, 1987
  2. P.Caspi, D. Pilaud N. Halbwachs, J. A. Plaice, LUSTRE: a declarative language for real-time programming, proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, p.178-188, Jan.1987 https://doi.org/10.1145/41625.41641
  3. Gerard Berry. The Esterel v5 Language Primer Version 5.21 release 2.0. Centere de Mathematiques Appliquees, Ecole des Mines and INRIA, 2004 Route des Lucioles, 06565 Sophia-Antipolis, Apr. 1999
  4. 강인혜, 양진석, '초보자를 위한 Esterel 프로그래밍' 홍릉과학출판사, pp3-101, 2005
  5. Z. Wan and P. Hudak, 'Functional Reactive Programming from first principle ,' in Proc. ACM SIGPLAN'00 Conference on Programming Language Design and Implementation (PLDI'00), pp.242-252, 2000 https://doi.org/10.1145/349299.349331
  6. C. Elliott and P. Hudak, 'Functional reactive animation,' in International Conference on Functional Programming pp.163-173, June 1997
  7. A. Courtney and C. Elliott, 'Genuinely fuctional user interfaces,' in 2001 Haskell Workshop, Sep. 2001
  8. J. Peterson, P. Hudak, A. Reid, and G. Hager, ' FVision: A declarative language for visual tracking,' in Proceedings of PADL'01:3rd International Workshop on Practical Aspects of Declarative Languages , pp.304-321, Jan. 2001
  9. J. Peterson, P. Hudak, and C. Elliott, 'Lambda in motion:Controlling robots with haskell,' in First International Workshop on Practical Aspects ofn' Declarative Languages (PADL), Lecture Notes in computer science, Vol. 1551, pp.91-105, Springer, Jan. 1999
  10. Z. Wan, 'Functional Reactive Programming for Real-time Reactive System,' Ph.D Dissertation, Computer Science Department, Yale University, Oct . 2002
  11. P. Hudak, 'Modular domain specific languages and tools,' in Proceedings of Fifth International Conference on Software Reuse , pp. 134-142, Jun. 1998 https://doi.org/10.1109/ICSR.1998.685738
  12. GHC Team, 'The Glorious Glasgow Haskell Compilation system User's Guide, Version. 6.4.2' (http://www.haskell.org/ghc/docs/latest/html/building/sec-port-info.html)
  13. RCX Internal, http://graphics.stanford.edu/~kekoa/rcx
  14. Z. Wan, W. Taha, and P. Hudak, 'Real-time FRP,' in International Conference on Fuctional Programming (ICFP'01) , pp146-156,2001 https://doi.org/10.1145/507635.507654
  15. J. Hughes, 'Generalising monads to arrows,' Science of Computer Programming, vol. 37, pp.67-11, May.2000 https://doi.org/10.1016/S0167-6423(99)00023-4
  16. R. Paterson, 'A new notation for arrows,' in International Conference on Function Programmaing , pp.229-40, ACM Press, Sep.2001 https://doi.org/10.1145/507635.507664
  17. 이동주, 지정훈, 장한일, 우균, '애로우를 이용한 오류 처리 기법', 한국컴퓨터종합학술대회논문집, Vol33, No.1(B), pp397-399, 8월 2006
  18. BrickOS Homepage, http://brickos.sourceforge.net
  19. H. Nilsson, A. Courtney, and J. Peterson, 'Functional reactive programming, continued,' in Preceedings of the 2002 ACM SIGPLAN Haskell Workshop (Haskell'02), (Pittsburgh,Pennsyvania, USA), pp51-64, ACM Press, Oct. 2002 https://doi.org/10.1145/581690.581695
  20. P. Hudak, A. Courtney, H. Nilsson, and J. Peterson, 'Arrows, robots, and functional reactive programming,' in Summer School on Advanced Functional Programming 2002, Oxford University, vol. 2638 of Lecture Notes in Computer Science, pp.159-187, Springer-Verlag,2003
  21. D.N Xu and S.C.Khoo, 'Compiling real time functional reactive programming,' in ASIA-PEPM 2002: Preceedings of the ASIAN symposium on Partial evaluation and semantics-based program manipulation, (New York ,NY, USA), pp.83-93, ACM Press, 2002 https://doi.org/10.1145/568173.568183