understanding the redundancy! of software systems
TRANSCRIPT
![Page 1: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/1.jpg)
Understanding the Redundancy!of Software Systems
Andrea Mattavelli
Research Advisor :!Research Co-Advisor :
Prof. Mauro Pezzè!Prof. Antonio Carzaniga
![Page 2: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/2.jpg)
Redundancy
Informally, a system is redundant when!it is able to perform the same functionality !by executing different code.
“
![Page 3: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/3.jpg)
Software Redundancy
Version 1
Version 2
Version n
Selection!Algorithm
...
Input
Input Checkpoint Execute Version Test
Output
Output
Exception Fail
Restore
Alternatives? FailNo
N-version Recovery Blocks
Yes
Software
![Page 4: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/4.jpg)
Software Redundancy
Version 1
Version 2
Version n
Selection!Algorithm
...
Input
Input Checkpoint Execute Version Test
Output
Output
Exception Fail
Restore
Alternatives? FailNo
N-version Recovery Blocks
Yes
Deliberate
![Page 5: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/5.jpg)
Modern software systems contain a form of redundancy that is indeed intrinsically present.
“Software RedundancyIntrinsic
![Page 6: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/6.jpg)
Intrinsic Redundancy: ExamplesDateTime t = new DateTime(); //... //get the beginning of the day for time tDateTime beginDay = t.millisOfDay().withMinimumValue();
Joda-Time
![Page 7: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/7.jpg)
DateTime t = new DateTime(); //... //get the beginning of the day for time tDateTime beginDay = t.millisOfDay().withMinimumValue(); = t.toDateMidnight().toDateTime(); = t.withTimeAtStartOfDay();
Joda-Time
Intrinsic Redundancy: Examples
![Page 8: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/8.jpg)
Joda-Time
MultiMap m = new MultiMap();//…//check if element is already in mapif (m.contains(x))
Google Guava
Intrinsic Redundancy: ExamplesDateTime t = new DateTime(); //... //get the beginning of the day for time tDateTime beginDay = t.millisOfDay().withMinimumValue(); = t.toDateMidnight().toDateTime(); = t.withTimeAtStartOfDay();
![Page 9: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/9.jpg)
Joda-Time
MultiMap m = new MultiMap();//…//check if element is already in mapif (m.contains(x)) if (m.elementSet().contains(x)) if (m.count(x) > 0)
Google Guava
Intrinsic Redundancy: ExamplesDateTime t = new DateTime(); //... //get the beginning of the day for time tDateTime beginDay = t.millisOfDay().withMinimumValue(); = t.toDateMidnight().toDateTime(); = t.withTimeAtStartOfDay();
![Page 10: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/10.jpg)
Joda-Time
MultiMap m = new MultiMap();//…//check if element is already in mapif (m.contains(x)) if (m.elementSet().contains(x)) if (m.count(x) > 0)
Google Guava
Intrinsic Redundancy: ExamplesDateTime t = new DateTime(); //... //get the beginning of the day for time tDateTime beginDay = t.millisOfDay().withMinimumValue(); = t.toDateMidnight().toDateTime(); = t.withTimeAtStartOfDay();
0 LOC!(0%)
2 LOC!(~0.1%)
![Page 11: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/11.jpg)
Security
Automatic repair
Test oracles
Self-healing
Studying Intrinsic RedundancyUsing
![Page 12: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/12.jpg)
Modern software systems contain a form of redundancy that is indeed intrinsically present.
“Studying Intrinsic RedundancyStudying
![Page 13: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/13.jpg)
What is its essence?Modern software systems contain a form of redundancy that is indeed intrinsically present.
“Studying Intrinsic RedundancyStudying
![Page 14: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/14.jpg)
How pervasive is it?
What is its essence?Modern software systems contain a form of redundancy that is indeed intrinsically present.
“Studying Intrinsic RedundancyStudying
![Page 15: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/15.jpg)
How pervasive is it?
What is its essence?
How to identify it?
Modern software systems contain a form of redundancy that is indeed intrinsically present.
“Studying Intrinsic RedundancyStudying
![Page 16: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/16.jpg)
Why is it present?How pervasive is it?
What is its essence?
How to identify it?
Modern software systems contain a form of redundancy that is indeed intrinsically present.
“Studying Intrinsic RedundancyStudying
![Page 17: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/17.jpg)
Why is it present?How pervasive is it?
What is its essence?
How to identify it?
Modern software systems contain a form of redundancy that is indeed intrinsically present.
“Studying Intrinsic RedundancyStudying
![Page 18: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/18.jpg)
Why is it present?How pervasive is it?
What is its essence?
How to identify it?
Modern software systems contain a form of redundancy that is indeed intrinsically present.
“Studying Intrinsic RedundancyStudying
![Page 19: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/19.jpg)
What Is Its Essence?
![Page 20: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/20.jpg)
redundancy=
+functional!
equivalenceexecution diversity
What Is Its Essence?
![Page 21: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/21.jpg)
redundancy=
+functional!
equivalenceexecution diversity
What Is Its Essence?
SA
SB
? ? ?
a1 a2 a3
a1 a2 a3
Observational Equivalence![Hennessy et al.]
![Page 22: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/22.jpg)
redundancy=
+functional!
equivalenceexecution diversity
What Is Its Essence?
![Page 23: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/23.jpg)
redundancy=
+functional!
equivalenceexecution diversity
What Is Its Essence?
com.google.collect.LinkedlistMap.putAll@216com.google.collect.LinkedlistMap.putAll@226com.google.collect.LinkedlistMap.putAll@227com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126!!!
com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126com.google.collect.LinkedlistMap.put@127com.google.collect.LinkedlistMap.put@132com.google.collect.LinkedlistMap.put@133!!
putAll(K key, Iterable values)put(K key, V value)
![Page 24: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/24.jpg)
How Pervasive Is It?
![Page 25: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/25.jpg)
Joda-Time
GraphStream
SWT
How Pervasive Is It?
![Page 26: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/26.jpg)
Joda-Time
4700+!equivalent method sequences
GraphStream
SWT
How Pervasive Is It?
![Page 27: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/27.jpg)
Intrinsic redundancy
![Page 28: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/28.jpg)
redundancy=
+functional!
equivalenceexecution diversity
What Is Its Essence?
SA
SB
? ? ?
a1 a2 a3
a1 a2 a3
com.google.collect.LinkedlistMap.putAll@216com.google.collect.LinkedlistMap.putAll@226com.google.collect.LinkedlistMap.putAll@227com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126!!!
com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126com.google.collect.LinkedlistMap.put@127com.google.collect.LinkedlistMap.put@132com.google.collect.LinkedlistMap.put@133!!
putAll(K key, Iterable values)put(K key, V value)
Intrinsic redundancy
![Page 29: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/29.jpg)
How Pervasive Is It?redundancy
=
+functional!
equivalenceexecution diversity
What Is Its Essence?
SA
SB
? ? ?
a1 a2 a3
a1 a2 a3
com.google.collect.LinkedlistMap.putAll@216com.google.collect.LinkedlistMap.putAll@226com.google.collect.LinkedlistMap.putAll@227com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126!!!
com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126com.google.collect.LinkedlistMap.put@127com.google.collect.LinkedlistMap.put@132com.google.collect.LinkedlistMap.put@133!!
putAll(K key, Iterable values)put(K key, V value)
Intrinsic redundancy
![Page 30: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/30.jpg)
How Pervasive Is It?
How to Identify It?
pop()
Object o = s.peek();int index = s.size();index = index - 1;s.remove(index);return o;
Stack s = new Stack();s.push(0);s.push(1);!Stack s = new Stack();s.push(-174);
Execution Scenarios
redundancy=
+functional!
equivalenceexecution diversity
What Is Its Essence?
SA
SB
? ? ?
a1 a2 a3
a1 a2 a3
com.google.collect.LinkedlistMap.putAll@216com.google.collect.LinkedlistMap.putAll@226com.google.collect.LinkedlistMap.putAll@227com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126!!!
com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126com.google.collect.LinkedlistMap.put@127com.google.collect.LinkedlistMap.put@132com.google.collect.LinkedlistMap.put@133!!
putAll(K key, Iterable values)put(K key, V value)
Intrinsic redundancy
![Page 31: Understanding the Redundancy! of Software Systems](https://reader034.vdocuments.site/reader034/viewer/2022051711/58667fac1a28abe33f8b5952/html5/thumbnails/31.jpg)
How Pervasive Is It?
How to Identify It?
pop()
Object o = s.peek();int index = s.size();index = index - 1;s.remove(index);return o;
Stack s = new Stack();s.push(0);s.push(1);!Stack s = new Stack();s.push(-174);
Execution Scenarios
Design for reusability
Non-functional requirements
Replicated Functionalities
Backward compatibility
Why?
redundancy=
+functional!
equivalenceexecution diversity
What Is Its Essence?
SA
SB
? ? ?
a1 a2 a3
a1 a2 a3
com.google.collect.LinkedlistMap.putAll@216com.google.collect.LinkedlistMap.putAll@226com.google.collect.LinkedlistMap.putAll@227com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126!!!
com.google.collect.LinkedlistMap.put@123com.google.collect.LinkedlistMap.put@125com.google.collect.LinkedlistMap.put@126com.google.collect.LinkedlistMap.put@127com.google.collect.LinkedlistMap.put@132com.google.collect.LinkedlistMap.put@133!!
putAll(K key, Iterable values)put(K key, V value)
Intrinsic redundancy