1 / 67

Interconnection Styles

Interconnection Styles. export. export. use. M1. M4. use. use. use. M5. M2. SS4. SS2. M6. use. M3. export. SS3. SS1. S. Software Design Following the Export (Server) Style. SS1. Software Design Following the Export (Client) Style. ec. ec. use. M1. M4. use. use. use.

gaston
Télécharger la présentation

Interconnection Styles

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. Interconnection Styles Reverse Engineering (Interconnection Styles)

  2. export export use M1 M4 use use use M5 M2 SS4 SS2 M6 use M3 export SS3 SS1 S Software Design Following the Export (Server) Style Reverse Engineering (Interconnection Styles)

  3. SS1 Software Design Following the Export (Client) Style ec ec use M1 M4 use use use M5 M2 SS4 SS2 use M3 M6 ec SS3 S Reverse Engineering (Interconnection Styles)

  4. SS1 Software Design Following the Export Client / Export Style export ec ec export use M1 M4 use use use M5 M2 SS4 SS2 use M3 M6 ec export SS3 S Reverse Engineering (Interconnection Styles)

  5. SS1 Software Design Following the Import Style import import M1 M4 use use use use M5 M2 SS4 SS2 use M3 M6 SS3 S Reverse Engineering (Interconnection Styles)

  6. SS1 Software Design Following the Import / Export Style export import import export M1 M4 use use use use M5 M2 SS4 SS2 use M3 M6 export SS3 S Reverse Engineering (Interconnection Styles)

  7. SS1 Software Design Following the Tube Style tube tube M1 M4 use use use use M5 M2 SS4 SS2 tube use M3 M6 SS3 S Reverse Engineering (Interconnection Styles)

  8. Interconnection Style Formalism • An ISF specification consists of a finite set of logic rules. There are two kinds of ISF rules: • Permission: Determine the syntactically legal relations between the components of a software design. • Definition: Define new relations based on patterns of entities and relations. Reverse Engineering (Interconnection Styles)

  9. Interconnection Style Formalism (Cont’d) • Each rule consists of a finite set of entities and relations. • Entities represent design components and relations represent interconnections between these components. Reverse Engineering (Interconnection Styles)

  10. Design View Model-Theory View Datalog View export export export export export export export export export export export use use use use use export use use use use use use M1 M1 M1 M1 M1 M1 M4 M4 M4 M4 M4 M4 use use use use use use use use use use use use use SS4 SS4 SS4 SS4 SS4 M5 M5 M5 M5 M5 M5 SS2 SS2 SS2 SS2 SS2 M2 M2 M2 M2 M2 M2 SS4 SS2 use use use use use use M6 M6 M6 M6 M6 M6 M3 M3 M3 M3 M3 M3 export export export export export SS3 SS3 SS3 SS3 SS3 SS1 SS1 SS1 SS1 SS1 S S S S S export SS3 SS1 S Set of Mathematical Relations (Interpret.) Set of DatalogFacts input Union Satisfies? Set of Logic Formulas (Theory) Set of Datalog Rules satisfies style does not satisfy style model not model Wellformed? Yes/no Reverse Engineering (Interconnection Styles)

  11. Design Example export M2 use export use use M3 M4 use SS1.1 M5 SS2.1 use M1 M6 SS1 SS2 Reverse Engineering (Interconnection Styles)

  12. Design Example in Datalog Reverse Engineering (Interconnection Styles)

  13. Formal Definition of ISF • The syntax of ISF is described by presenting the visual symbols of the notation. • These symbols represent design: • entities • relations • rules • The semantics of ISF is described using Datalog. Reverse Engineering (Interconnection Styles)

  14. Formal Definition of ISF • The semantics of ISF is presented bottom-up: • semantics of ISF entities and relations • semantics of ISF rules in terms of the semantics of entities and relations Reverse Engineering (Interconnection Styles)

  15. ISF Entities • ISF entities are depicted as labeled rectangles. • Each ISF entity represents a set of typed design components such as: • modules, classes, subsystems, etc. • There are three types of entities: label label label Reverse Engineering (Interconnection Styles)

  16. Example of an ISF Entity • An example of an ISF entity is: • Formally:subsystem(SS) • where SS is a free variable. • Informally: “The set of all subsystems in a software design.” Subsystem Reverse Engineering (Interconnection Styles)

  17. ISF Relations • ISF relations are depicted as: • labeled edges • nested rectangles • Each ISF relation represents a relation of a software design such as: • containment (depicted as nested rectangles) • import • export • inherit, etc. Reverse Engineering (Interconnection Styles)

  18. ISF Containment Relations e2 e1 1. Entity contains simple entity subsystem subsystem subsystem subsystem e2 Contain(PSS,SS), subsystem(PSS) subsystem(SS) rtc_contain(PSS,SS), subsystem(PSS) subsystem(SS) e1 2. Entity contains transitive entity e2 e1 1. Entity contains permission entity Reverse Engineering (Interconnection Styles)

  19. ISF Edge Relations r e1 e2 1. Simple Relation r e1 e2 2. Negated Simple Relation r e1 e2 3. Reflexive Transitive Relation r e1 e2 4. Negated Reflexive Transitive Relation r e2 e1 5,6. Permission or Definition Relation Reverse Engineering (Interconnection Styles)

  20. subsystem subsystem subsystem subsystem subsystem subsystem subsystem subsystem Examples of Edge Relations use use use(SS1,SS2), subsystem(SS1), subsystem(SS2) not(use(SS1,SS2)), subsystem(SS1), subsystem(SS2) use use rtc_use(SS1,SS2), subsystem(SS1), subsystem(SS2) not(rtc_use(SS1,SS2)), subsystem(SS1), subsystem(SS2) tc_r(X,Y) :- r(X,Y). tc_r(X,Y) :- r(X,Z), tc_r(Z,Y). rtc_c(X,Y) :- X = Y. rtc_r(X,Y) :- tc_r(X,Y). Reverse Engineering (Interconnection Styles)

  21. ISF Rules:The Export Style (Part 1) PERMIT PERMIT export ss ss ss ss wf_export(PSS,SS) :- ss(PSS), ss(SS), contain(PSS,SS). ill_formed() :- export(X,Y), not(wf_export(X,Y)). wf_contain(PSS,SS) :- ss(PSS),ss(SS). ill_formed() :- contain(X,Y), not(wf_contain(X,Y)). well_formed_design() :- not(ill_formed()). Reverse Engineering (Interconnection Styles)

  22. ISF Rules:The Export Style (Part 2) Reverse Engineering (Interconnection Styles)

  23. Export Client / Export Style Reverse Engineering (Interconnection Styles)

  24. Import / Export Style (Part 1) Reverse Engineering (Interconnection Styles)

  25. Import / Export Style (Part 2) Reverse Engineering (Interconnection Styles)

  26. Tube Style (Part1) Reverse Engineering (Interconnection Styles)

  27. Tube Style (Part 2) Reverse Engineering (Interconnection Styles)

  28. On the Automatic Recovery of Style-Specific Structural Dependencies Reverse Engineering (Interconnection Styles)

  29. Introduction • Motivation • Definitions • MDG • Clustering • Interconnection Styles • ISF • Examples • Tool Reverse Engineering (Interconnection Styles)

  30. Motivation • Documentation problems: • Missing or inaccurate design documentation • Poorly documented code • Original programmers not available for consultation • Program understanding. Need for high-level information • Existing clustering techniques do not produce high-level dependencies. • Design validation Reverse Engineering (Interconnection Styles)

  31. Nodes represent modules Edges represent dependencies between modules (i.e. method invocation, variable reference, etc) Obtained automatically with Cia, Acacia, Chava Module Dependency Graph Reverse Engineering (Interconnection Styles)

  32. Example: Mini Tunis MDG Reverse Engineering (Interconnection Styles)

  33. Aggregate representation of MDG, that groups together modules that are tightly coupled Clusters represent subsystems Obtained automatically with Bunch Clustering Reverse Engineering (Interconnection Styles)

  34. Example: Mini Tunis after clustering Reverse Engineering (Interconnection Styles)

  35. A clustered system may be visualized as a tree Edges represent containment, use and style dependencies Nodes represent modules and subsystems Easier to visualize large systems Structure Graph Reverse Engineering (Interconnection Styles)

  36. Interconnection Styles • Regulate the interactions between modules and subsystems • High-level relations not present in source code or clustered system. • Can be described formally with the Interconnection Style Formalism (ISF) Reverse Engineering (Interconnection Styles)

  37. Example: Export Style • Export style facilitates the specification of subsystem interfaces. • If a subsystem S exports a module M, M belongs to S’s interface. • Modules outside of S can use modules belonging to S’s interface. Reverse Engineering (Interconnection Styles)

  38. M3 can use M4 because it is exported by SS21 and SS21 is exported by SS2. M6 cannot use M5 because it is not exported by SS21. If M6 did use M5 there would be a stylistic violation. Example: Export Style Reverse Engineering (Interconnection Styles)

  39. ISF • Visual notation that allows specification of constraints on configurations of components and dependencies • Rules are represented as directed labeled graphs • Nodes: modules and subsystems • Arrows: dependencies and containment relations Reverse Engineering (Interconnection Styles)

  40. ISF (cont’d) • Types of rules: • PERMISSION: define the set of well-formed configurations • DEFINITION: define new relations based on patterns of software components and relations. Reverse Engineering (Interconnection Styles)

  41. ISF Specification of Export Style Reverse Engineering (Interconnection Styles)

  42. Example: Mini Tunis after Edge Repair Reverse Engineering (Interconnection Styles)

  43. Tool • Style Editor • Enables the user to define custom interconnection styles visually • Edge Repair Utility • Takes structure graph and style and finds the missing structural dependencies automatically • Checks if a design satisfies stylistic constraints Reverse Engineering (Interconnection Styles)

  44. Integration of Reverse Engineering Tools Reverse Engineering (Interconnection Styles)

  45. Techniques • Edge Repair • Rule Checking • Code Generation Reverse Engineering (Interconnection Styles)

  46. Given Structure Graph Style definition Edge Repair Reverse Engineering (Interconnection Styles)

  47. Edge Repair • Goal: find the missing style dependencies such that: • Visibility between modules is minimized • No dependency (i.e., use or style) violates any stylistic constraint. Reverse Engineering (Interconnection Styles)

  48. Algorithms • Huge search space (i.e. cannot try all possible combinations) • Optimization methods: • Hill climbing: start with a random configuration and find better ones by making small changes • Edge removal: start with “full” configuration and remove edges until no better solution can be found • Genetic algorithm Reverse Engineering (Interconnection Styles)

  49. Fitness Function • Measures the quality of a configuration • Good: • Configurations with a large number of well-formed use relations • Bad: • Configurations with a large number of ill-formed style dependencies • Configurations with high visibility (many see relations) Reverse Engineering (Interconnection Styles)

  50. Simplistic visibility • Computing visibility is an O(N2) operation • Frequent operation • Approach: simplistic visibility • Approximation to standard visibility • Given by the number of style dependencies • O(1) operation • Drawback: does not work for some styles • Non-recursive (permission rules are not defined in terms of other permission rules) • Modules are exposed by direct (i.e., non-transitive) relations with their ancestors. Reverse Engineering (Interconnection Styles)

More Related