Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Exception Monitoring System for Java ps lab Yun-kyung Kim.

Similar presentations


Presentation on theme: "An Exception Monitoring System for Java ps lab Yun-kyung Kim."— Presentation transcript:

1 An Exception Monitoring System for Java ps lab Yun-kyung Kim.

2 Contents.  1. Introduction  2. Preliminary  3. Design Considerations  4. Implementation  5. Experiment

3 1. Introduction  Uncaught exceptions 은 program 의 실행을 abort => run-time 에 exception 이 적절히 handling 되어져야함.  Programmer 가 exception 을 effectively trace, handling 하는 것이 쉽지 않음.

4  Static exception analysis  모든 가능한 exception 에 접근.  unchecked exception 은 고려하지 않음.  Static analysis information 은 method header 에 정의된 uncaught(checked) exception 을 check 하 는데 사용됨.  단점 : 실제 run-time 시에 exception 이 어떻게 thrown, caught, propagate 되는지에 대한 정보를 보여주지는 못함. => 따라서 Java program execution 시에 효율적으 로 exception propagation, handling 을 trace, monitor 하기 위한 system 개발이 필요.

5  Dynamic exception monitoring system  trace  Option selection  profile information  Code inlining

6 2. Preliminary  Java exception : be defined by classes, instantiated, assinged to variable, passed as parameters.  throw e o  try S 1 catch(C x) S 2  throws

7

8 main() m1() m2 () try{ m1( )} catch(E1 x) {..} throws E1 throw E1 main()m3 () throws E2 throw E2 throws E2 throw E2

9 3. Design Considerations  Inlines reference monitor : reference monitor 의 functionality 를 include 하도록 application 을 modify

10

11 4. Implementation  Barat  Front-end for a Java compiler  AST 구성 => type, name analysis information 제 공  AST 를 traverse 할 수 있는 interface 제공  DescendingVisitor : 모든 AST node 를 depth first order 로 방문  OutputVisitor : AST node 를 traverse 함으로써 input program 을 output

12  Implementation  descendingVisitor 를 확장하여 static analysis 구현 => exception- related construct 를 extract  OutputVisitor 를 확장하여 transformer 구현 => TransformVisitor

13

14 Figure 7. Transformed program

15

16 5. Experiment Figure 8. Trace of Check program Transformed program 을 수행할 때 thrown exception 의 handling, propagation Information 을 보여줌.

17 Figure 9. Profile of Check program 수행이 끝나면, 각 method 별로 thrown, caught, propagated exception 들의 Name, number 등을 보임.

18 propagated exception 은 각 method 별로 propagated exception 이 있을 때 마다, count 됨.


Download ppt "An Exception Monitoring System for Java ps lab Yun-kyung Kim."

Similar presentations


Ads by Google