What architects should know about reverse engineering and reengineering Rainer Koschke University of Bremen, Germany Arbeitsgruppe Softwaretechnik Fachbereich Mathematik und Informatik Universit¨ at Bremen 8th of November 2005 Architecture Reconstruction What architects should know about reverse engineering 2005-11-10 and reengineering Rainer Koschke University of Bremen, Germany Arbeitsgruppe Softwaretechnik Fachbereich Mathematik und Informatik Universit¨ at Bremen 8th of November 2005 I am a professor for software engineering at the University of Bremen in Germany ( http://www.informatik.uni-bremen.de/ ∼ koschke/ ). My research interests are primarily in the fields of software engineering and program analyses. My current research includes architecture recovery, feature location, program analyses, clone detection, and reverse engineering. I am one of the founders of the Bauhaus research project ( http://www.bauhaus-stuttgart.de ), founded in 1997 to develop methods and tools to support software maintainers in their daily job through reconstructed architectural and source code views. I am teaching reengineering and software engineering. I hold a doctoral degree in computer science from the University of Stuttgart, Germany. I am the current Chair of the IEEE TCSE committee on reverse engineering http://www.tcse.org/revengr/ and initiator and maintainer of the IEEE TCSE online bibliography on reengineering ( http://www.iste.uni-stuttgart.de/ps/reengineering/index.html ). I should also note that – beyond teaching software engineering and reengineering at the University of Bremen – I am about to create a spin-off with two of my former colleagues at Stuttgart that specializes in offering tools and services for architecture reconstruction. The company Bauhaus Software Technologies ( http://www.bauhaus-tec.com ) builds on about 8 years of research of the Bauhaus project.
Computer Science Building in Stuttgart The building at the time of delivery Rainer Koschke What architects should know about reverse engineering and reengineering 8 Nov. 2005 2 Computer Science Building in Stuttgart Architecture Reconstruction The building at the time of delivery 2005-11-10 Architecture The delivered product Computer Science Building in Stuttgart Before I get to the topic, let me give you some background on where I come from. About one year ago, I was a postdoc at the University of Stuttgart. Only one year before I left Stuttgart to become a professor at the University of Bremen, we moved into a new computer science building. Here, you see a photograph of it. Doesn’t it have a beautiful archictecture? It is a really hot building – I remember the 40 degree celsius or 104 degree Fahrenheit we had during summertime. We have these very large windows to let all the light in. OK, the parts you can actually open look like a mixture of a safe and a loophole. Needless to say that we needed to cut the budget and had to cancel the air-conditioning. Well, you cannot have everything. OK, the building is not necessarily functional, but at least it is beautiful – that’s what the architect says. But anyway, it is a really beautiful building. The architect didn’t allow us to build a shield in front of the building because it would compromise the beauty of this building. He does not have an office in this building.
Design models The envisioned building Rainer Koschke What architects should know about reverse engineering and reengineering 8 Nov. 2005 3 Design models Architecture Reconstruction 2005-11-10 Architecture The envisioned building Architectural models Design models Like every other complex engineering product, it underwent a thorough design process. Several models have been created. Here, you see just two of them. They really helped us to imagine how life would be in this building. OK, I admit, we didn’t foresee the problem with this summer heat. But anyway, it is a really beautiful building.
Different architectural views Plans for the implementation Rainer Koschke What architects should know about reverse engineering and reengineering 8 Nov. 2005 4 Different architectural views Architecture Reconstruction Plans for the implementation 2005-11-10 Architecture Architectural models Different architectural views After more coarse-grained models, several other architectural views were created. Here, you see the mapping of functions onto levels and rooms. To your right, you see the network wires for the rooms and the power outlets. It is a negligible detail of the implementation that we lost our detailed plans about the power system. Such is life. But anyway, it is a really beautiful building.
Computer Science Building in Stuttgart After delivery: Use and Adjustments Rainer Koschke What architects should know about reverse engineering and reengineering 8 Nov. 2005 5 Computer Science Building in Stuttgart Architecture Reconstruction After delivery: Use and Adjustments 2005-11-10 Architecture Architectural models Computer Science Building in Stuttgart When we finally moved into the building, we soon started to adapt it to our needs. I personally rode my bicycle to the university; but my room was at the first floor. So, I built a ramp to my office. My colleagues preferred a balcony. One department demolished the walls between their offices to give way to an open-plan office. Only recently – now in Bremen – I checked the web cam on the university campus again and found this: . . .
Views in software maintenance The building after several years of “maintenance”. . . Rainer Koschke What architects should know about reverse engineering and reengineering 8 Nov. 2005 6 Views in software maintenance Architecture Reconstruction The building after several years of “maintenance”. . . 2005-11-10 Architecture Architecture in the maintenance phase Views in software maintenance After a pretty short time the building has undergone a series of changes. It used to be a really beautiful building. I heard rumors that the architects are now planning to build a third floor on top of the existing building to increase the capacity. Guess what they will do. They will get the original plans from the drawer and start planning based on that information. But unlike in software, the construction workers will immediately refuse to enter this building. Sometimes, I envy people in the construction business. In software, it is much more difficult to assess the actual state of the architecture.
Software Architecture in Textbooks Modern canonical compiler according to Shaw and Garlan (1993) Symbol Table Text Syntactic Semantic Code Lexical Code Optimization Analysis Analysis Analysis Generation AST Rainer Koschke What architects should know about reverse engineering and reengineering 8 Nov. 2005 7 Software Architecture in Textbooks Architecture Reconstruction 2005-11-10 Software architecture Modern canonical compiler according to Shaw and Garlan (1993) Symbol Idealized software architecture Table Text Lexical Syntactic Semantic Code Code Optimization Analysis Analysis Analysis Generation Software Architecture in Textbooks AST Alright. I should talk about software—but, haven’t I? In software, one of our most powerful weapon is abstraction. Software architecture is an abstraction. Here is one example presented by Mary Shaw in her book on software architecture. It is the reference architecture of modern compilers. It shows the individual steps in the transition from source text to object code. These steps are connected through two data structures: the abstract syntax tree and the associated symbol table. It is interesting to note that the picture does not show a connection between the symbol table and the abstract syntax tree, although there should be one. Moreover, in really modern compilers, you would have an additional intermediate representation that abstracts from the source language; and then the back end and optimization would not access the optimization and abstract syntax tree. But anyway, isn’t that a beautiful architecture?
Software Architecture in Practice Modern canonical compiler according to real life Rainer Koschke What architects should know about reverse engineering and reengineering 8 Nov. 2005 8 Software Architecture in Practice Architecture Reconstruction Modern canonical compiler according to real life 2005-11-10 Software architecture Software architecture in practice Software Architecture in Practice Now if you look at the implementation of modern compilers, you find a somewhat different picture at first sight. Here, you see the files of a relatively new C compiler for micro processors. The edges represent various dependencies among these files. Various dependencies can be distinguished. I turned them pale to reduce the visual clutter. The interesting question now is “how does this picture relate to the architecture I just showed?” If you have do not have an immediate answer to this question, you must reconstruct this connection.
Recommend
More recommend