Skip to main content
QUICK REVIEW

[논문 리뷰] Optimal and Perfectly Parallel Algorithms for On-demand Data-flow Analysis

Krishnendu Chatterjee, Amir Kafshdar Goharshady|arXiv (Cornell University)|2020. 01. 29.
Advanced Data Storage Technologies참고 문헌 84인용 수 14
한 줄 요약

이 논문은 프로그램 흐름 그래프의 낮은 트리폭을 활용하여 IFDS 프레임워크 내에서 요구 시 인터프로시저 데이터플로우 분석을 위한 최적이고 완전히 병렬화 가능한 알고리즘을 제시한다. 이 방법은 선형 시간의 프리프로세싱과 일정 시간의 쿼리 처리를 달성하며, 거의 완벽한 병렬성을 확보하여 실제 벤치마크에서 이전 방법에 비해 프리프로세싱 및 쿼리 속도 모두에서 뚜렷한 성능 향상을 보였다.

ABSTRACT

Interprocedural data-flow analyses form an expressive and useful paradigm of numerous static analysis applications, such as live variables analysis, alias analysis and null pointers analysis. The most widely-used framework for interprocedural data-flow analysis is IFDS, which encompasses distributive data-flow functions over a finite domain. On-demand data-flow analyses restrict the focus of the analysis on specific program locations and data facts. This setting provides a natural split between (i) an offline (or preprocessing) phase, where the program is partially analyzed and analysis summaries are created, and (ii) an online (or query) phase, where analysis queries arrive on demand and the summaries are used to speed up answering queries. In this work, we consider on-demand IFDS analyses where the queries concern program locations of the same procedure (aka same-context queries). We exploit the fact that flow graphs of programs have low treewidth to develop faster algorithms that are space and time optimal for many common data-flow analyses, in both the preprocessing and the query phase. We also use treewidth to develop query solutions that are embarrassingly parallelizable, i.e. the total work for answering each query is split to a number of threads such that each thread performs only a constant amount of work. Finally, we implement a static analyzer based on our algorithms, and perform a series of on-demand analysis experiments on standard benchmarks. Our experimental results show a drastic speed-up of the queries after only a lightweight preprocessing phase, which significantly outperforms existing techniques.

연구 동기 및 목표

  • 대규모 프로그램에서 포괄적인 인터프로시저 데이터플로우 분석의 높은 계산 비용을 해결하기 위해.
  • 프리프로세싱 및 쿼리 단계를 분리하여 프로그램 분석을 위한 빠른 요구 시 쿼리를 가능하게 하기 위해.
  • 프로그램 흐름 그래프의 낮은 트리폭을 활용하여 최적의 병렬 알고리즘을 설계하기 위해.
  • 일반적인 데이터플로우 분석에 대해 시간과 공간 최적성을 동시에 달성하기 위해.
  • 각 스레드가 일정한 작업만 수행하는 초단순 병렬 쿼리 처리를 가능하게 하기 위해.

제안 방법

  • 프로그램 흐름 그래프의 낮은 트리폭을 활용하여 시간 및 공간 복잡도가 최적인 알고리즘을 설계하기 위해.
  • 트리 분해를 사용하여 경량 프리프로세싱 단계 동안 분석 요약을 사전에 계산하고 저장하기 위해.
  • 스레드 간 작업을 균일하게 분할하는 쿼리 알고리즘을 설계하여 각 스레드가 일정한 작업량만 수행하도록 하기 위해.
  • 실증적 평가를 위해 제안된 알고리즘 기반의 정적 분석기 구현하기 위해.
  • 이론적 분석과 DaCapo 벤치마크를 활용한 실험을 결합하여 성능 검증하기 위해.
  • 단어 수준 최적화 및 병렬화 기법을 적용하여 쿼리 실행 시 거의 완벽한 병렬성을 달성하기 위해.

실험 결과

연구 질문

  • RQ1흐름 그래프의 구조적 특성을 활용하여 요구 시 IFDS 분석을 시간 및 공간 최적화로 구현할 수 있는가?
  • RQ2프리프로세싱 단계를 경량화하면서도 일정 시간 내에 쿼리를 처리할 수 있는가?
  • RQ3쿼리 단계를 초단순 병렬 처리로 만들 수 있으며, 각 스레드가 일정한 작업량만 수행할 수 있는가?
  • RQ4트리폭을 활용하면 기존 방법에 비해 실질적인 성능 향상이 뚜렷한가?
  • RQ5제안된 알고리즘이 낮은 트리폭을 가지는 실제 Java 프로그램을 효과적으로 처리할 수 있는가?

주요 결과

  • 제안된 알고리즘은 O(n·|D|³)의 프리프로세싱 시간 복잡도를 달성하며, 이는 최적이며 프로시저 크기와 무관하다.
  • 모든 쿼리는 O(1) 시간 내에 처리되며, 무거운 완전 프리프로세싱의 성능과 동일하다.
  • 병렬 버전은 12개 스레드에서 11.3배의 속도 향상을 기록하여 거의 완벽한 병렬성을 입증했다.
  • 모든 110개의 벤치마크에서 프리프로세싱 단계가 5분 이내에 완료되었으며, CPP는 25%의 인스턴스에서 타임아웃되었다.
  • 실제 프로그램의 트리폭이 작다는 것이 확인되었으며(최대 9, 최소 1), 이는 제안된 방법의 실용적 관련성을 뒷받침한다.
  • 특히 더 큰 프로그램에서 프리프로세싱 및 쿼리 단계 모두에서 이전의 모든 접근 방식을 능가한다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.