Graph Structurings. 16. How to Structure Large Models - Obligatory Reading. Ø T. Fischer, Jörg Niere, L. Torunski, and Albert Zündorf, 'Story

Similar documents
16. How to Structure Large Models and Programs with Graph Structurings

30 Transformational Design with Essential Aspect Decomposition: Model-Driven Architecture (MDA)

Aspect Decomposition: Model-Driven Architecture (MDA) 30 Transformational Design with Essential. References. Ø Optional: Ø Obligatory:

30 Transformational Design with Essential Aspect Decomposition: Model-Driven Architecture (MDA)

31) Feature Models and MDA for Product Lines

Lecture 8: Verification and Validation

CS 4407 Algorithms Greedy Algorithms and Minimum Spanning Trees

ECE250: Algorithms and Data Structures Trees

Search Trees. Chapter 10. CSE 2011 Prof. J. Elder Last Updated: :51 PM

The Buddy System. A Distributed Reputation System Based On Social Structure 1

Chapter 8: Recursion

Linear Tabling Strategies and Optimization Techniques

Constraint satisfaction problems. Lirong Xia

Functional Requirements for a Secure Electronic Voting System

Uninformed search. Lirong Xia

Comparison Sorts. EECS 2011 Prof. J. Elder - 1 -

Decomposition and Complexity of Hereditary History Preserving Bisimulation on BPP

20 Design Methods - An Overview

c M. J. Wooldridge, used by permission/updated by Simon Parsons, Spring

Designing police patrol districts on street network

Event Based Sequential Program Development: Application to Constructing a Pointer Program

Midterm Review. EECS 2011 Prof. J. Elder - 1 -

Backoff DOP: Parameter Estimation by Backoff

Subreddit Recommendations within Reddit Communities

Network Indicators: a new generation of measures? Exploratory review and illustration based on ESS data

File Systems: Fundamentals

Lecture 6 Cryptographic Hash Functions

University of Utah Western Political Science Association

An Algorithmic and Computational Approach to Optimizing Gerrymandering

HASHGRAPH CONSENSUS: DETAILED EXAMPLES

Mixed-Strategies for Linear Tabling in Prolog

Overview. Ø Neural Networks are considered black-box models Ø They are complex and do not provide much insight into variable relationships

17.1 Introduction. Giulia Massini and Massimo Buscema

Hoboken Public Schools. Project Lead The Way Curriculum Grade 7

USDL Variant Management. Dr. Daniel Oberle, Senior Researcher, SAP Research Karlsruhe Gunther Stuhec, Standards Architect, SAP AG Walldorf

Experiments on Data Preprocessing of Persian Blog Networks

Computational Social Choice: Spring 2017

Deadlock. deadlock analysis - primitive processes, parallel composition, avoidance

CS 5523 Operating Systems: Intro to Distributed Systems

Hat problem on a graph

Predicting Information Diffusion Initiated from Multiple Sources in Online Social Networks

Users reading habits in online news portals

Estimating the Margin of Victory for Instant-Runoff Voting

We should share our secrets

The study of a new gerrymandering methodology

CSE 308, Section 2. Semester Project Discussion. Session Objectives

Objec&ves. Review. So-ware Quality Metrics Sta&c Analysis Tools Refactoring for Extensibility

Minimum Spanning Tree Union-Find Data Structure. Feb 28, 2018 CSCI211 - Sprenkle. Comcast wants to lay cable in a neighborhood. Neighborhood Layout

New York State Social Studies High School Standards 1

Hoboken Public Schools. Project Lead The Way Curriculum Grade 8

Prof. Dr. Bernhard Neumärker Summer Term 2016 Albert-Ludwigs-Universität Freiburg. Constitutional Economics. Exam. July 28, 2016

IDENTIFYING FAULT-PRONE MODULES IN SOFTWARE FOR DIAGNOSIS AND TREATMENT USING EEPORTERS CLASSIFICATION TREE

