lessons in software evolution learned by listening to smalltalk
DESCRIPTION
Invited talk at SOFSEM 2010. Full paper (PDF) is available for download. http://bit.ly/8awi30TRANSCRIPT
![Page 1: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/1.jpg)
Lessons in Software EvolutionLearned by Listening to Smalltalk
Oscar Nierstraszscg.unibe.ch
![Page 2: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/2.jpg)
Research Team
Adrian LienhardAdrian Kuhn
Fabrizio PerinLukas RenggliJorge Ressia
David RoethlisbergerNiko Schwarz
Toon VerwaestErwann Wernli
![Page 3: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/3.jpg)
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
Roadmap
![Page 4: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/4.jpg)
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
Roadmap
The trouble with changeThe trouble with change
![Page 5: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/5.jpg)
How we enable change
Package what is stable
Define an interface for configuration
![Page 6: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/6.jpg)
A brief history of software packaging
![Page 7: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/7.jpg)
The Trouble with Software Change
Understanding the system
Understanding the system
Bridging the gapBridging the gap
Specifying changeSpecifying change
Managing changeManaging change
Understanding change
Understanding change
![Page 8: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/8.jpg)
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
Roadmap
Smalltalk in a NutshellSmalltalk in a Nutshell
![Page 9: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/9.jpg)
To thine own self be true
Less is MoreLess is More The object model “is as simple as possible, but no simpler”
The object model “is as simple as possible, but no simpler”
Reify EverythingReify Everything
You can change a Running SystemYou can change a Running System
“Everything is an object” is applied consistently
“Everything is an object” is applied consistently
Smalltalk models itself, so changing the model changes the system
Smalltalk models itself, so changing the model changes the system
![Page 10: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/10.jpg)
The origins of Smalltalk
Alan Kay’s Dynabook project (1968)
Alan Kay’s Dynabook project (1968)
Alto — Xerox PARC (1973)
Alto — Xerox PARC (1973)
![Page 11: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/11.jpg)
Smalltalk architecture
ImageImage
ChangesChanges
Virtual machineVirtual machine
SourcesSources
![Page 12: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/12.jpg)
Everything happens by sending messages
2 raisedTo: 1 + 3 factorial2 raisedTo: 1 + 3 factorial 128128
First unary, then binary, then keyword:First unary, then binary, then keyword:
factorial+raisedTo:
![Page 13: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/13.jpg)
<= aPoint "Answer whether the receiver is neitherbelow nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
<= aPoint "Answer whether the receiver is neitherbelow nor to the right of aPoint."
^ x <= aPoint x and: [y <= aPoint y]
A typical method
(2@3) <= (5@6)(2@3) <= (5@6) truetrue
Keyword messageKeyword message
Instance variableInstance variable
BlockBlock
Binary messageBinary message
Unary messageUnary message
Method nameMethod name ArgumentArgument CommentComment
ReturnReturn
![Page 14: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/14.jpg)
Everything is an object
![Page 15: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/15.jpg)
Everything is an object
![Page 16: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/16.jpg)
You can change a running system
AKA: “The Debugger is your Friend” AKA: “The Debugger is your Friend”
![Page 17: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/17.jpg)
Pharo — an multi-platform, open-source Smalltalk
Pharo by Example. Andrew Black, et al. Square Bracket Associates, 2009.
Pharo by Example. Andrew Black, et al. Square Bracket Associates, 2009.
![Page 18: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/18.jpg)
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
Roadmap
Taming Software ChangeTaming Software Change
![Page 19: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/19.jpg)
Moose: a platform for reverse engineering
![Page 20: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/20.jpg)
Smalltalk
NavigationMetrics
QueryingGrouping
Smalltalk
Java
C++
COBOL
…
CDIF
XMI
ExternalParser
CodeCrawler
ConAn Van ...Hapax
Extensible meta model
Model repository
Explicit metamodels enable change
The Story of Moose: an Agile Reengineering Environment. Oscar Nierstrasz, Stéphane Ducasse, and Tudor Gîrba. ESEC/FSE 2005
The Story of Moose: an Agile Reengineering Environment. Oscar Nierstrasz, Stéphane Ducasse, and Tudor Gîrba. ESEC/FSE 2005
![Page 21: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/21.jpg)
Moose visualizations
![Page 22: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/22.jpg)
Programming visualizations with CodeCrawler
![Page 23: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/23.jpg)
Scripting visualizations with Mondrian
Mondrian: An Agile Visualization Framework. Michael Meyer, Tudor Gîrba, and Mircea Lungu. SoftVis 2006
Mondrian: An Agile Visualization Framework. Michael Meyer, Tudor Gîrba, and Mircea Lungu. SoftVis 2006
![Page 24: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/24.jpg)
Moose — a platform for collaborative research
![Page 25: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/25.jpg)
Feature inheritance ≠ specialization
![Page 26: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/26.jpg)
First-class traits enable fine-grained reuse
![Page 27: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/27.jpg)
Class = superclass + state + traits + glue
Traits provide and require methods
Traits provide and require methods
The composing class retains control
The composing class retains control
Traits: A Mechanism for fine-grained Reuse. Stéphane Ducasse, Oscar Nierstrasz, Nathanael Schärli, Roel Wuyts and Andrew Black. ACM TOPLAS, March 2006
Traits: A Mechanism for fine-grained Reuse. Stéphane Ducasse, Oscar Nierstrasz, Nathanael Schärli, Roel Wuyts and Andrew Black. ACM TOPLAS, March 2006
![Page 28: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/28.jpg)
Traits and Classes share common behaviour
![Page 29: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/29.jpg)
First-class aliases enable object flow analysis
Practical Object-Oriented Back-in-Time Debugging. Adrian Lienhard, Tudor Gîrba, and Oscar Nierstrasz. ECOOP 2008.
Practical Object-Oriented Back-in-Time Debugging. Adrian Lienhard, Tudor Gîrba, and Oscar Nierstrasz. ECOOP 2008.
![Page 30: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/30.jpg)
A back-in-time VM with object flow analysis
![Page 31: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/31.jpg)
GC remembers only what is needed
![Page 32: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/32.jpg)
How to manage change in a running system?
Encapsulating and Exploiting Change with Changeboxes. Marcus Denker, et al. ICDL 2007.
Encapsulating and Exploiting Change with Changeboxes. Marcus Denker, et al. ICDL 2007.
![Page 33: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/33.jpg)
First-class changes enable scoped evolution
![Page 34: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/34.jpg)
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
The trouble with changeSmalltalk in a NutshellTaming Software ChangeEpilogue — Bringing Models Closer to Code
Roadmap
Epilogue — Bringing Models Closer to CodeEpilogue — Bringing Models Closer to Code
![Page 35: Lessons in Software Evolution Learned by Listening to Smalltalk](https://reader035.vdocuments.net/reader035/viewer/2022062513/555bde37d8b42a38078b4814/html5/thumbnails/35.jpg)
Systems that support change need to be model-centric and context-aware
Model-centric systems are self-describing and can be adapted
dynamically
Model-centric systems are self-describing and can be adapted
dynamically
Context-aware systems control the scope of change to static or
dynamic contexts
Context-aware systems control the scope of change to static or
dynamic contexts