Reverse Engineering: A Cognitive Approach, a Case tcl/gradtheses/izayour/ Engineering: A Cognitive Approach, a ... through a life long education. 3 ... 1.2 The reverse engineering tools approach ...

Download Reverse Engineering: A Cognitive Approach, a Case  tcl/gradtheses/izayour/  Engineering: A Cognitive Approach, a ... through a life long education. 3 ... 1.2 The reverse engineering tools approach ...

Post on 10-Mar-2018

214 views

Category:

Documents

2 download

TRANSCRIPT

<ul><li><p>1</p><p>Reverse Engineering: A Cognitive Approach, a</p><p>Case Study and a Tool</p><p>By</p><p>Iyad Zayour</p><p>Thesis</p><p>Presented to the Faculty of Graduate and Postdoctoral Studiesin partial fulfillment of the requirements</p><p>for the degree</p><p>Doctor of Philosophy (Computer Science)</p><p>Ottawa-Carleton Institute for Computer ScienceUniversity of Ottawa</p><p>Ottawa, Ontario, K1N 6N5Canada</p></li><li><p>2</p><p>Acknowledgements</p><p>My supervisor, Tim Lethbridge, had a lot of influence on the ideas presented in this thesis.</p><p>It has been a nice ride with him; we seem to agree always, my research just fitted nicely</p><p>with his earlier research. He has been very supportive and helped a lot, particularly, at the</p><p>level of quality of presentation and he never let me wait too long for any request.</p><p>My father, Dr. Ali, who is a professor of philosophy and psychology, gave me valuable</p><p>ideas and hard to find pointers into these domains; not only throughout this thesis but</p><p>through a life long education.</p></li><li><p>3</p><p>Contents</p><p>Chapter 1 Introduction ...................................................................................................... 10</p><p>1.1 Introduction ......................................................................................................... 10</p><p>1.2 The reverse engineering tools approach .............................................................. 11</p><p>1.2.1 The adoption problem................................................................................... 11</p><p>1.2.2 The efficient tool........................................................................................... 12</p><p>1.3 The current state of RE tools ............................................................................... 13</p><p>1.4 Our research approach ......................................................................................... 13</p><p>1.5 Research objectives ............................................................................................. 15</p><p>1.6 Overview of the thesis ......................................................................................... 16</p><p>Chapter 2 Background ...................................................................................................... 18</p><p>2.1 Terminology ........................................................................................................ 18</p><p>2.1.1 Cognition and cognitive................................................................................ 18</p><p>2.1.2 Task analysis and modeling .......................................................................... 22</p><p>2.1.3 Software Maintenance (SM) ......................................................................... 23</p><p>2.1.4 Reverse engineering...................................................................................... 23</p><p>2.2 Main research in reverse engineering.................................................................. 24</p><p>2.2.1 Program Analysis.......................................................................................... 25</p><p>2.2.2 Slicing ........................................................................................................... 25</p><p>2.2.3 Plan Recognition........................................................................................... 26</p><p>2.2.4 Concept Assignment ..................................................................................... 26</p><p>2.2.5 Design Recovery........................................................................................... 27</p><p>2.3 Dynamic Analysis................................................................................................ 28</p><p>2.3.1 Overview....................................................................................................... 28</p><p>2.3.2 Basic activities in dynamic analysis ............................................................. 29</p><p>2.4 Program Comprehension and cognitive models.................................................. 31</p><p>2.4.1 Bottom up...................................................................................................... 31</p><p>2.4.2 Top Down ..................................................................................................... 32</p><p>2.4.3 Discussion about cognitive models............................................................... 32</p><p>2.4.4 The Integrated model .................................................................................... 33</p><p>2.4.5 The integrated model and tool capabilities ................................................... 35</p></li><li><p>4</p><p>2.4.6 Discussion ..................................................................................................... 37</p><p>2.4.7 Partial comprehension................................................................................... 38</p><p>2.4.8 Tools and program understanding ................................................................ 40</p><p>2.5 Methodologies to identify the problems in SM................................................... 41</p><p>2.5.1 Empirical and ecological study of SM tasks................................................. 41</p><p>2.6 TkSee and the work practice approach................................................................ 43</p><p>2.6.1 TkSee ............................................................................................................ 44</p><p>2.6.2 Work practices .............................................................................................. 45</p><p>2.7 Examples of approaches and tools....................................................................... 46</p><p>2.7.1 Debuggers and dynamic analysis tools ......................................................... 47</p><p>2.7.2 IsVis .............................................................................................................. 47</p><p>2.7.3 Jcheck............................................................................................................ 50</p><p>2.7.4 Jinsight .......................................................................................................... 50</p><p>2.7.5 RunView ....................................................................................................... 51</p><p>2.7.6 View fusion................................................................................................... 52</p><p>2.7.7 Run Time Landscape .................................................................................... 52</p><p>2.7.8 Software Reconnaissance.............................................................................. 53</p><p>2.8 Support for program execution comprehension .................................................. 53</p><p>2.8.1 Inter-process dynamic analysis ..................................................................... 55</p><p>2.9 Dynamic slicing................................................................................................... 57</p><p>2.9.1 Dynamic slicing and program comprehension ............................................. 57</p><p>2.9.2 Discussion ..................................................................................................... 58</p><p>Chapter 3 Justifications for our approach and case study................................................. 59</p><p>3.1 Theoretical Justifications..................................................................................... 59</p><p>3.1.1 Tool adoption and the real problems of SM ................................................. 59</p><p>3.1.2 How to characterize SM tasks?..................................................................... 60</p><p>3.1.3 What criteria can be used to rank the difficulties of SM tasks?.................... 62</p><p>3.1.4 Cognitive load (CL) as a criterion ................................................................ 62</p><p>3.1.5 The notion of CL.......................................................................................... 63</p><p>3.1.6 Efficiency increase and CL........................................................................... 64</p><p>3.2 The approach ....................................................................................................... 65</p></li><li><p>5</p><p>3.2.1 The cognitive approach in summary............................................................. 67</p><p>3.3 Our approach at work: the case study.................................................................. 68</p><p>3.3.1 Identification of a context ............................................................................. 69</p><p>3.3.2 SM process as we perceive it: the task view................................................. 69</p><p>3.3.3 The difficulties model ................................................................................... 72</p><p>3.3.4 A framework for the explanation of difficulties ........................................... 76</p><p>3.3.5 Tool requirements ......................................................................................... 78</p><p>3.4 Evidence and support........................................................................................... 78</p><p>3.4.1 Experiment and introspection ....................................................................... 78</p><p>3.4.2 Locating pieces of code ................................................................................ 79</p><p>3.4.3 Cognitive models and domains cross-referencing ........................................ 80</p><p>3.4.4 Support for the difficulties model ................................................................. 82</p><p>3.5 Generalization for cognitively based assumptions .............................................. 82</p><p>3.5.1 Cognitive overload and its cost..................................................................... 83</p><p>3.5.2 The implicit-explicit and cognitive distance................................................. 85</p><p>3.5.3 Gap in perception between user and tool designer ....................................... 87</p><p>3.5.4 Problem solving ............................................................................................ 89</p><p>3.5.5 Automated processes .................................................................................... 89</p><p>3.5.6 Increasing recognition vs. recall ................................................................... 91</p><p>3.5.7 Facilitating meaningful encoding ................................................................. 91</p><p>3.5.8 Generalization for code delocalization and deep nesting ............................. 92</p><p>3.5.9 The gap effects.............................................................................................. 93</p><p>3.5.10 Conclusion ................................................................................................. 94</p><p>3.6 Generalization of the theoretical lessons ............................................................. 95</p><p>3.6.1 Object oriented code ..................................................................................... 95</p><p>3.6.2 Conclusion .................................................................................................... 99</p><p>Chapter 4 Overview of DynaSee .................................................................................... 100</p><p>4.1 General functionality ......................................................................................... 100</p><p>4.2 Instrumentation.................................................................................................. 101</p><p>4.3 The unit of instrumentation ............................................................................... 102</p><p>4.4 DynaSee features ............................................................................................... 102</p></li><li><p>6</p><p>4.4.1 Repetition removal...................................................................................... 103</p><p>4.4.2 Patterns........................................................................................................ 104</p><p>4.4.3 Routine ranking........................................................................................... 107</p><p>4.4.4 Call tree....................................................................................................... 110</p><p>4.4.5 Bookmarks .................................................................................................. 113</p><p>4.4.6 Code window and TkSee ............................................................................ 114</p><p>4.4.7 Summary of features ................................................................................... 114</p><p>Chapter 5 Evaluation....................................................................................................... 117</p><p>5.1 DynaSee features evaluation ............................................................................. 117</p><p>5.1.1 Trace test set ............................................................................................... 117</p><p>5.1.2 Repetition removal...................................................................................... 118</p><p>5.1.3 Patterns........................................................................................................ 119</p><p>5.1.4 Pattern Variations........................................................................................ 122</p><p>5.1.5 Routine ranking........................................................................................... 125</p><p>5.1.6 Combining features..................................................................................... 128</p><p>5.1.7 Conclusion .................................................................................................. 130</p><p>5.2 Revisiting requirements..................................................................................... 131</p><p>5.2.1 Does DynaSee create new difficulties or overhead for interpreting the</p><p>dynamic view?.......................................................................................................... 131</p><p>5.2.2 Does DynaSee Reduce the CL in search?................................................... 132</p><p>5.2.3 Does DynaSee reduce the negative CL effects caused by the issues presented</p><p>in the difficulties?..................................................................................................... 132</p><p>5.2.4 Does DynaSee support domain traceability? .............................................. 133</p><p>5.3 Holistic evaluation............................................................................................. 133</p><p>5.3.1 Task 1:......................................................................................................... 134</p><p>5.3.2 Task 2:......................................................................................................... 135</p><p>5.4 Semi-holistic evaluation .................................................................................... 137</p><p>5.4.1 Task 3.......................................................................................................... 137</p><p>5.4.2 Task 4.......................................................................................................... 138</p><p>5.4.3 Conclusion .................................................................................................. 139</p><p>5.5 User perception.................................................................................................. 140</p></li><li><p>7</p><p>5.5.1 Debriefing results...</p></li></ul>

Recommended

View more >