Quality of Service in Optical Telecommunication Networks

NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

Political Districting for Elections to the German Bundestag: An Optimization-Based Multi-Stage Heuristic Respecting Administrative Boundaries

Michael Laver and Ernest Sergenti: Party Competition. An Agent-Based Model

WORLD INTELLECTUAL PROPERTY ORGANIZATION GENEVA SPECIAL UNION FOR THE INTERNATIONAL PATENT CLASSIFICATION (IPC UNION) AD HOC IPC REFORM WORKING GROUP

Combating Friend Spam Using Social Rejections

The Australian Society for Operations Research

A representation theorem for minmax regret policies

A Calculus for End-to-end Statistical Service Guarantees

Hyo-Shin Kwon & Yi-Yi Chen

Design and Analysis of College s CPC-Building. System Based on.net Platform

How hard is it to control sequential elections via the agenda?

Integrative Analytics for Detecting and Disrupting Transnational Interdependent Criminal Smuggling, Money, and Money-Laundering Networks

Two-Way Equational Tree Automata for AC-like Theories: Decidability and Closure Properties

Cluster Analysis. (see also: Segmentation)

Polydisciplinary Faculty of Larache Abdelmalek Essaadi University, MOROCCO 3 Department of Mathematics and Informatics

Aggregating Dependency Graphs into Voting Agendas in Multi-Issue Elections

12) Validation of Graph-Based Models (Analysis and Consistency of Models)

Explaining rational decision making by arguing

Analyzing and Representing Two-Mode Network Data Week 8: Reading Notes

FOURIER ANALYSIS OF THE NUMBER OF PUBLIC LAWS David L. Farnsworth, Eisenhower College Michael G. Stratton, GTE Sylvania

Control Complexity of Schulze Voting

Networked Games: Coloring, Consensus and Voting. Prof. Michael Kearns Networked Life NETS 112 Fall 2013

Computational Social Choice: Spring 2007

Randomized Pursuit-Evasion in Graphs

European Administrative Governance

Drafting Legislation Using XML in the U.S. House of Representatives

IBM Cognos Open Mic Cognos Analytics 11 Part nd June, IBM Corporation

Influence in Social Networks

Republic of Serbia SUPREME COURT OF CASSATION I Su 1 116/ B e l g r a d e

NEXUS: AN INTELLIGENT AGENT MODEL OF SUPPORT BETWEEN SOCIAL GROUPS

The Effectiveness of Receipt-Based Attacks on ThreeBallot

Satisfaction Approval Voting

Priority Queues & Heaps

Randomized Pursuit-Evasion in Graphs

Learning Expectations

Guided Study Program in System Dynamics System Dynamics in Education Project System Dynamics Group MIT Sloan School of Management 1

Priority Queues & Heaps

Bribery in voting with CP-nets

Trusted Logic Voting Systems with OASIS EML 4.0 (Election Markup Language)

PCGENESIS PAYROLL SYSTEM OPERATIONS GUIDE

International Association of Procedural Law

Subjectivity Classification

Tie Breaking in STV. 1 Introduction. 3 The special case of ties with the Meek algorithm. 2 Ties in practice

Core competencies in LIS education: professional, generic and personal competencies for the higher education LIS sector

Please reach out to for a complete list of our GET::search method conditions. 3

Conflict Analysis and Mediation Entry Points

Large scale elections by coordinating electoral colleges

Transcription:

