The Implementation and Optimization of DiSL Weaver

Author
ZhengYuDi
Advisor
QiZhengWei
School
Shanghai Jiaotong University
Major
Computer Science and Technology
Classification
TP311.52 Software Development
Degree
Master's thesis
Year
2013
Downloads
8
Citations
0

Request the full text

Abstract

Dynamicprogramanalysistoolssupportnumeroussoftwareengineeringtasks,in-cluding profling, debugging, testing, program comprehension, and reverse engineer-ing. A key technique for the implementation of dynamic program analysis tools isbytecode instrumentation, which has been supported by low-level bytecode engineer-ing libraries. However, building dynamic program analysis tools on top of low-levelbytecode engineering libraries makes the development and maintenance tedious, error-prone, and hence expensive. On the other side, researchers have explored the use ofaspect-oriented programming (AOP) language on developing dynamic programminganalysistools. AlthoughAOPofershigh-levelabstractionstoconciselyexpresscertaindynamic analysis, join point model of mainstream AOP languages is not well suited formany analysis tasks and the code generated by weavers in support of certain languagefeatures incurs high overhead.Recently,thedomain-specifcaspectlanguageDiSLhasbeenproposedtoimprovethe development on dynamic programming analysis tools. DiSL ofers an open joinpoint model where any region of bytecodes can be selected as join point, access toextensible static context and weave-time execution of user-defned static analysis code.Whilethelanguageitselfensuresthehighexpressivenessandtheconvenient,high-levelprogramming model, DiSL requires an implementation of weaver that provides highefciencyofdevelopedanalysistools. Moreover, despitethefactthatDiSLofershigh-level abstractions for the rapid development of efcient bytecode instrumentations, itis required that DiSL programmer should factor out the expressions to be evaluatedat weave-time, or otherwise generate a signifcant amount of dead code, which mayimpair some optimizations performed by the runtime. If the DiSL weaver provides aruntime optimization of the woven code, then the DiSL programming model will besimplifed. The scientifc contributions of this thesis are twofold:1. We present the efcient implementation of DiSL weaver, and evaluate it using arecast version of Senseo.2. We integrate a partial evaluator called Turbo into the DiSL weaver, and presentfourcasestudiestoillustratethebeneftsofTurbo. Withoneofthesecasestudies,theperformanceimpactofTurboisevaluatedbothonweave-timeandonruntimeof the woven applicationThe DiSL weaver presented in this thesis ofers direct inlining of instrumentedcode, efcient data passing using synthetic local variables and thread local variables,efcient access to comprehensive static and dynamic context information, and efcientmechanism to process arguments. The benefts of DiSL weaver is demonstrated with acasestudy,recastinganexistingcomplexdynamicanalysistooloriginallyimplementedin AspectJ. The partial evaluator Turbo processes the generated instrumentation code,performs constant propagation, conditional reduction, pattern-based code simplifca-tion, and executes pure functions at weave-time. With Turbo, it is often unnecessary towrap expressions for evaluation at weave-time in separate classes, as shown in severalcase studies.The evaluation result for DiSL weaver shows that the overhead factor introducedby DiSL version of Senseo is only3.09while for AspectJ version of Senseo, withthe same code coverage, the overhead is a factor of6.47. The evaluation result forTurbo shows that although Turbo increases weave-time by a factor of4.2while themanually tuned implementation is only10%slower than the baseline, they reach thesame high speedup of about13x for steady-state performance. To conclude this, theimplmentation of DiSL weaver incurs signifcantly less overhead than AspectJ, anda simple DiSL instrumentation optimized by Turbo can reach the same steady-stateperformance as a complicated, manually tuned instrumentation, at the expense of anincrease in weave-time.

Table of contents

