Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flow-Augmented Call Graph: A New Foundation for Taming API Complexity Qirun Zhang 1009004750 1.

Similar presentations


Presentation on theme: "Flow-Augmented Call Graph: A New Foundation for Taming API Complexity Qirun Zhang 1009004750 1."— Presentation transcript:

1 Flow-Augmented Call Graph: A New Foundation for Taming API Complexity Qirun Zhang 1009004750 1

2 2 Past work: Taming API Complexity Future plan: in the Presence of Pointers

3 Outline Background Approach Evaluation Conclusion Q&A 3

4 Background 4

5 Motivation 5 Background

6 A Flow-Augmented Call Graph (FACG) G = (N,E) for procedure P is a directed multigraph in which each node n corresponds to either a caller P or a callee Q, and each weighted edge e represents a call-site augmented with control flow. Call GraphFlow-Augmented Call Graph 6

7 Background 7 What is the insight of FACG?

8 Background Why taming API complexity? – For Software maintenances – Most of software are not documented well – For API documentation maintenances http://msdn.microsoft.com/en-us/library/ms633545(v=VS.85).aspx Apache Project YearFunction @see alsoPercentage 2005135360.4% 20081461151.0% 8 scpSEE ALSO rcp(1), sftp(1), ssh(1), ssh-add(1), ssh- agent(1), ssh-keygen(1), ssh_config(5), sshd(8)

9 Background Research solutions – How API is used PLDI-05, OOPSLA-06, ECOOP-09, ASE-07, ICSE-05, AOSD-07 – How API is implemented Suade (FSE-05), Fran(FSE-07), Altair(FSE-09) 9

10 Approach 10

11 Approach Overview 11

12 Approach Parsing & Hashing – How to parse the source code? – What kind of elements should be extracted? Solution gcc Gimple IR API call-site, basic block, conditional block. Build the CFG 12

13 Approach Handling Function Pointers – Collecting the path conditions – Over-approximate the program behavior – Testing the validation by SMT solver 13

14 Approach Reducing CFG – The CFG considered [1] – Eliminate the back edge [2] – Unroll the loop once [1] Podgurski, A., Lori, Clarke, A.: A formal model of program dependences and its implications for software testing, debugging, and maintenance. IEEE Transactions on Software Engineering 16, 965–979 (1990) [2] Ramanathan, M.K., Grama, A., Jagannathan, S.: Path-sensitive inference of function precedence protocols. In: ICSE. pp. 240–250 (2007) 14

15 Approach Calculating the Flow of Callees – The inflow of the basic block associated with Q – The outflow of the basic block associated with Q 15

16 Approach Augmenting the Call graph Call GraphFlow-Augmented Call Graph 16

17 17 Augmenting the Call graph Approach

18 Recommending API – Computing Cosine similarities 18 g0h0g1h1g2 f011000 f110100 f200011

19 Evaluation 19

20 Evaluation Subject Project Experimental Setup – A specific task suggested by Fran [2]: Given a query API, retrieve other APIs in the same module – Module is defined by original documentation http://www.tcl.tk/man/tcl8.4/TclLib/contents.htm 20 [2] Saul, Z.M., Filkov, V., Devanbu, P.T., Bird, C.: Recommending random walks. In: ESEC/SIGSOFT FSE. pp. 15–24 (2007) 20

21 Evaluation Case study 21

22 Evaluation Quantitative evaluation – Compare the F1 according to the original documentation 22

23 Evaluation The impact of FACG Without FACG With FACG 23

24 Conclusion 24

25 Conclusion Our contribution – We proposed the Flow-Augmented Call Graph – We applied FACG on API recommendation. Our approach could advance the state-of-the-arts – We developed a framework for program analysis by Gcc. Future work – Recommendation system? – Static analysis? – SMT solving? 25

26 Q&A Thanks! 26

27 27


Download ppt "Flow-Augmented Call Graph: A New Foundation for Taming API Complexity Qirun Zhang 1009004750 1."

Similar presentations


Ads by Google