Download presentation
Presentation is loading. Please wait.
Published byAsher Atkins Modified over 9 years ago
1
Su Ping and Ma Xiao-xing Department of Computer Science and Technology Nanjing University Automated Analysis of Dynamic Dependences between Java Components
2
Motivation Approach to dynamic dependences DDET Evaluation Summary Future work Nanjing University© Su Ping2 Agenda
3
Dynamic updates in safe and low-disruptive way Criteria for dynamic updates Quiescence Tranquillity Version-consistency Nanjing University© Su Ping3 Motivation
4
Nanjing University© Su Ping4 Dependences Considered L0L0 L1L1 L2L2 ✔ ✔ ✖ The more precise dynamic dependences are, the timelier dynamic updates can start! Static dependences pessimistically include all potential constraints, bringing high disruption[1]!
5
Goal Get precise dynamic dependences at any point when the program runs Scope Java Bytecode Component-based System Nanjing University© Su Ping5 Our Work Dynamic dependences Future set: depended components it might use in the future Past set: depended components it has used in the past Dynamic dependences Future set: depended components it might use in the future Past set: depended components it has used in the past
6
Dynamic dependences Portal T0T0 T0T0 Auth Proc DB T1T1 T1T1 getToken(cred) return token T2T2 T2T2 process(token, data) T3T3 T3T3 verify(token) OK T4T4 T4T4 dbOp() 6 {Auth,Proc} {} {Auth} {Proc} {} {Auth,Proc} All participants in a transaction are initiator of the transaction or directly connected to the initiator [2].
7
Nanjing University© Su Ping7 Overview Java Class Files Control Flow Graph Dynamic Dependences Automaton Transformed Java Class Files Trigger information have been inserted into the Java class files so that they can drive the automaton to run automatically! Dynamic Dependences output derivation instrumentation
8
State: dynamic dependences Future Past Event Action Transition Nanjing University© Su Ping8 Dynamic Dependences Automaton √ state i state j event action
9
Control flow graph (CFG) All possible paths Next bytecode knows easily Tools: ASM, Soot, Java Path Finder(JPF) DDA derivation DFS CFG Merge states with the same contents Nanjing University© Su Ping9 DDA Derivation
10
Nanjing University© Su Ping10 Example Source Code Byte Code
11
Event: change dynamic dependences potentially Start Use service from other components Branch End Nanjing University© Su Ping11 Event
12
Nanjing University© Su Ping12 Example: CFG 0 1 2 4 3 5 7 6 8 9 CFGByte Code
13
Nanjing University© Su Ping13 DDA derivation 0 1 2 4 3 5 7 6 8 9 There is no event, so dynamic dependences won’t change ! Merge the two states into one! There is no event, so dynamic dependences won’t change ! Merge the two states into one! When meets an event, it will produce a new state and the triggered transition! Meanwhile, it transforms to the new state! CFG DDA
14
DDA Derivation Future set Depended components it might use in all possible paths from current to ends Past set Depended components it has used in its executed path from start to current Nanjing University© Su Ping14 Approach to Dynamic Dependences
15
Analyze future of all states in DDA statically For each state Depended components it might use in all possible paths from current state to end states For each transition pre_future = pre_future post_future component of event Nanjing University© Su Ping15 Future Computation
16
Nanjing University© Su Ping16 Example: future computation b a;b a;b;c a;b a;b;c b Future set of all states is null initially!
17
Change dependences adaptively Past Only one executed path from start state to current state cur_past = cur_past component of the event Future Search DDA , find next state according to current state and the event Nanjing University© Su Ping17 Adaptive-DDA
18
Nanjing University© Su Ping18 A-DDA Precise dynamic dependences got adaptively Example Path: e0e1e6e8e9e3e5e10 a a a a;c a;c a;c a;b;c Past set of all states is null initially!
19
ASM DDA is inserted in the annotation State Transition Trigger information is inserted Event Nanjing University© Su Ping19 Instrumentation
20
Nanjing University© Su Ping20 Example: Instrumentation Primary file Transformed file DDA is inserted in the @transaction annotation. Trigger information are inserted!
21
DDET framework Nanjing University© Su Ping21 DDET DDA Derivation Dynamic dependences Instrumentation
22
Goal: to evaluate safety and disruption Compare our approach with the naïve approach Method: ask whether the component can be updated discretely Safety: whether a updatable point is safe in fact Disruption: number of updatable points Nanjing University© Su Ping22 Summary Including all possible components, future set doesn’t change; Past set is changing.
23
Nanjing University© Su Ping23 Results Safe criteria for dynamic updates Naïve approachOur approach YesNoYesNo SafeUn- safe SafeUn- safe SafeUn- safe SafeUn- safe Quiescence2182 Tranquillity408816004 Version- consistency 408816008 Updatable point checked by safe criteria Nonupdatable point checked by safe criteria Unsafe,can not update! Safe in fact! Safety: All updatable points are safe in fact! Disruption: Compared to naïve approach, the number of updatable points using our approach is much larger!
24
Proposed an approach to get precise dynamic dependences automatically Developed a dynamic dependences extracting tool——DDET using the approach Experiments with DDET demonstrated our approach not only can ensure consistency, but also speed up the update. Nanjing University© Su Ping24 Conclusions
25
More precise future set Program slicing Symbolic execution Nanjing University© Su Ping25 Future work
26
26
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.