Summary 5-7 ABSTRACT 7-9 directory 9-12 Chapter 1 Introduction 12-15 <br / > 1.1 Background 12-14 1.2 This article outlines 14-15 chapter related work 15-19 2.1 bytecode engineering library 15-16 2.2 program analysis framework 16 2.3 aspect -oriented language 16-18 2.4 part denominated 18-19 the third chapter dynamic bytecode injection framework DiSL 19-32 3.1 background 19-20 3.2 DiSL design 20-21 language features 3.3 DiSL of 21-28 3.3.1 inject class , code snippets and marker 21-22 3.3.2 code sequence fragments 22 3.3.3 virtual local variable 22-23 3.3.4 thread-local variables 23 3.3.5 static context information 23 -25 3.3.6 dynamic context information 25-26 3.3.7 parameters processor 26-27 3.3.8 filters and limited scope 27-28 3.4 related work comparing 28-29 3.5 discussion 29-31 3.5.1 expressive 29-30 3.5.2 abstraction level 30 3.5.3 inject code legality affect 30 3.5.4 of the target program 30 <br / > 3.5.5 code coverage 30-31 3.6 Summary 31-32 Chapter IV DiSL weave the realization 32-49 4.1 background 32-34 4.2 DiSL weave the realization United nbsp within 34-41 4.2.1 snippets ; 34-35 4.2.2 virtual local variables 35-36 4.2.3 thread-local variables 36 4.2.4 static context information 36-37 4.2.5 dynamic contextual information 37-39 4.2.6 parameters processor 39-41 4.3 case Study : Senseo 41-45 4.4 experiment 45-48 nbsp 4.4.1 experimental environment ; 45 4.4.2 evaluation objectives and evaluation projects 45-46 4.4.3 experimental results and analysis 46-48 4.5 Summary 48-49 Chapter partial evaluator Turbo 49-67 5.1 background 49 - 51 5.2 Turbo optimization steps 51-54 5.3 Sample analysis 54-61 5.3.1 configurable program analysis tools 54-56 5.3.2 supervisor vest tracking tool 56-59 5.3.3 access member variable analysis tools 59 5.3.4 execution path analysis tool 59-61 5.4 experiment 61-65 5.4.1 experimental environment 61 5.4.2 evaluation objectives and evaluation projects 61-62 5.4.3 experimental results and analysis 62-65 5.5 related work 65 5.6 summary 65-67 Full summary 67-69 References 69-74 Thanks published during 74-75 pursue a degree academic catalog 75

Related dissertations

  1. Design and Implementation of Uniform Interface Platform System on AOP/IoC in the Telecommunications Industry
  2. Automatic Translation from Name-based Pointcuts to Analysis-based Pointcuts for Robust Aspects
    WangLin ·Tianjin University ·2012 ·Master's thesis
  3. Research on Methods for Generating AOP Test Cases Based on Predicate Dynamic Slicing
    WangBo ·Zhengzhou University ·2012 ·Master's thesis
  4. Aspect-oriented Programming-based Unit Test Effectiveness Detection System
  5. Software Fault Localization Research Based on Program Semantics
    HeGuoQin ·Hunan University ·2011 ·Master's thesis
  6. Hybrid Mode of Data Validation
  7. Denotational Semantics and Program Analysis for ATLAS
    GuoDeGui ·Jilin University ·2007 ·Doctoral dissertation
  8. Techniques for Separation of Crosscutting Concerns
    HeLiLi ·Jilin University ·2007 ·Doctoral dissertation
  9. Research on Improving Performance of Services Based on Partial Evaluation
    MaoHongYan ·Shanghai Jiaotong University ·2006 ·Doctoral dissertation
  10. Extensible compiler system , key technology research
    HuWeiPing ·Institute of Computing Technology ·1998 ·Doctoral dissertation
  11. Research on Open Temporal Logic Based Formal Verification and Modular Reasoning of Aspect-Oriented Programs
    LvJia ·Zhejiang University ·2009 ·Doctoral dissertation
  12. Partial Evaluation for Xquery Language
    SuHang ·Beijing University of Technology ·2009 ·Doctoral dissertation
  13. Key Techniques of Trustworthiness Improvement on Hybird Arithmetic Addition of Floating-point Fused Multiply-add Unit
  14. Research on Aspect-Oriented Design Model and Its Implementation on the .NET Platform
    ZhangXinMeng ·Hebei University of Technology ·2007 ·Master's thesis
  15. Design and Implementation of Color Ring Back Tone Management Service Unified Creation Platform
  16. The Research and Application of Component Mechanism Based on Castle Framework
    YangYang ·Wuhan University of Technology ·2008 ·Master's thesis
  17. Aspect-oriented technology research in the design and implementation of NET in
  18. Research and Implementation of Web Application Performance Monitoring System Based on Aspect-Oriented Programming
    ZhouQingQuan ·Northwestern University ·2008 ·Master's thesis
  19. Aspect Oriented Programming’s Application in UP
    HuangLei ·Tongji University ·2008 ·Master's thesis
  20. Research and Applications of MVC Pattern Based on AOP
    ShenLiJun ·Dalian Maritime University ·2008 ·Master's thesis