Fakultät Informatik, Institut für Software- und Multimediatechnik, Lehrstuhl für Softwaretechnologie 16. How to Structure Large Models - Graph Structurings Prof. Dr. U. Aßmann Technische Universität Dresden Institut für Software- und Multimediatechnik Gruppe Softwaretechnologie http://st.inf.tu-dresden.de Version 12-1.1, 05.12.12 1. TopSorting (Layering) 2. Strongly Connected Components 3. Reducibility 4. Summary of Structurings Obligatory Reading Ø Jazayeri Chap 3. If you have other books, read the lecture slides carefully and do the exercise sheets Ø F. Klar, A. Königs, A. Schürr: "Model Transformation in the Large", Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on the foundations of software engineering, New York: ACM Press, 2007; ACM Digital Library Proceedings, 285-294. http://www.idt.mdh.se/esec-fse-2007/ Ø Tom Mens, Pieter Van Gorp. A Taxonomy of Model Transformation. Electronic Notes in Theoretical Computer Science 152 (2006) 125 142, doi:10.1016/j.entcs.2005.10.021 Ø T. Mens. On the Use of Graph Transformations for Model Refactorings. In GTTSE 2005, Springer, LNCS 4143 http://www.springerlink.com/content/5742246115107431/ Ø T. Fischer, Jörg Niere, L. Torunski, and Albert Zündorf, 'Story Diagrams: A new Graph Rewrite Language based on the Unified Modeling Language', in Proc. of the 6th International Workshop on Theory and Application of Graph Transformation (TAGT), Paderborn, Germany (G. Engels and G. Rozenberg, eds.), LNCS 1764, pp. 296--309, Springer Verlag, November 1998. http://www.upb.de/cs/ ag-schaefer/veroeffentlichungen/quellen/papers/1998/ 2

Reducibility Ø [Tarjan74] Robert E. Tarjan. Testing flow graph reducibility. Journal Computer System Science, 9:355-365, 1974. Ø [ASU86] Alfred A. Aho, R. Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986. 3 Further Reading Ø Reducible graphs Ø [ASU86] Alfred A. Aho, R. Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986. Ø Search for these keywords at Ø http://scholar.google.com Ø http://citeseer.ist.psu.edu Ø http://portal.acm.org/guide.cfm Ø http://ieeexplore.ieee.org/ Ø http://www.gi-ev.de/wissenschaft/digitbibl/index.html Ø http://www.springer.com/computer?sgwid=1-146-0-0-0 4

5 The Problem: How to Master Large Models Ø Large models have large graphs Ø They can be hard to understand Ø Figures taken from Goose Reengineering Tool, analysing a Java class system [Goose, FZI Karlsruhe] 6

Problems Ø Question: How to Treat the Models of a big Swiss Bank? Ø 25 Mio LOC Ø 170 terabyte databases Ø Question: How to Treat the Models of a big Operating System? Ø 25 Mio LOC Ø thousands of variants Ø Requirements for Modelling in Requirements and Design Ø We need automatic structuring methods Ø We need help in restructuring by hand... Ø Motivations for structuring Ø Getting better overview Ø Comprehensibility Ø Validatability, Verifyability?? 7 Answer: Simon's Law of Complexity Ø H. Simon. The Architecture of Complexity. Proc. American Philosophical Society 106 (1962), 467-482. Reprinted in: Ø H. Simon, The Sciences of the Artificial. MIT Press. Cambridge, MA, 1969. Hierarchical structure reduces complexity. Herbert A. Simon, 1962 Remember, structuring is a basic engineering activity 8

Model Transformations in General Ø Model refactorings, lowerings, higherings, optimizers, and other transformations can be specified by graph transformations [Mens] Ø Graph transformations can be specified by graph rewrite systems Or by a programming language, of course Endogeneous (within one language) Exogeneous (crossing languages) Horizontal Vertical Structurings Syntactic and semantic refinement Refactorings (course DPF) Language migration PSM generation (see chapter MDA) PSI generation (code generation) 9 Idea of Structurings Ø If a graph-based model is too complex, try structurings Ø Structurings overlay graphs with skeleton lists, trees, and dags Ø Structuring can be achieved with graph analysis, logic-based analysis, and graph rewriting Ø Example: finding a spanning tree: root root root root.................. sinks sinks 10

