1 / 21

Computer Systems & Architecture Lesson 4

Computer Systems & Architecture Lesson 4. 8. Reconstructing Software Architectures. 8. Reconstructing Software Architecture. Objectives Describe why we need to reconstruct the software architecture Explain about the database construction

joann
Download Presentation

Computer Systems & Architecture Lesson 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Systems & ArchitectureLesson 4 8. Reconstructing Software Architectures

  2. 8. Reconstructing Software Architecture Objectives • Describe why we need to reconstruct the software architecture • Explain about the database construction • List the importance of information extraction in software architecture

  3. 8.1 Introduction • Suppose we have a system that already exists, but we do not know its architecture. Perhaps the architecture was never recorded by the original developers. • Perhaps it was recorded but the documentation has been lost. Or perhaps it was recorded but the documentation is no longer synchronized with the system after a series of changes. • How do we maintain such a system? How do we manage its evolution to maintain the quality attributes that its architecture has provided for us?

  4. The workbench approach • Architecture reconstruction requires tool support, but no single tool or tool set is always adequate to carry it out. • For one thing, tools tend to be language-specific and we may encounter anu number of languages in the artifacts we examine. • A workbench should be open and provide a lightweight integration framework whereby tools added to the tool set do not affect the existing tools or data unnecessarily.

  5. Software architecture reconstruction comprises the following activities, carried out iteratively: Information extraction Database construction View fusion Reconstruction Reconstruction activities

  6. Information extraction involves analyzing a system’s existing design and implementation artifacts to construct a model of it. The result is a set of information placed in a database, which is used in the view fusion activity to construct a view of the system. Information extraction is a blend of the ideal – what information do you want to discover about the architecture that will most help you meet the goals of your reconstruction effort – and the practical – what information can your available tools actually extract and present. 8.2 Information extraction

  7. From the source artifacts and other artifacts, you can identify and capture the elements of interest within the system and their relationships to obtain several base system views. Guidelines • The following are some practical considerations in applying this step of the method. • Use the ‘least effort’ extraction. • Validate the information you have extracted. • Extract dynamic information where required.

  8. The extracted information is converted into standard format for storage in a database during database construction. It is necessary to choose a database model. When doing so, consider the following: It should be well-known model, to make replacing one database implementation with another relatively simple. It should allow for efficient queries, which is important given that source models can be quite large. 8.3 Database construction

  9. It should support remote access of the database from one or more geographically distributed user interfaces. • It supports view fusion by combining information from various tables. • It supports query languages that can express architectural patterns. • Checkpointing should be supported by implementations, which means that intermediate results can be saved.

  10. Conversion of the extracted information to SQL format Extracted View Rigi Standard Form SQL Code

  11. The Dali workbench, for example, uses a relational database model. It converts the extracted views into Rigi Standard Form. • This format is then read in by a perl script and output in a format that includes the necessary SQL code to build the relational tables and populate them with the extracted information. The above diagram shows an outline of this process.

  12. Guidelines • When constructing the database, consider the following. • Build database tables from the extracted relations to make processing of the data views easier during view fusion. • As with any database contraction, carefully consider the database design before you get started. • Use simple lexical tools like perl and awk to change the format of data that was extracted using any tools into a format that can be used by the workbench.

  13. 8.4 View fusion • View fusion involves defining and manipulating extracted information to reconcile, augment and establish connections between the elements. • Different forms of extraction should provide complementary information. Fusion is illustrated using the examples given in the following sections.

  14. Improving a view • Consider the two excerpts shown in the below figure, which are from the sets of methods extracted from a system implemented in C++. • These tables include static and dynamic information about an object-oriented segment of code. • We can see from the dynamic information that, for example, list::getnth is called. • However, this method is not included in the static analysis because the static extractor tool missed it.

  15. InputValue::GetValue InputValue::SetValue List::() List::length List::attachr List::detachr PrimitiveOp::Compute InputValue::GetValue InputValue::SetValue InputValue::-InputValue InputValue::InputValue List::() List::length List::getnth List::list Arithmeticop::Compute Static and dynamic data information about the class-contains-method relation

  16. Also, the calls to the constructor and destructor methods of Inputvalue and List are not included in the static information and need to be added to the class/method table that reconciles both source of information. • In addition, the static extraction in this example shows that the PrimitiveOP class has a method called Compute. The dynamic extraction results show no such class, but they do show classes, such as ArithmeticOp, which has a Compute method and is in fact a subclass of PrimitiveOp.

  17. Disambiguating function calls • In a multi-process application, name clashes are likely to occur. • For example, several processes might have a procedure called main. It is important that clashes be identified and disambiguated within the extracted views. • Once again, by fusing information that can be easily extracted, we can remove this potential ambiguity.

  18. Guidelines • The following are some practical considerations in applying this step of the method. • Fuse tables when no single extracted table provides the needed information. • Fuse table when there is ambiguity within one of them, and it is not possible to disambiguate using a single table. • Consider different extraction techniques to extract different information: for example you can use dynamic and static extraction.

  19. 8.5 Reconstruction • At this point, the view information has been extracted, stored and refined or augmented to improve its quality. • The reconstruction operates on views to reveal broad, coarse-grained insights into the architecture. Reconstruction consists of two primary activities: visualization and interaction and pattern definition and recognition. • Visualization and interaction provides a mechanism by which the user may interactively visualize, explore and manipulate views.

  20. Pattern definition and recognition provides facilities for architectural reconstruction: the definition and recognition of the code manifestation of architectural patterns. Guidelines • The following are some practical considerations in applying this step of the method. • Be prepared to work with the architect closely and to iterate several times on the architectural abstractions that you create.

  21. When developing code segments, try to build ones that are succinct and that do not list every source element. • Code segments can be based on naming conventions, if the naming conventions are used consistently throughout the system. • Code segments can be used on the directory structure where files and functions are located. • Architecture reconstruction is the effort of redetermining architectural decisions, given only the result of these decisions in the actual artifacts.

More Related