In this thesis, we present a mono-variant demand-driven set-based analysis which solves only those constraints affecting subset of program points one wants to analyze. We separate the analysis into two directions: forward to know which values flow into a given point, and backward to know which program points that a given value into. We prove that for interested program points, our analysis gives exactly same results as whole program set-based analysis. We apply our analysis to check ML pattern matching based on approximated runtime values. We report the performance of our analysis as percentage of constraints solved compared with whole program analysis. Experimental results are not much satisfactory both in the accuracy of mono-variant set-based analysis and in the efficiency of demand-driven approach. We discuss that poly-variance can improve both the accuracy and the efficiency.
정적 분석을 통해서 실제로 쓰이는 값들을 기반으로 하는 ML 패턴 검사 방법을 제안한다. ML 컴파일러는 사용자가 작성한 패턴 매치에 대해 해당하는 타입의 모든 값에 대한 규칙이 정의되어 있는지 검사를 한다. 이는 사용자가 작성한 프로그램의 문법 구조만을 고려한 검사로 이를 의미 구조를 고려해서 실제로 패턴 매치가 쓰이는 값들만을 대상으로 검사하도록 개선하고자 한다.
의미 구조에 고려한 패턴 매치 검사를 하기 위한 분석으로 요구 사항에 기반 하는 단일성 집합 기반 분석 방식을 제안한다. 이는 패턴 매치가 수행되는 곳을 시작점으로 해서 이 곳에 흘러들어 오는 값에 영향을 끼치는 집합 제약식만을 푸는 방식으로 일반적인 집합 제약 분석이 프로그램 전체를 분석하는데 반해 효울적으로 원하는 곳만을 분석가능하도록 해준다. 이러한 요구 사항에 의한 분석이 전체를 분석하는 것과 요구 사항이 있는 것에 대해서 동일한 결과를 준다는 것을 증명한다.
여러 프로그램 흐름을 하나로 요약하는 단일성 집합 기반 분석 자체의 문제점과 이를 요구 사항에 기반하도록 개선한 것이 가지는 한계점을 실험을 통해 보인다. 이에 비해 여러 프로그램 흐름을 하나 이상으로 요약하는 다형성 집합 기반 분석이 요구사항에 기반한 분석 방식과 가지는 상승효과를 예측하고 이를 통해 앞으로의 연구 방안을 제시한다.