Idea of Structurings Ø Then, following the structure, Ø Sequential algorithms can be applied Ø Recursive algorithm schemas can be applied Ø Wavefronts can be applied Ø Structures are nice for thinking and abstraction (see Simon s law) Ø In particular in analysis and design Ø Structurings prepare further refactorings Ø The structural information can be exploited to further transform the code and to prove preservation of semantics Ø Structurings need Ø Logics with types (e.g., F-Datalog) Ø Graph reachability analysis Ø Graph transformation 11 Overlaying a list on a dag 16.1 TOPOLOGIC SORTING OF DAGS (LAYERING) 12

Topologic Sorting on Dags Ø If constraints for the partial order of some things are given, but no total order Ø It doesn t matter in which order some things are executed Ø May be even in parallel Ø There are many legal orderings, the topological sortings (topsorts, Totalordnung)......... 13 Partial Order for Car Departure open right door close right door open left door drive close left door 14

2 open right door 1 open left door 1 open right door open left door 2 Topological Sorts on Car Departure 3 close right door 4 5 drive close left door 15 Topological Sorts on Car Departure close right door 4 3 close left door 5 drive 16

Topological Sort Ø Topological sorting sorts the nodes with the least many ancestors first Ø TopSort can be described by a subtractive graph rewrite system (SGRS) TopSort-R1: Numbering entry nodes 0 A 0 A depth := gdepth gdepth := gdepth+1 TopSort-R2: Contraction: Remove entry nodes 0 1 A:depth B B http://de.wikipedia.org/wiki/topologische_sortierung 17 Topological Sorts on Car Departure close door Open door close door Drive Open door Drive close door close door R1, R1 R2, R2 R1 close door 2 Open door 0 close door Drive 4 Open door 1 close door 3 Drive close door ETC 18

Results: Topological Sortings Ø The derivations of the GRS TopSort result in different topological sortings of the dag. Ø For instance: Open door close door Open door close door Drive 19 Benefit of TopSorts Ø TopSorted dags are simpler Ø Because they structure partial orderings Ø Removing parallelism and indeterminism Ø Question: why are all cooking recipes sequential? 20

Applications of TopSort Ø Marshalling (serialization) of data structures Ø Compute a topsort and flatten all objects in the order of the topsort Ø Package trees Ø Systems with big package trees can be topsorted and then handled in this order for differenzing between versions (regression tests) Ø Task scheduling Ø Find sequential execution order for parallel (partially ordered) activities Ø UML activity diagrams Ø Finding a sequential execution order Ø Execution of parallel processes (sequentialization of a parallel application) Ø Execute the processes according to dependencies of a topsort Ø Project management: Ø Task scheduling for task graphs (milestone plans): who does when what? Ø Find a topsort for the construction of your next house! 21......... How to make an arbitrary relationship acyclic: overlaying a graph with a dag 16.2 STRONGLY CONNECTED COMPONENTS 22

Strongly Connected Components (Acyclic Condensation) Ø The acyclic condensation asks for mutual reachability of nodes, hence for the effect of cycles in graphs Ø A digraph is strongly connected, if every node is reachable from another one Ø A subgraph of a graph is a strongly connected component (SCC) Ø If every of its nodes is strongly connected Ø The reachability relation is symmetric Ø All edges on a cycle belong to the same SCC Ø How to compute reachability: Ø Declaratively: Specification with an EARS or recursive Datalog: samescc(x,y) :- reachable(x,y), reachable(y,x). Ø Imperatively: Depth first search in O(n+e) Ø The AC has n strongly connected components 23 Acyclic Condensation Ø The SCC of a graph form abstract super nodes Ø That dag of super nodes is called acyclic condensation (AC) SCC (super nodes) 24

