340 likes | 432 Views
Software Architecture Metrics. Hany Ammar, Mark Shereshevsky, Ali Mili, Walid Rabie and Nicholay Gradetsky Lane Department of Computer Science & Electrical Engineering hammar@wvu.edu; (smark, amili, rabie, grani)@csee.wvu.edu.
E N D
Software Architecture Metrics Hany Ammar, Mark Shereshevsky, Ali Mili,Walid Rabie and Nicholay Gradetsky Lane Department of Computer Science & Electrical Engineering hammar@wvu.edu; (smark, amili, rabie, grani)@csee.wvu.edu
FY2001 University SOFTWARE INITIATIVE PROPOSALfor theNASA SOFTWARE IV&V FACILITY Initiative Title:Architectural Level Software Metrics '01
Outline • Project Overview • Hub Control Software (HCS) case study • Definition of the entropy based metrics • Definition of the Quantitative Factors • Informational Integrity Coefficient (IIC) • Conclusions (achievements) • Papers submitted • Work In Progress • Future work (2nd year plans)
Project Overview • Developing a class of architectural metrics that quantify information flow in the architecture. Different metrics reflect: • Coupling vs. cohesion; • Data flow vs. control flow; • Static measurement vs. dynamic measurement; • Introducing a group of quantitative factors: mathematically defined functions, that are relevant with respect to qualitative attributes of the architecture • Establishing analytical relationship between the metrics and the quantitative factors • Automating computation of the metrics
Error Propagation, ChangePropagation, Requirements Propagation External Attributes: Maintainability,Testability, Reliability, impacts have Analytical Definitions Quantified Historical Data Analytical Derivations Validation Measurement Values produce Product Artifacts Architecture, Design, Code, computed for Computable Metrics: Coupling, cohesion, complexity, etc. have Mathematical Formula Project Overview • McCall's model of software quality [McCall 1977], • Three-level hierarchy of software attributes
Hub Control Software (HCS) Case StudyInternational Space Station
HCS Other HCS sub-systems N3-1 Data Access N3-2 Data Access RPCM Scheduler ITCS FRITCS State manger PFMC LT SCITCS LRITCS CMD Queue PFMC MT PPA mon O/P CMD Queue General HCS-ITCS scheme
S A B CNTL DATA Definition of entropy based metrics • Ensemble • CNTL , DATA E • p is the probability distribution of E. • VABis a random variable defined by E and p • Definition 1: Coupling: The coupling from A to B, denoted Coupling(A,B), is the entropy of random variable VAB. Cohesion: The cohesion of A is defined as coupling from A to A.
Scitcs Fritcs Pfmc mt pfmc lt lritcs ppa mon Scitcs 3.7 1.58 1.58 1.58 Fritcs 2 3.91 0 0 Pfmc mt 1 2 2 0 pfmc lt 1 2 0 2 lritcs ppa mon HCS case study :ITCS Static Control Matrix
itcs N3 queues rpcm sch state man itcs 1.06 0 1 0 0 0 N3 1 0 0 0 0 0 Queues 0 1 0 0 0 0 rpcm 0 0 0 2 0 0 sch 0 0 0 0 1 0 state man 0 0 0 0 0 1.58 HCS case study :HCS Static Control Matrix (LEVEL 1)
Scitcs Fritcs Pfmc mt pfmc lt lritcs ppa mon Scitcs 3.31911948 1 1.5637897 1.19243058 Fritcs 1.53948476 3.65269014 0 0 Pfmc mt 0.73206669 1.46234979 1.9132505 0 pfmc lt 0.80580491 1.48343604 0 1.93555927 lritcs ppa mon HCS case study :ITCS Dynamic Control Matrix
itcs N3 queues rpcm sch state man itcs 1.17573608 0 0.590576 0 0 0 N3 0.988016215 0 0 0 0 0 Queues 0 1 0 0 0 0 rpcm 0 0 0 1.92612075 0 0 sch 0 0 0 0 0.999992 0 state man 0 0 0 0 0 1.584963 HCS case study :HCS Dynamic Control Matrix (LEVEL 1)
Definition of the Quantitative Factors • Quantitative Factors bridge the gap between qualitative attributes (which we want to assess) and computable metrics (which we can measure). • Some Quantitative Factors: • Error Propagation • Change Propagation • Requirements propagation
S A B X OR x x` x` x Definition of the Quantitative Factors: error propagation Error • B(x) is the state of B resulting from invoking B on input x. Suppose, due to a fault in A, the information transmitted from A to B is corrupted from the expected x to some erroneous x`. • The error propagation (EP) is a measure of the likelihood that an error in the message sent by A will propagate into B.
Definition of the Quantitative Factors: error propagation Continued • Definition 2: Error Propagation: The error propagation from A to B is defined as the following conditional probability: EP(A,B) = Prob(B(x) B (x’) | xx’). • This equation can be reduced to: EP(A,B) = 1 – exp( – Coupling(A, B)) + exp( – Cohesion(B)).
Definition of the Quantitative Factors: error propagation Continued • From the analysis of the above equation: • The higher the coupling from A to B – the higher is the error propagation from A to B. • The lower the cohesion of component B – the higher is the error propagation from A to B. • These observations, consistent with intuition, provide an analytical validation of our metrics. Our equation gives these relationships (which are not surprising by themselves) precise analytical form.
Informational Integrity Coefficient (IIC) • One of architecture quality guidelines is to maximize cohesion and minimize coupling of components. • We introduce a quantitative characteristic, which we call the informationalintegrity coefficient of an architecture which assesses its conformance to this guideline. • The coefficient is computed based on the information flow matrix. IIC =
HCS case study :HCS-ITCS (flattened) Static Control Matrix IIC = 0.749
Scitcs Fritcs Pfmc mt pfmc lt lritcs ppa mon Scitcs 3.7 1.58 1.58 1.58 Fritcs 2 3.91 0 0 Pfmc mt 1 2 2 0 pfmc lt 1 2 0 2 lritcs ppa mon HCS case study :ITCS Static Control Matrix IIC = 0.795
itcs N3 queues rpcm sch state man itcs 1.06 0 1 0 0 0 N3 1 0 0 0 0 0 Queues 0 1 0 0 0 0 rpcm 0 0 0 2 0 0 sch 0 0 0 0 1 0 state man 0 0 0 0 0 1.58 HCS case study :HCS Static Control Matrix (LEVEL 1) IIC = 0.861
HCS case study :HCS-ITCS (flattened) Dynamic Control Matrix IIC = 0.773
Scitcs Fritcs Pfmc mt pfmc lt lritcs ppa mon Scitcs 3.31911948 1 1.5637897 1.19243058 Fritcs 1.53948476 3.65269014 0 0 Pfmc mt 0.73206669 1.46234979 1.9132505 0 pfmc lt 0.80580491 1.48343604 0 1.93555927 lritcs ppa mon HCS case study :ITCS Dynamic Control Matrix IIC = 0.884
itcs N3 queues rpcm sch state man itcs 1.17573608 0 0.590576 0 0 0 N3 0.988016215 0 0 0 0 0 Queues 0 1 0 0 0 0 rpcm 0 0 0 1.92612075 0 0 sch 0 0 0 0 0.999992 0 state man 0 0 0 0 0 1.584963 HCS case study :HCS Dynamic Control Matrix (LEVEL 1) IIC = 0.887
HCS case study :IIC ComparisonFlattened Architecture Vs Hierarchical Architecture • The flattened architecture shows a lower IIC than the hierarchical architecture, this proves that the hierarchical architecture is more cohesive and less coupled
Conclusions (achievements) • We defined coupling and cohesion metrics for hierarchical architectures based on the information theory. • We introduced a normalized measure, the informational integrity coefficient (IIC) of an architecture based on the computed metrics • We derived the relationship between the coupling/cohesion metrics and the error propagation factor between components.
Papers submitted Conferences • Annual International Computer Software and Applications Conference (COMPSAC 2001)Title: "Information-Theoretic Metrics for Software Architectures“ – Status: Accepted for publication • Automated Software Engineering Conference (ASE 2001) Title: "Quantifying Architectural Attributes of UML Specifications: A Framework and Its Automation" – Status: Submitted June 29, 2001 Journals • Automated Software Engineering JournalTitle: "Quantifying Software Architectures: Definitions and Automation Plans“ – Status: submitted: May 11, 2001 • Transactions on Software Engineering JournalTitle: "Information Theoretic Metrics for Software Architectures" – Status: submitted: April, 2001
Future Work • Deriving a relationship between our coupling/cohesion metrics and the change propagation, • Developing an automation methodology for computing the metrics given a UML description of the architecture, • Validating the metrics using a NASA CASE Study
Other views (UML, Rapide) In progress Planned Has a view Automation support for metrics computation Software System Canonical Architectural Style Transformation Conceptual view (RoseRT-UML) Dynamic Metrics Static Metrics Quantitative factors (EP, CP) Information Integrity Coefficient