1
Introduction to Software Evolution
Introduction to Software Evolution Tijs van der Storm Paul Klint - - PowerPoint PPT Presentation
Introduction to Software Evolution Tijs van der Storm Paul Klint Anastasia Izmaylova Jurgen Vinju Atze van der Ploeg Davy Landman 1 Introduction to Software Evolution Global Schedule Lectures Wednesday: 09:00 11:00 week 44 51
1
Introduction to Software Evolution
2
Introduction to Software Evolution
3
Introduction to Software Evolution
4
Introduction to Software Evolution
5
Introduction to Software Evolution
– this includes lunchtime – in G0.10 & G0.12
– L017 on the ground floor
6
Introduction to Software Evolution
– Measuring source code – To find indications of good/bad quality – Predicting hard to maintain, costly, source code
– Mechanics using Rascal – Definition and correctness – Aggregation – Interpretation
7
Introduction to Software Evolution
– From source code to design – Visualization
– Mechanics using Rascal – Software Exploration – Software Understanding – Link with metrics
8
Introduction to Software Evolution
9
Introduction to Software Evolution
10
Introduction to Software Evolution
11
Introduction to Software Evolution
– Topic + motivation – Argumentation & literature – Title & Abstract
12
Introduction to Software Evolution
13
Introduction to Software Evolution
14
Introduction to Software Evolution
Distribution of languages in use, worldwide
Language Used in % of total COBOL 30 Assembler 10 C 10 C++ 10 550 other languages 40
15
Introduction to Software Evolution
– 750 Giga-lines of COBOL code, or – 900 Giga-lines of C code
16
Introduction to Software Evolution
– on average 5 errors (bugs) per function point – includes errors in requirements, design, coding,
17
Introduction to Software Evolution
Year New projects Enhancements Repairs Total 1950 90 3 7 100 1960 8,500 500 1,000 10,000 1970 65,000 15,000 20,000 100,000 1980 1,200,000 600,000 200,000 2,000,000 1990 3,000,000 3,000,000 1,000,000 7,000,000 2000 4,000,000 4,500,000 1,500,000 10,000,000 2010 5,000,000 7,000,000 2,000,000 14,000,000 2020 7,000,000 11,000,000 3,000,000 21,000,000
18
Introduction to Software Evolution
19
Introduction to Software Evolution
20
Introduction to Software Evolution
21
Introduction to Software Evolution
22
Introduction to Software Evolution
– maintenance is seen as after-the-fact activity – no integration with software development process
23
Introduction to Software Evolution
– Changes are made in response to changed requirements – The fundamental software structure is stable
– The architecture of the system is modified – Generally from a centralised to a distributed architecture
– No new functionality is added to the system but it is
24
Introduction to Software Evolution
– Business / IT alignment – Requirements change (legislation, new insights, efficiency) – Re-organization – Mergers / take-overs – New products, marketing actions – Market hypes (CRM, ERP, BPR, STP)
– Internet – Mobile – Updates of operating system, development environment, databases – Hardware
25
Introduction to Software Evolution
26
Introduction to Software Evolution
27
Introduction to Software Evolution
– 2* to 100* depending on the application
– Maintenance corrupts the software structure, making further
– old languages, compilers etc.
28
Introduction to Software Evolution
50 100 150 200 250 300 350 400 450 500 S ys tem 1 S ys tem 2 Development cos ts Maintenance cos ts $
29
Introduction to Software Evolution
30
Introduction to Software Evolution
– Complexity of control structures; – Complexity of data structures; – Object, method (procedure) and module size – Dependencies – Understandability & Changeability
31
Introduction to Software Evolution
– the structure of a program degrades until it becomes
32
Introduction to Software Evolution
33
Introduction to Software Evolution
Database User interface Services Ideal model for distribution Real legacy systems Database User interface Services
34
Introduction to Software Evolution
Start: Get (Time-on, Time-off, Time, Setting, Temp, Switch) if Switch = off goto off if Switch = on goto on goto Cntrld
goto loop
if Heating-status = off goto Sw-on goto loop Cntrld: if Time = Time-on goto on if Time = Time-off goto off if Time < Time-on goto Start if Time > Time-off goto Start if Temp > Setting then goto off if Temp < Setting then goto on Sw-off: Heating-status := off goto Switch Sw-on:Heating-status := on Switch: Switch-heating loop: goto Start
35
Introduction to Software Evolution
36
Introduction to Software Evolution
37
Introduction to Software Evolution
38
Introduction to Software Evolution
39
Introduction to Software Evolution
40
Introduction to Software Evolution
41
Introduction to Software Evolution
42
Introduction to Software Evolution
43
Introduction to Software Evolution
– Does software wear and tear? – Does software procreate and does software select
44
Introduction to Software Evolution
45
Introduction to Software Evolution
46
Introduction to Software Evolution
– (information) system that defeats further maintenance,
– requires increasing maintenance costs
– understanding and improvement of legacy systems – by means of reverse engineering, program
47
Introduction to Software Evolution
48
Introduction to Software Evolution
49
Introduction to Software Evolution
50
Introduction to Software Evolution
51
Introduction to Software Evolution
Extracted components New components
52
Introduction to Software Evolution
53
Introduction to Software Evolution
– architecture recovery – system understanding
– systematic repairs – code improvement/dialect conversion/translation – architecture improvement/change
54
Introduction to Software Evolution
55
Introduction to Software Evolution
56
Introduction to Software Evolution
57
Introduction to Software Evolution
– overall architecture – module dependencies & internal structure modules – database usage – simple metrics
58
Introduction to Software Evolution
59
Introduction to Software Evolution
60
Introduction to Software Evolution
– getting the right grammar is difficult – many parsing techniques break down
61
Introduction to Software Evolution
62
Introduction to Software Evolution
63
Introduction to Software Evolution
– Parsing and lexical analysis – Relation modeling (facts!) – Source code locations (links!) – Patterns (search) – Visits (replacement)
– Visualization – SVN, Git, SSH access – Etc. etc.
64
Introduction to Software Evolution
65
Introduction to Software Evolution
66
Introduction to Software Evolution
67
Introduction to Software Evolution
– lexical grammar (describes lexical syntax) – lexical scanner (recognizes lexical syntax)
68
Introduction to Software Evolution
– grammar (describes the context-free syntax) – syntax analyser, parser (recognizes context-free
– parse tree, syntax tree (tree that describes structure of
– abstract syntax tree (parse tree with textual elements
69
Introduction to Software Evolution
– are all variables declared? – are all expressions type correct? – are all procedure/methods called with correct
– type checking, compile-time analysis, model
70
Introduction to Software Evolution
– what is the effect of an assignment? – what is the value of an expression? – which method should be called? – what is the result of executing a procedure call?
– run-time semantics, interpreters, compilers
71
Introduction to Software Evolution
– count number of class declarations – count number of goto statements – determine the methods with more than 25 lines of
– determine the methods with McCabe complexity
72
Introduction to Software Evolution
– call graph construction – dead code determination
– run-time method selection in Java – reflection in Java – pointer indirection in C – run-time execution of strings as code
73
Introduction to Software Evolution
– False/true positives/negatives – PPV: precision – TPR: recall
– Precision vs Accuracy – Significant digits! – Units of measure!
74
Introduction to Software Evolution
75
Introduction to Software Evolution
76
Introduction to Software Evolution
77
Introduction to Software Evolution
78
Introduction to Software Evolution
79
Introduction to Software Evolution
80
Introduction to Software Evolution
81
Introduction to Software Evolution
82
Introduction to Software Evolution
– Installing and starting Eclipse + Rascal – Rascal tutor exploring
– Joost Visser from SIG (here) – Rascal theory (here) – Rascal interactive course (G0.18)
83
Introduction to Software Evolution
– Metrics – Visualization
– Think of your thesis!