Applications on SCC: Attribute Evaluations on Digraphs Ø Many algorithms need acyclic graphs, in particular attribute evaluation algorithms Ø The data flow flows along the partial order of the nodes Ø For cyclic graphs, form an AC Ø Propagate attributes along the partial order of the AC (wavefront algorithm) Ø Within an SCC compute until nothing changes anymore (fixpoint) Ø Then advance Ø No backtracking to earlier SCCs Ø Evaluation orders are the topsorts of the AC 25 A Wavefront on an AC 26

Applications Ø SCCs can be made on every graph Ø Always a good structuring means for every kind of diagram in design Ø SCCs form centers Ø Afterwards, the AC can always be topsorted, i.e., evaluated in a total order that respects the dependencies Ø Useful for structuring large Data diagrams: Class diagrams, package diagrams, object diagrams Behavioral diagrams: statecharts, data-flow diagrams, Petri nets, and UDUGs, call graphs Coalesce loops into subdiagrams Ø Wavefronts can be used for attribute calculations on graphs Ø Analyzing statistics on graphs Ø reduce problems: reducing all attributes of a specific kind over all nodes and edges of the graph Ø Flow problems: calculating costs of paths 27 Applications of SCC Ø Computing definition-use graphs Ø Many diagrams allow to define a thing (e.g., a class) and to use it Ø Often, you want to see the graph of definitions and uses (the definitionuse graph) Ø Definition-use graphs are important for refactoring, restructuring of software Ø Whenever a definition is edited, all uses must be adapted Ø A definition use graph refactoring tool automatically updates all uses Ø Computing Software Metrics Ø A metric is a quantitative measure for code or models Ø Metrics are computed as attributes to source code entities, usually in a wavefront Ø Examples: Ø Number of instruction nodes in program graphs (instead of Linesof-code) Ø Call graph depth (how deep is the call graph?) Ø Depth of inheritance dag (too deep is horrible) 28

Has the graph a skeleton tree structure? [ASU86] (Finding a hierarchy in a graph-based model) 16.3 REDUCIBILITY 29 Why Is a UML Statechart Simple to Understand? Ø It is not a plain automaton Ø But hierarchically organized Ø Certain states abstract substatecharts Auto Pilot On Controlling Move Quiet Non Controlling SwitchOn SwitchOff Off SwitchOn On Off SwitchOff 30

... it is a Reducible Graph Ø But hierarchically organized Auto Pilot Working On Working On Off Controlling Move Quiet Non Controlling SwitchOn SwitchOff Off Controlling Non- Controlling 31 A Reducible Graph Ø A reducible graph has special areas with subdags and cycles, supernodes Ø In a reducible graph, there is a spanning tree with primary edges: Ø Each diamond has a secondary edge, ending in a join node Ø Each cycle has one backedge to a loop head node Ø Attention: this is not an acyclic condensation! Loop head node Join node 32

A Reducible Graph Ø Every supernode has a head that represents or abstracts it Ø All ingoing edges into the super node end in the head Ø Loop head nodes can be head nodes; join nodes not Ø The head node of a supernode is refined from a refinement node in another supernode Supernode Refinement nodes Head node 33 Reducible Graphs Ø Reducible graphs have a hierarchical structure, expressed by their skeleton tree of super nodes with head nodes Ø Supernodes can hide subgraphs Ø Attention: SCC have a DAG structure (different!) Ø Reducible graphs may stem from the refinement operation applied to refinement nodes If an engineer refines, reducible structures result Super nodes 34

A Reducible Graph Ø A skeleton tree (skeleton hierarchy) between the supernodes results Ø Graph is structured and much simpler to comprehend Supernode Head 35 Reducible Graphs in Software Engineering Ø Submodels can be abstracted into single nodes Ø Whole model can be abstracted into one node Ø Skeleton tree structures the model Ø Reducibility law: A model should use reducible graphs to be comprehensilbe and to enable efficient algorithms Ø Otherwise large models cannot be understood Principle of structured modeling and structured programming: The refinement operation is very helpful because it results in reducible graphs and models 36

