1
play

1 Software maintenance: Relative Cost 90% 80% 70% 60% 50% 40% - PDF document

An Environment for Comprehending the Behavior of Software Systems Maher Salah Department of Computer Science Drexel University July 25, 2005 Overview Problem: Software maintenance Modern software systems Large, distributed,


  1. An Environment for Comprehending the Behavior of Software Systems Maher Salah Department of Computer Science Drexel University July 25, 2005 Overview • Problem: Software maintenance • Modern software systems – Large, distributed, multi-language and developed using pre-built components – Difficult and expensive, especially if the source code is not available Þ Effective SC tools can greatly simplify and reduce maintenance effort • Solution: Software Comprehension Environment • Profiling and analysis of distributed systems • Analysis of program features • Common data repository • Software views • Evaluation: Case study • Mozilla: Web browser • Jext: Programmers’ Text Editor • TechReport: Publication database July 25, 2005 Maher Salah 2 Outline  Motivation • Software Comprehension • Architecture of Software Comprehension Environment • Software views / Case Study • Related Work • Conclusions July 25, 2005 Maher Salah 3 1

  2. Software maintenance: Relative Cost 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% 1970s Early 1980s Late 1980s Early 1990s New Development Software maintenance [Maod-1990] July 25, 2005 Maher Salah 4 Software maintenance: Cost Distribution 20% Corrective maintenance Adaptive maintenance Perfective maintenance 55% 25% ⇒ Approximately 80% of the maintenance effort is spent on non-corrective tasks [Swanson-1990] July 25, 2005 Maher Salah 5 Software maintenance: Cost Reduction  Rigorous design and thorough testing – Corrective maintenance  Limiting non-corrective changes – Enhancements – Adapting to hardware/software infrastructure changes – Not an option : System evolution depends on these changes to meet its user’s needs. July 25, 2005 Maher Salah 6 2

  3. Software maintenance: Cost Reduction  Reducing amount of effort spent on maintenance ½ the maintenance effort is spent on understanding the system’s logic and behavior. [Pigoski-1994] Þ Effective software comprehension tools July 25, 2005 Maher Salah 7 Outline • Motivation  Software Comprehension • Architecture of Software Comprehension Environment • Software views / Case Study • Related Work • Conclusions July 25, 2005 Maher Salah 8 Software Comprehension Source code Software Source code Fi lterin g & q uery Analyzers Extractor Program Entities views tool s Program Program Com piled binaries Profiler Relationships Store data into Program Gather data Filter and analyze data Software views repository July 25, 2005 Maher Salah 9 3

  4. Outline  Software Comprehension  Architecture of Software Comprehension Environment • Software Views / Case Study • Related Work • Conclusions July 25, 2005 Maher Salah 10 Architecture of the Software Comprehension Environment Analysis/Visualization Repository Subsystem Subsystem M o d e l i n g S M Q L ( A n a l y z e r s ) Data Gathering Subsystem S o u r c e S Q L Static analyzers Software Programs c o d e ( J D B C ) V i s u a l i z a t i o n ( P r e s e n t a t i o n / N a v i g a t i E x e c u t i o n Dynamic analyzers T r a c e s ( P r o f i l e r s ) � Feature-im plem entation view Languages models � Feature interaction view � Feature-sim ilarity view & � M odule-interaction view Program schema Trace Marker � Class-interaction view (Features) � Rem ote-interaction view July 25, 2005 Maher Salah 11 Data Gathering Subsystem Analysis/Visualization Repository Subsystem Subsystem M o d e l i n g S M Q L ( A n a l y z e r s ) Data Gathering Subsystem S o u r c e S Q L Software Programs Static analyzers c o d e (JDBC) V i s u a l i z a t i o n ( P r e s e n t a t i o n / N a v i g a t i E x e c u t i o n Dynamic analyzers T r a c e s ( P r o f i l e r s ) � Feature-im plem entation view Languages models � Feature interaction view & � Feature-sim ilarity view � M odule-interaction view Program schema Trace Marker � Class-interaction view (Features) � Rem ote-interaction view July 25, 2005 Maher Salah 12 4

  5. Data Gathering Subsystem • Program Facts/Data – Static: Entities and Relations – Dynamic: Entities, Relations and Events • Distributed Profiler – Local Profiler – Logical Time Server • Remote Interactions – Network interceptor  Endpoint July 25, 2005 Maher Salah 13 Data Gathering • Endpoint entity – Local and Remote host – Local and Remote port numbers – Time-stamp • Connects Relation Endpoint-A Local Host Remote Host Local Port Remote Port Time Delta < Threshold Local Host Remote Host Local Port Remote Port Time+Delta Endpoint-B July 25, 2005 Maher Salah 14 Example: Sequence Diagram Logical Time java.net Java.net. (Winsock) UserClass Sokect- Sokect- UserModule Ws2_32.DLL OutputStream InputStream EP T e (A) im write() EP(A) recv() EP(B) EP T e (B) im send() read() Java Program C/C++ Win32 Program July 25, 2005 Maher Salah 15 5

  6. TechReport: Remote-interaction view Search-by-author feature July 25, 2005 Maher Salah 16 Distributed Profiler Trace Marker Analysis/Visualization Repository Subsystem Subsystem Profiling Win32 Program Runtime events (Using Wdbg) (XML Format) A n a l y z e r s S M Q L Program -A Logical-Time Import Distributed Marked-Trace (dbimport) S Q L LogicalTimeServer Data Collection (JDBC) V i s u a l i z a t i o n ( P r e s e n t a t i o n ) Logical-Time Import Distributed Marked-Trace (dbimport) JDBC Compliant Profiling Java Program Runtime events D a t a b a s e (Using JvProf) (XML Format) (SQL Server) Program -B Trace Marker July 25, 2005 Maher Salah 17 Data Repository Analysis/Visualization Repository Subsystem Subsystem M o d e l i n g S M Q L ( A n a l y z e r s ) Data Gathering Subsystem S o u r c e S Q L Software Programs Static analyzers c o d e (JDBC) V i s u a l i z a t i o n ( P r e s e n t a t i o n / N a v i g a t i E x e c u t i o n Dynamic analyzers T r a c e s ( P r o f i l e r s ) � Feature-im plem entation view Languages models � Feature interaction view � Feature-sim ilarity view & � M odule-interaction view Program schema Trace Marker � Class-interaction view (Features) � Rem ote-interaction view July 25, 2005 Maher Salah 18 6

  7. Data Repository • Logical Models – Language definitions – Program data • Implementation – Relational database • Query/Manipulation Language – Manipulation: SQL – Query/retrieval: SMQL July 25, 2005 Maher Salah 19 Language Definitions • Model(General) = Graph(E g , R g ) E g : Set of entity types R g : Set of relation types • Java, example: • Model(Java) = Graph(E java , R java ) E java ⊂ E g : Entity types supported by Java R java ⊂ R g : Relation types supported by Java Such that the source and destination entity ∈ E java • C++, defining Model(C++) = Graph( E c++ , R c++ ) E c++ = E java ∪ {template, struct, typedef, function} - {interface, package} July 25, 2005 Maher Salah 20 SMQL: S oftware M odeling Q uery L anguage • Set-based: – Typed Set (SMQL Objects) • Entity Set • Relation Set • Event Set – Composite set – Generic Set • Operations – Union, intersection, Difference • Functions – SMQL Filters implement in Java – Closure, Composition, …, etc. July 25, 2005 Maher Salah 21 7

Recommend


More recommend