A Hybrid Algorithm that Eliminates the Bottleneck of the Let-Polymorphic Type-Inference Algorithm M

Let-다형성 타입 유추 알고리즘 M의 병목을 해소하기 위한 혼성 알고리즘 H

  • Ju, Sang-Hyeon ;
  • Lee, Uk-Se (Dept. of Electronic Computer Science, Korea Advanced Institute of Science and Technology) ;
  • Lee, Gwang-Geun (Dept. of Electronic Computer Science, Korea Advanced Institute of Science and Technology)
  • 주상현 (SK텔레콤 중앙연구원) ;
  • 이욱세 (한국과학기술원 전자전산학과) ;
  • 이광근 (한국과학기술원 전자전산학과)
  • Published : 2000.12.01

Abstract

Hindley/Milner let-다형성 타입체계(let-polymorphic type system)에는 두 가지 타입 유추(type-inference) 알고리즘이 있다. 하나는 표준으로 알려진 W 알고리즘으로 프로그램의 문맥에 상관없이 상향식으로 유추하는 알고리즘이고, 다른 하나는 프로그램의 문맥에 따라 하양식으로 유추하는 M 알고리즘이다. 본 연구에서는 함수 적용(application)이 중첩되는 경우, M 알고리즘에 병목현상이 발생함을 보이고, 이러한 병목현상이 발생하지 않는 혼성 알고리즘 H를 제시한다. H 알고리즘은 M 알고리즘을 함수 적용 부분만 W 알고리즘으로 변형한 알고리즘으로, W보다 일찍 M보다는 늦게 오류를 감지함을 보인다.

Keywords

References

  1. Robin Milner. A theory of type polymorphism in programming. Journal of Computer System Science, 17:348-375, 1978
  2. Luis Damas and Robin Milner. Principal typescheme for functional programs. In Proceedings of the 9th Annual ACM Symposium on Principles of Programming Languages, pages 207-212, New York, 1982. ACM
  3. 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, July 1998 https://doi.org/10.1145/291891.291892
  4. Xavier Leroy. The Carnl Light system, release 0.6. Institut National de Recherche en Informatique eten Automatiquc, 1993
  5. J. A. Robinson, A machine-oriented logic based on the resolution principle. Journal of ACM, 12(l):23-41, January 1965 https://doi.org/10.1145/321250.321253
  6. Xavier Leroy. The Objective Caml system, release 2.02. Institut National de Recherche en Informatiquc et en Autornatiquc, 1999
  7. Xavier Leroy. The Caml Light system, release 0.74. Institut National de Recherche en Inforrnatique et en Automatique, 1997
  8. Michel Manny. Functional programming using Caml Light, January 1995
  9. Paris C. Kanellakis, Harry G. Mairson, and John C. Mitchell. Unification and ML type reconstruction. In Proceedings of the 17th Annual ACM Symposium on Principles of Programming Languages, pages 382-401, 1990