서지주요정보
Analysis to estimate uncaught exceptions and exception flows for java = 자바에 대한 처리되지 않는 예외와 예외의 흐름을 예측하는 분석
서명 / 저자 Analysis to estimate uncaught exceptions and exception flows for java = 자바에 대한 처리되지 않는 예외와 예외의 흐름을 예측하는 분석 / Jang-Wu Jo.
발행사항 [대전 : 한국과학기술원, 2003].
Online Access 원문보기 원문인쇄

소장정보

등록번호

8014425

소장위치/청구기호

학술문화관(문화관) 보존서고

DCS 03006

휴대폰 전송

도서상태

이용가능(대출불가)

사유안내

반납예정일

리뷰정보

초록정보

Exception mechanism aims to support the development of robust programs with reliable error detection, and fast error handling. This mechanism provides a way for programmers to separate code that deals with unusual situation from code that supports normal processing. Because uncaught exceptions will abort the program`s execution, it is important to make sure at compile-time that the program will have no uncaught exceptions at run-time. Moreover, the information about exception propagation path can help programmers to make better use of exception mechanism. But local reasoning about the code is not sufficient to get such an information, because exceptions flow across methods and the information about uncaught exception (which exceptions are raised from a code block) is also required. So, the static analysis for the information about exception propagation path is necessary. The current JDK Java compiler does an intraprocedural exception analysis by relying on the declared exceptions of methods, to check that the program will have no uncaught exceptions at run-time. The current compiler is not elaborate enough to do "better" than as declared by the programmers. In this thesis, we propose an uncaught exception analysis of Java programs that estimates uncaught exceptions independently of the declared exceptions, and exception propagation analysis that estimates propagation paths of thrown exceptions. Our exception analyses are designed based on set-based framework. In case of the uncaught exception analysis, we aim to develop an effective and accurate analysis. First, we design an expression-level analysis that analyzes uncaught exceptions at every expression of input programs. For enhancing cost-effectiveness of analysis, we design sparse analysis that analyzes uncaught exceptions at a larger granularity than at every expression. We prove the soundness and equivalence of accuracy between the two analyses. We implement our exception analysis and JDK-style exception analysis, and evaluate the two analyses by experiments on realistic Java programs. By the experiments, our analysis is shown to detect uncaught exceptions for realistic Java programs more precisely than JDK-style analysis. In case of the exception propagation analysis, the solution can be infinite in the case there are recursive methods. We compute the solution of the analysis in finite time and show the soundness of finite solution. We then construct an exception propagation graph from the solution, which shows propagation paths of exceptions. We present two applications of exception propagation analysis: visualization of exception propagation and construction of CFG(Control Flow Graph) with exception flows. The visualization tool can inform programmers about exception information such as the origin of exceptions, the handlers of exceptions, the points where exceptions are caught unintentionally, and the points where finer grained handling is possible. The exception propagation graph can be used to construct CFG which includes the exception-induced control flow. Given an control-flow graph which does not include exception-induced control flows, we can easily merge exception propagation graph onto it so as to construct CFG with exception-induced control flow.

예외처리 메커니즘은 견고한(robust) 소프트웨어 개발과 오류 수정을 용이하게 하기 위함을 목적으로 한다. 이는 정상적인 상황을 처리하는 코드로부터 예외 또는 오류 상황을 처리하는 코드를 프로그래머가 분리해서 작성할 수 있게 함으로서 가능하다. 프로그램 실행 중 처리되지 않는 예외가 발생하면 프로그램이 비정상적으로 종료함으로, 프로그래머가 발생 가능한 예외에 대한 적절한 예외처리기를 설치해야 한다. 그렇지 못한 경우 컴파일러가 미리 분석해서 프로그램의 안전도를 증진시키는 것이 필요하다. 또한 예외처리 메커니즘을 보다 잘 사용하기 위해서는 예외 전파 경로에 대한 정보가 필요하다. 그러나 예외 전파 경로에 대한 정보를 구하기 위해서는 코드의 부분만을 살펴 보는 것으로는 충분하지 않다. 왜냐하면 예외는 메소드 간에 전파가 되고 그리고 처리되지 않는 예외 정보가 필요하기 때문이다. 그러므로 예외 전파 경로를 구하는 분석이 필요하다. 현재 JDK 자바 컴파일러는 프로그래머가 각 메소드의 throws 구문에 선언한 예외 명세를 기반으로 예외 분석을 한다. 그러나 이 분석에서는, 실제 발생 가능한 예외보다 광범위하거나 또는 발생하지 않는 예외들이 tt throws 구문에 선언되어 있는 경우, 정확한 분석을 할 수 없다는 문제점을 가지고 있다. 본 논문에서는 예외와 관련된 두 가지의 분석을 제안했다. 프로그래머의 선언과 무관하게 처리되지 않는 예외를 예측하는 분석과 발생된 예외의 전파되는 경로를 예측하는 분석이다. 본 논문에서 제안한 분석들은 집합-기반 프레임워크를 이용하여 설계하였다. 처리되지 않는 예외 분석의 경우, 정확하고 실용적인 분석을 목표로 하였다. 우선 분석의 안정성 증명을 위해 식-단위의 분석을 정의하였다. 다음으로 비용 효율적인 분석을 위해서, 식 단위가 아닌 메소드 단위에서의 분석을 정의하였다. 그리고 메소드 단위의 분석의 안정성을 보였고, 식-단위의 분석과 메소드-단위의 분석이 동일한 분석 결과를 제공함을 보였다. 그리고 본 논문에서 제안한 분석의 정확성을 보이기 위해 JDK 컴파일러 방식과 비교하는 실험을 수행하였고, 본 논문의 분석이 JDK 방식의 분석에 비해 정확한 처리되지 않는 예외 정보를 제공함을 보였다. 예외 전파 경로 분석의 경우, 순환 메소드(recursive method)로 인해 분석의 결과가 무한해 질 수 있다. 무한한 분석의 결과를 유한하게 표현하는 방법을 제안하였고 유한하게 표현된 분석 결과의 안정성을 보였다. 다음으로 예외의 전파 경로를 표현하는 예외 전파 그래프를 정의하였다. 그리고 이 분석의 응용으로 두 가지를 제안하였다. 첫 번째는 예외 전파 경로를 보여 주는 시각화기이다. 두 번째는 예외 흐름을 포함한 제어흐름 그래프(Control Flow Graph)를 생성하는 것이다. 시각화기는 프로그래머에게 예외 정보를 제공할 수 있다 제공되는 예외 정보로는 예외의 근원지와 처리기, 의도되지 않은 곳에서 예외가 처리되는 위치, 그리고 보다 정확한 예외 처리가 가능한 위치 등이다. 예외 전파 그래프는 예외 흐름을 포함하는 제어 흐름 그래프를 생성하는데 사용될 수 있다. 예외 흐름을 포함하지 않는 제어 흐름 그래프에 예외 전파 그래프를 병합함으로서 예외 흐름을 포함한 제어 흐름 그래프를 생성할 수 있다.

서지기타정보

서지기타정보
청구기호 {DCS 03006
형태사항 vii, 89 p. : 삽화 ; 26 cm
언어 영어
일반주기 저자명의 한글표기 : 조장우
지도교수의 영문표기 : Kwang-Moo Choe
지도교수의 한글표기 : 최광무
수록잡지명 : "An uncaught exception analysis for java". The journal of systems and software, 게제예정
학위논문 학위논문(박사) - 한국과학기술원 : 전산학전공,
서지주기 Reference : p. 82-89
QR CODE

책소개

전체보기

목차

전체보기

이 주제의 인기대출도서