The Fractal-Like Behavior of Reducible Graphs Ø A reducible graph can be zoomed-in and zoomed-out, like a fractal Ø Refinement nodes can be zoomed in Ø Zooming-out means abstraction Ø Zooming-in means detailing Zoom-In Zoom-In 37 Computing Reducibility with T1-T2 Graph Rewrite System Ø A reducible digraph is a digraph, that can be reduced to one node by the following graph rewrite rules [Tarjan74] Ø Specification with a subtractive GRS (SGRS): Reducibility-T1: Remove reflective edges A A Reducibility-T2a: Merge successors with no fan-out and fan-in 1 (collapse rule a) 1 A B AB 38

Computing Reducibility with T1-T2 Graph Rewrite System Reducibility-T2b: Merge successors with fan-in of 1 and fanout (collapse rule b) 1 A B AB C C Side condition of Reducibility-T 2 : If there is a node B, that has a unique predecessor, A, then m may consume n by deleteing B and making all successors C of B (including A, possibly) be successors of A. 39 Example: T 1 T 2 Reduction Ø On every level, in the super nodes there may be cycles Ø T2 shortens these cycles Ø T1 reduces reflective cycles to super nodes Ø Example: Reduction of a finite state automaton a a a => => b c T 2 b cd T 1 b cd d ab => => abcd T 2 T2 cd 40

Ø Reduction of an IF structure A:If A:If b c => T 2 c Join B Join A:If => => T 2 T 2 A B Join C B Join C 41 Reducible Graphs Ø All recursion techniques on trees can be taken over to the skeleton trees of the reducible graphs Ø For reducible graphs, usually recursion schemas can be applied Ø Branch-and-bound Ø Depth-first search Ø Dynamic programming Ø Applications Ø Organisation diagrams: if a organization diagram is not reducible, something is wrong with the organization Ø This is the problem of matrix organizations in contrast to hierarchical organizations Ø How to Diff a Specification? Ø Text: well-known algorithms (such as in RCS) Ø XML trees: recursive comparison (with link check) Ø Dags: layer-wise comparison Ø Graphs:??? For general graphs, diffing is NP-complete (graph isomorphism problem) 42

Application: Simple Diffing in Reducible Graphs Ø Given a difference operator on two nodes in a graph, there is a generic linear diff algorithm for a reducible graph: Ø Walk depth-first over both skeleton trees Ø Form the left-to-right spanning tree of an SCC and compare it to the current SCC in the other graph Ø Exercises: effort? Ø how to diff two UML class diagrams? Ø how to diff two UML statecharts? Ø how to diff two colored Petri Nets? Ø how to diff two Modula programs? Ø how to diff two C programs? 43 Applications of Reducibility in Software Engineering Ø Structured programming produces reducible control flow graphs (Modula and Ada, but not C) Ø Dijkstra s concern was reducibility Ø Decision tables (Entscheidungstabellen) sind hierarchisch Ø Structured Analysis (SA) is a reducible design method Ø Colored Petri Nets can be made reducible Ø UML Ø CBSE Course: Ø Component-connector diagrams in architecture languages are reducible Ø Many component models (e.g., Enterprise Java Beans, EJB) Ø Architectural skeleton programming (higher order functional programming) Ø Functional skeletons map, fold, reduce, bananas 44

Example: UML Restructuring Ø Structure UML Class Diagrams Ø Choose an arbitrary UML class diagram Ø Calculate reducibility Ø If the specification is reducible, it can be collapsed into one class Ø Reducibility structure gives a simple package structure Ø Test dag feature Ø If the diagram is a dag, it can be layered Ø TopSort the diagram Ø A topsort gives a linear order of all classes Ø UML Packages are not reducible per se Ø Large package systems can be quite overloaded Ø Layering is important (e.g., 3-tier architecture) Ø Reducible packages can be enforced by programming discipline. Then, packages can better be reused in different reuse contexts Ø UML statecharts are reducible Ø UML component, statecharts and sequence diagrams are reducible 45 Restructuring an arbitrary graph to be reducible 16.3.2 MAKING GRAPHS REDUCIBLE 46

