1 A Graph-Based Metamodel for Object-Oriented Software Metrics Tom Mens( ) Postdoctoral Fellow – Fund for Scientific.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advanced Piloting Cruise Plot.
Copyright © 2002 Pearson Education, Inc. Slide 1.
Copyright © 2002 Pearson Education, Inc. Slide 1.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 5 Author: Julia Richards and R. Scott Hawley.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
and 6.855J Cycle Canceling Algorithm. 2 A minimum cost flow problem , $4 20, $1 20, $2 25, $2 25, $5 20, $6 30, $
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 5 second questions
Year 6 mental test 10 second questions
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
ZMQS ZMQS
Solve Multi-step Equations
Richmond House, Liverpool (1) 26 th January 2004.
BT Wholesale October Creating your own telephone network WHOLESALE CALLS LINE ASSOCIATED.
Randomized Algorithms Randomized Algorithms CS648 1.
Data Structures: A Pseudocode Approach with C
ABC Technology Project
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
1 Formalising Behaviour-Preserving Object-Oriented Program Transformations Tom Mens( ) Postdoctoral Fellow – Fund for Scientific Research.
1 A Graph Rewriting Formalism for Object-Oriented Software Evolution Tom Mens FWO Postdoctoral Fellow Programming Technology Lab Vrije.
1 A Formal Foundation for Software Refactoring Tom Mens, Serge Demeyer, Dirk Janssens serge.demeyer | dirk.janssens Programming.
© Charles van Marrewijk, An Introduction to Geographical Economics Brakman, Garretsen, and Van Marrewijk.
VOORBLAD.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
“Start-to-End” Simulations Imaging of Single Molecules at the European XFEL Igor Zagorodnov S2E Meeting DESY 10. February 2014.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Squares and Square Root WALK. Solve each problem REVIEW:
Do you have the Maths Factor?. Maths Can you beat this term’s Maths Challenge?
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
آزمایشگاه مهندسی نرم افزار
Chapter 5 Test Review Sections 5-1 through 5-4.
SIMOCODE-DP Software.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
H to shape fully developed personality to shape fully developed personality for successful application in life for successful.
Januar MDMDFSSMDMDFSSS
Week 1.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
A SMALL TRUTH TO MAKE LIFE 100%
1 Unit 1 Kinematics Chapter 1 Day
PSSA Preparation.
TASK: Skill Development A proportional relationship is a set of equivalent ratios. Equivalent ratios have equal values using different numbers. Creating.
How Cells Obtain Energy from Food
CpSc 3220 Designing a Database
Traktor- og motorlære Kapitel 1 1 Kopiering forbudt.
Presentation transcript:

1 A Graph-Based Metamodel for Object-Oriented Software Metrics Tom Mens( ) Postdoctoral Fellow – Fund for Scientific Research (Flanders) Vrije Universiteit Brussel, Belgium

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 2 Goal  use graphs as an underlying formalism/representation to  define a formal framework for OO metrics independent of  the programming language (e.g., Smalltalk, Java, or C++)  the life-cycle phase (e.g., design or implementation)  identify a minimal set of primitive functions to cover an as wide variety of OO metrics as possible  implement open and customisable metrics tools  easy to add new OO metrics  easy to incorporate new language features  easy to use and customise at different levels of abstraction

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 3 Approach  top-down  improve existing metrics tools  CodeCrawler  SoulMetrics  bottom-up  develop generic graph-based formalism  validate  on a variety of OO metrics suites  on a significant number of different programs

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 4 Tool support: CodeCrawler  a language independent reverse engineering tool  combines metrics and software visualization  based on the FAMIX language-independent metamodel  implemented in VisualWorks 3.0 Smalltalk  runs on every major platform

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 5 Tool support: CodeCrawler

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 6 Tool support: CodeCrawler

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 7 Tool support: SoulMetrics  a generic logic-programming-based metrics tool  defined in SOUL, a logic meta-programming environment  on top of Smalltalk VisualWorks 7  a collection of logic predicates  fully integrated in the Smalltalk GUI (browser)  runs on every major platform

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 8 Tool support: SoulMetrics

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 9 Tool support: SoulMetrics

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 10 Tool support: SoulMetrics

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 11 Represent software as graphs  Directed attributed multi-graphs

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 12 Primitive graph functions  pred: Node  P F (Node)predecessor nodes  succ: Node  P F (Node)successor nodes  fanIn: Node  P F (Edge)incoming edges  fanOut: Node  P F (Edge)outgoing edges  path: Node  Node  P F (Edge)edge paths + iterative versions pred i, pred +, pred*, succ i, succ +, succ*

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 13 Primitive graph functions  pred(c 4 )

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 14 Primitive graph functions  succ(c 4 )

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 15 Primitive graph functions  fanIn(c 3 )

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 16 Primitive graph functions  fanOut(c 3 )

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 17 Primitive graph functions  path(c 2,c)

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 18 Qualified graph functions  pred: Node  NodeConstraint  EdgeConstraint  P F (Node)  idem for pred i, pred +, pred*, succ i, succ +, succ*  fanIn: Node  EdgeConstraint  P F (Edge)  idem for fanOut  path: Node  Node  NodeConstraint  EdgeConstraint  P F (Edge + )  begin is defined in terms of pred*  calculates all nodes that have no predecessors  end is defined in terms of succ*  calculates all nodes that have no successors

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 19 Qualified graph functions  fanIn(c,isNoUsesEdge)

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 20 Qualified graph functions  pred(c,isClassNode,isUsesEdge)

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 21 Object-oriented inheritance metrics  Let n  Node such that isClassNode(n) subclasses(n) := pred(n,isClassNode,isInheritsEdge) descendants(n) := pred + (n,isClassNode,isInheritsEdge) leafClasses(n) := start(n,isClassNode,isInheritsEdge) inheritanceToRoot(n) :=  path(n,m,isClassNode,isInheritsEdge) m  end(n,isClassNode,isInheritsEdge) NOS(n) = |subclasses(n)| NOD(n) = |descendants(n)| NOL(n) = |leafClasses(n)| DIT(n) = average(inheritanceToRoot(n),map(length))

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 22 Object-oriented inheritance metrics  subclasses(c)NOS(c)=2

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 23 Object-oriented inheritance metrics  descendants(c)NOD(c)=4

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 24 Object-oriented inheritance metrics  leafClasses(c)NOL(c)=2

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 25 Object-oriented inheritance metrics  inheritanceToRoot(c 2 )DIT(c 2 )=2

ICGT, 10 October 2002, Barcelona © Tom Mens, Vrije Universiteit Brussel 26 Ratio Metrics  MethodHidingFactor(n) = 1 – Ratio(succ,isMethodNode,isPublicNode,isContainsEdge)(n) = 1- |succ(n,isMethodNode  isPublicNode,isContainsEdge)| |succ(n,isMethodNode,isContainsEdge)|  AbstractSubclassRatio(n) = 1 – Ratio(pred,isClassNode,isAbstractNode,isInheritsEdge)(n)  LeafclassRatio(n) = 1 – Ratio(pred*,isClassNode,isInheritanceLeaf,isInheritsEdge)(n)