Abstract
Recently developed compilers perform some optimizations in order to speed up the execution time of source program. These optimizations require the transformation of the sequence of program statements. This transformation does not give any problems in a single-threaded program. However, the transformation gives some significant errors in a multi-threaded program. State-of-the-art model checkers such as Java-Pathfinder do not consider the transformation resulted in the optimization step in a compiler since they just consider a single memory model. In this paper, we describe a new technique which is based on SMT solver. The Java Memory Model Simulator based on SMT Solver can compute all possible output of given multi-thread program within one second which, in contrast, Traditional Java Memory Model Simulator takes one minute.
많은 컴파일러는 속도를 높이기 위해서 최적화를 수행한다. 최적화의 결과로 프로그램의 구문이 변경된다. 단일 스레드 소프트웨어에서는 변경된 구문이 영향을 받지 않지만 멀티스레드 소프트웨어에서는 변경된 구문 때문에 예상하지 못한 실행 결과가 발생할 수 있다. 멀티 스레드자바 소프트웨어는 스레드들 간에 메모리를 통한 상호작용을 자바 메모리 모델을 통해서 명세 한다. 자바 메모리 모델은 자바언어의 표준 메모리 모델이다. 하지만 현재까지 나와 있는 어떠한 자바 모델 체킹 도구도 자바 메모리 모델을 지원하지 않는다. 본 논문에서는 자바 메모리 모델을 지원하는 모델 체킹 도구를 개발하기 위해서 자바 메모리 모델을 지원하는 시물레이터를 많은 모델 체킹 도구에서 사용되는 SMT 기반으로 구현했다. SMT 기반 메모리 모델 시뮬레이터는 기존의 메모리 모델 시뮬레이터에서 몇분이 걸리는 계산 결과를 1초 이내에 계산하였다. 또한 이를 통해 기존 소프트웨어 모델 체킹에서 표현할 수 없는 실행 결과를 빠르게 표현할 수 있다.