Structural Manipulations of Software Architecture Using Tarski Relational Algebra - PowerPoint PPT Presentation

About This Presentation
Title:

Structural Manipulations of Software Architecture Using Tarski Relational Algebra

Description:

Hide transformation. The hide transformation takes a graph G that includes ... all edges that hide/hideExt may. cause to be drawn = all subpaths from f to g. 12 ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 19
Provided by: Holt71
Category:

less

Transcript and Presenter's Notes

Title: Structural Manipulations of Software Architecture Using Tarski Relational Algebra


1
Structural Manipulations of Software Architecture
Using Tarski Relational Algebra
Paper at WCRE '98 Working Conference on Reverse
Engineering, Honolulu, Oct 1998.
  • Ric Holt
  • University of Waterloo, Canada holt_at_uwaterloo.ca

2
Top view of concrete software architecture of
250KLOC system
3
Client-server view of one subsystem of the
250KLOC system
4
Process of view creation
Source code
Clustering
Parser
Facts extracted from code
Hierarchic decomposition
Grok Fact manipulator
Architectural diagram
Layouter
Browser
5
Example typed graph
  • C (r,a), (r,b), (a,v), (a,w) (a,x), (b,y),
    (b,z)
  • I (a,b)
  • E (b,y)
  • U (v,w), (x,y)

6
Algebraic Operators
Union I E (a,b), (b,y) Intersection E C
(b,y) Difference C - E (r,a), (r,b),
(a,v), (a,w), (a,x), (b,z) Inverse inv E
(y,b) Composition I o E (a,y) Identity id
(r,r), (a, a), (b,b), (w,w) Transitive
Cl. C (r,a), (r, b), (r,v), (r,w), (r,x),
(r,y), (r,z), (a,v), (a,w), (a,x), (b,y),
(b,z) Reflex. T.C. C id C
7
External Representation of Graphs
RSF call P Q include F G store Q X contain Main P
Main
contain
P
F
call
Q
include
store
G
X
8
Hide transformations
Graph G
d
T
e
a
V
f
b
Graph I hideExt(G, S)
Graph H hide(hide(G,T),V)
9
Hide transformation
The hide transformation takes a graph G that
includes a hierarchical (tree) containment
relation C and another relation R and a
particular node S, and eliminates all descendent
nodes of S, while replacing each edge from
outside S to inside S by an edge to S, and each
edge from inside S to outside S by an edge from
S. Similarly for hideExt.
10
When use hide transformation?
Use hide when relation R is optimistically
transitive.
T
a
c
d
S
e
V
b
f
g
h
11
Edged induced by hiding
T
a
c
d
S
e
V
b
f
g
h
Edges induced by edge (f,g) all edges that
hide/hideExt may cause to be drawn all
subpaths from f to g.
12
Family relations
Given containment (child) relation C Parent P
inv C Sibling S P o C - id Descendent D
C Inclusive descendent Do C Ancestor A
P Inclusive ancestor Ao P Super
cousin K P o S o C
13
Induced cousins
Given relation U (for use), what higher level
relations are induced by U? Divide U into Uk
(cousin edges) Ud (descendent/export/public
edges) Ua (ancestor/buy edges) Induced cousin
usage Uk (Do o Uk o Ao) K
Uk
Do
Ao
Uk
14
Induced descendent edges (export/public edges)
Ud (Ao o Ud o Ao) D (K o Uk o
Ao) D
Uk
Ao
K
Ud
Ao
Ud
Uk
Ao
Not Uk
Ao
Ud
K
Ao
Not Ud
Uk
Ao
15
Grok a relational calculator
Program getdb call.rsf tcall call putdb
both.rsf Input from call.rsf call P Q call
Q R Output to both.rsf call P Q call Q
R tcall P Q tcall Q R tcall P R
P
call
Q
call
R
16
Inducing calls up to file level
call is a procedure call fcall is a file
level call
File
File
fcall
main.c
start.h
funcdef
funcdcl
startup
main
call
Procedure body
Procedure header
fcall funcdef o call o inv funcdcl
17
Algorithms for composition and other operators
Implement T R o S Naïve implementation,
O(e2) O(n4)
Original a R b b S c c R x y R d x S b
Result a T c c T b
for i 1 .. e if type(i) R then for j
1 .. e if type(j) S trg(i) src
(j) then create T(src(i),
trg(j)) end if end
for end if end for Remove duplicates
18
Algorithms for composition and other operators
Write a Comment
User Comments (0)
About PowerShow.com