[논문 리뷰] Computation of WCET using Program Slicing and Real-Time Model-Checking
이 논문은 프로그램 슬라이싱과 Uppaal을 사용한 실시간 모델 체킹을 통해 완전 자동으로 최악 실행 시간(WCET)을 계산하는 방법을 제시한다. 이는 바이너리 코드에서 제어 흐름 그래프를 구축하고, 하드웨어(예: ARM920T)를 타이밍 자동기로 모델링하여 프로그램과 동기화함으로써 WCET 분석을 도달 가능성 문제로 환원한다. 실제 하드웨어 측정 결과와 비교했을 때 상대 오차가 5% 이하로 매우 높은 정확도를 달성한다.
Computing accurate WCET on modern complex architectures is a challenging task. This problem has been devoted a lot of attention in the last decade but there are still some open issues. First, the control flow graph (CFG) of a binary program is needed to compute the WCET and this CFG is built using some internal knowledge of the compiler that generated the binary code; moreover once constructed the CFG has to be manually annotated with loop bounds. Second, the algorithms to compute the WCET (combining Abstract Interpretation and Integer Linear Programming) are tailored for specific architectures: changing the architecture (e.g. replacing an ARM7 by an ARM9) requires the design of a new ad hoc algorithm. Third, the tightness of the computed results (obtained using the available tools) are not compared to actual execution times measured on the real hardware. In this paper we address the above mentioned problems. We first describe a fully automatic method to compute a CFG based solely on the binary program to analyse. Second, we describe the model of the hardware as a product of timed automata, and this model is independent from the program description. The model of a program running on a hardware is obtained by synchronizing (the automaton of) the program with the (timed automata) model of the hardware. Computing the WCET is reduced to a reachability problem on the synchronised model and solved using the model-checker UPPAAL. Finally, we present a rigorous methodology that enables us to compare our computed results to actual execution times measured on a real platform, the ARM920T.
연구 동기 및 목표
- 파이ipel라인 및 캐싱과 같은 복잡한 아키텍처를 갖춘 현대 임베디드 시스템에 대해 정밀한 WCET를 계산하는 데 도전하는 것.
- 소스 코드나 컴파일러 내부 정보 없이 바이너리 코드에서 제어 흐름 그래프를 자동으로 유도함으로써 수동적인 CFG 구축 및 루프 경계(annotation)를 제거하는 것.
- 프로세서의 모듈러 타이밍 자동기 모델을 사용하여 하드웨어 모델링을 프로그램 분석에서 분리하는 것.
- 실제 플랫폼에서 측정한 실행 시간과 비교하여 정확한 WCET 추정을 가능하게 하는 것.
- 분석 알고리즘을 변경하지 않고 하드웨어 모델만 변경하여 다양한 프로세서로의 유연한 하드웨어 리타겟팅을 지원하는 것.
제안 방법
- 소스 코드나 컴파일러 내부 정보가 필요 없이 프로그램 슬라이싱을 사용하여 바이너리 코드에서 제어 흐름 그래프(CFG)를 자동으로 유추한다.
- 목표 하드웨어(예: ARM920T)를 파이프라인 단계, 캐시 동작, 메모리 접근 시간을 모두 반영한 타이밍 자동기의 곱으로 모델링한다.
- 프로그램의 실행 모델을 하드웨어 모델과 동기화하여 해당 하드웨어에서의 프로그램 실행을 나타내는 복합 타이밍 자동기를 구성한다.
- WCET 계산을 Uppaal에서의 도달 가능성 질의로 환원하며, 가장 긴 경로가 최악의 실행 시간에 해당한다.
- 기호 실행과 모델 체킹을 사용하여 복잡한 데이터 의존성에 기반한 명령어 실행 시간을 고려한 모든 가능한 프로그램 경로를 효율적으로 탐색한다.
- 실제 ARM920T 하드웨어에서 실제 실행 시간을 측정하기 위한 철저한 실험 프rotocol를 적용한다.
실험 결과
연구 질문
- RQ1수동적인 CFG 구축이나 루프 경계(annotation) 없이도 완전 자동 방법이 정확한 WCET를 계산할 수 있는가?
- RQ2하드웨어 특화된 타이밍 행동(예: 파이프라인, 캐싱)을 독립적으로 모델링하고 프로그램 모델과 조합하여 정밀한 WCET 분석을 가능하게 할 수 있는가?
- RQ3모델 체킹을 통해 계산된 WCET는 실제 하드웨어에서 측정한 실행 시간과 어떻게 비교되는가?
- RQ4하드웨어 모델만 변경하여 다른 프로세서에 쉽게 적응시킬 수 있는가?
- RQ5데이터 의존성에 기반한 복잡한 프로그램에서 기호 모델 체킹을 사용할 경우, WCET의 경계는 얼마나 날카로워질 수 있는가?
주요 결과
- 이 방법은 소스 코드나 컴파일러 전용 지식 없이 바이너리 코드에서 제어 흐름 그래프를 자동으로 구축하여 수동 주석 기입이나 컴파일러 지식이 필요 없음을 입증한다.
- 18개의 프로그램에 대해 계산된 WCET와 측정된 WCET 간 평균 상대 오차는 2.4%이며, matmult-O2에서 최대 오차는 5.4%였다.
- 단일 경로 프로그램의 경우 상대 오차는 0.42%에서 3.8% 사이로, 예측 가능한 실행 환경에서 매우 높은 정밀도를 보였다.
- insertsort-O0 및 ns-O0와 같은 다중 경로 프로그램의 경우 상대 오차가 각각 0.8%로 낮게 유지되어 복잡한 제어 흐름에 대한 확장성도 입증되었다.
- 하드웨어 모델만 교체함으로써 ARM920T에서 다양한 최적화 수준에서도 일관된 결과를 얻을 수 있어 하드웨어 리타겟팅을 지원함을 보였다.
- 모델 체킹 방법은 상태 수가 1,000만 개 이상(예: matmult-O0는 1,050만 개 상태)인 프로그램의 WCET도 성공적으로 계산하여 큰 상태 공간에 대한 확장성도 입증했다.
더 나은 연구,지금 바로 시작하세요
논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.