A Design and Implementation of Functional Array for Improvement of the Traversal Time

탐색시간의 개선을 위한 함수형 배열의 설계 및 구현

  • 주형석 (유한전문대학 전자계산과) ;
  • 유원희 (인하대학교 전자계산공학과)
  • Published : 1996.09.01

Abstract

Pure functional languages have the referential transparency feature sothat all objects cannot be updated destuctively. Once an aggregated data structure such as array is updated, both the original and newly updated array must be preserved to maintain reverential transparency. Thus, it is required to develop an efficient mechanism with which can reduce the maintenance cost while maintaining referential transparency for whole data. This study is to suggest a functional array to solve the problem, and them test it. For that, the proposed mechanism was implemented on a combinator graph reduction machine. The result shows that proposed mechanism reduces traversal time for array operations. Also, updating all versions and accessing the recent version are achieved in constant time without reconstruction of updated data in execution time.

순수 함수언어는 참조적 투명성을 가지고 있으므로 모든 객체에 대한 직접적 인 갱신이 불가능하다. 배열과 같은 집단자료구조가 갱신되면, 참조적 투명성을 유지하기 위하여 원래의 배열과 갱신된 배열이 모두 유지되어야 한다. 따라서 모든 자료에 대한 참조적 투명성을 유지하면서 자료의 유지 비용을 줄일 수 있는 효과적 인 방법의 개발이 요구되고 있다. 본 논문에서는 이러한 문제를 해결하기 위한 함수형 배열을 제시하고, 검증하고자 하였다. 이와 같은 검증을 위해서, 제안된 방법을 컴비네이터 그래프 감축기 상에서 구현하였다. 제안된 방법에서 배열 연산에 대한 탐색시간을 줄 일 수 있었으며, 갱신 비용과 최근 버전에 대한 접근은 갱신된 자료를 실행시간에 재 구성하는 과정 없이 상수시간에 가능하였다.

Keywords