Graphs Can Be Made Reducible Ø By duplicating shared parts of the graph that destroy reducibility structure Ø Builds a skeleton tree Ø The process is called node splitting: Ø If the reducability analysis yields a limit graph that is other than a single node, we can proceed by splitting one or more nodes Ø If a node n has k predecessors, we may replace n by k nodes. Ø The ith predecessor of n becomes the predecessor of n i only, while all successors of n become successors of all the n i s. 47 Example: Node Splitting Ø If a loop is irreducible, node has two ancestors. For instance, a join node may also be a loop head node Ø Remedy Ø Separate the loop from the join node Ø Duplicate the irreducible node in an irreducible loop (even with subtrees) Ø Most often, the join and loop head node can be taken Irreducible graph: 1 Duplicate a node with fan-in 2 Reduce with Reducibility-T2 1 1,2a => => => Reduce with Reducibility-T2 1,2a,2b,3 2 3 2a 3 2b,3 2b 48

16.4 SUMMARY OF STRUCTURINGS 49 Structurings Producing Lists and Graphs Ø More Structurings Producing Lists Ø Layering Ø Overlaying a list of layers onto a dag Ø same generation problem Ø Standard Datalog, DL, EARS problem More Structurings Producing Trees Dominance Analysis Overlays a dominator tree to a graph A node dominates another if all paths go through it Applications: analysis of complex specifiations Planarity Finds a skeleton tree for planar drawing A graph is planar, if it can be drawn without crossings of edges Computation with a reduction GRS, i.e., planarity is a different form of reducibility Application: graph drawing Graph parsing with context-free graph grammars Overlaying a derivation tree Rules are context-free 50

More Structurings Producing Dags Ø Stratification Ø Layers of graphs with two relations Ø Normal (cheap) and dangerous (expensive) relation Ø The dangerous relation must be acyclic Ø And is layered then Ø Applications: negation in Datalog, Prolog, and GRS Ø Concept Analysis [Wille/Ganter] Ø Structures bipartite graphs by overlaying a lattice (a dag) Ø Finds commonalities and differences automatically Ø Eases understanding of concepts 51 Comparison of Structurings List Tree Dag Concept Purpose TopSort x Order Implementation of process diagrams Layering x Order Layers Reducibility x Hierarchy Structure Dominance x Importance of nodes Visit frequency Planarity x Hierarchy Drawing Graph parsing x Hierarchy Structure Strongly conn. components Stratification x x Forward flow Wavefronts Layering Structure Structure Concept analysis x Commonalities Comparison 52

Simple Models in Software Engineering Ø Models and specifications, problems and systems are easier to understand if they are Ø Sequential Ø Hierarchical Ø Acyclic Ø Structured (reducible) Ø And this hold for every kind of model and specification in Software Engineering Ø Structurings can be applied to make them simpler Ø Structurings are applied in all phases of software development: requirements, design, reengineering, and maintenance Ø Forward engineering: define a model and test it on structure Ø Reverse engineering: apply the structuring algorithms 53 Other Software Engineering Applications Ø Structured Programming (reducible control flow graphs), invented from Dijkstra and Wirth in the 60s Ø Description of software architectures (LeMetayer, 1995) Ø Description of refactorings (Fowler, 1999) Ø Description of aspect-oriented programming (Aßmann/Ludwig 1999) Ø Virus detection in self-modifying viruses 54

The End: What Have We Learned Ø Understand Simon s Law of Complexity and how to apply it to graph-based models Ø Techniques for treating large requirements and design models Ø Concepts for simple software models Ø You won't find that in SE books Ø... but it is essential for good modelling in companies 55