Measurement - part 2 1 Software Measurement Measurement Theory.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Three Special Functions
Continuing Abstract Interpretation We have seen: 1.How to compile abstract syntax trees into control-flow graphs 2.Lattices, as structures that describe.
School of Computing Clemson University Mathematical Reasoning  Goal: To prove correctness  Method: Use a reasoning table  Prove correctness on all valid.
SSA.
Introduction to CS Theory Lecture 2 – Discrete Math Revision Piotr Faliszewski
Department of Computer Science & Engineering
Sets Lecture 11: Oct 24 AB C. This Lecture We will first introduce some basic set theory before we do counting. Basic Definitions Operations on Sets Set.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
More Number Theory Proofs Rosen 1.5, 3.1. Prove or Disprove If m and n are even integers, then mn is divisible by 4. The sum of two odd integers is odd.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
A Semantic Characterization of Unbounded-Nondeterministic Abstract State Machines Andreas Glausch and Wolfgang Reisig 1.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Static Testing: defect prevention SIM objectives Able to list various type of structured group examinations (manual checking) Able to statically.
Common Sub-expression Elim Want to compute when an expression is available in a var Domain:
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
From last time: reaching definitions For each use of a variable, determine what assignments could have set the value being read from the variable Information.
Containment and Equivalence for an XPath Fragment By Gerom e Mikla Dan Suciu Presented By Roy Ionas.
Data Flow Analysis Compiler Design October 5, 2004 These slides live on the Web. I obtained them from Jeff Foster and he said that he obtained.
Gomory-Hu Tree for representation of minimum cuts Elad Avni.
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
PMOS & nMOS pMOS is open when input is high. nMOS is closed when input is high. Always pMOS at top (high) and nMOS at botom (ground) implement F in pMOS.
A Complexity Measure THOMAS J. McCABE Presented by Sarochapol Rattanasopinswat.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
Software Measurement Theoretical issues. Measurement Theory – Sources Measurement theory in mathematics Metrology (physical science & Engineering) – Definitions.
PSAT Club Math – Multiple Choice.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 1 Defect testing l Testing programs to establish the presence of system defects.
Introduction to Proofs
Measurement theory - for the interested student Erland Jonsson Department of Computer Science and Engineering Chalmers University of Technology.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Incompleteness and incomparability in preference aggregation: complexity results M. Silvia Pini*, Francesca Rossi*, K. Brent Venable*, and Toby Walsh**
1 Bisimulations as a Technique for State Space Reductions.
MA/CSSE 474 Theory of Computation Decision Problems DFSMs.
Scale2 1 Measurement Scales The “richness” of the measure.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
CASE/Re-factoring and program slicing
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Mathematical Preliminaries
NP-Complete problems.
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
CompSci 102 Discrete Math for Computer Science February 7, 2012 Prof. Rodger Slides modified from Rosen.
CS412/413 Introduction to Compilers Radu Rugina Lecture 18: Control Flow Graphs 29 Feb 02.
1 Control Flow Graphs. 2 Optimizations Code transformations to improve program –Mainly: improve execution time –Also: reduce program size Can be done.
F02measure13 1 Software Measurement Measurement is essential for a science.
Software Measurement: A Necessary Scientific Basis By Norman Fenton Presented by Siv Hilde Houmb Friday 1 November.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 11.1.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Can a and b both be whole numbers? similar triangles so.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
Data Flow Analysis II AModel Checking and Abstract Interpretation Feb. 2, 2011.
Section Recursion 2  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
Software METRICS. Intro Measurement is essential to life economic measurement... clinical measurement... air traffic control... etc., etc., etc....
Fifteen Puzzle Move: can move a square adjacent to the empty square to the empty square.
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Set, Combinatorics, Probability & Number Theory
6.5 Inequalities in Triangles and Indirect Proofs
Identity and Equality Properties
Abstraction Transformation & Heuristics
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Parameterised Complexity
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Theory of Computability
Trevor Brown DC 2338, Office hour M3-4pm
SETS, RELATIONS, FUNCTIONS
Presentation transcript:

Measurement - part 2 1 Software Measurement Measurement Theory

Measurement - part 2 2 Measurement Theory u circa applied to physics u 1940’s - applied to psychology, sociology u 1990’s - applied to software measurement

Measurement - part 2 3 Representational TOM u empirical relation system –(C,R) u numerical relation system –(N,P) u M maps (C,R) to (N,P) u representation condition –x M(x)<M(y)

Measurement - part 2 4 Empirical u A set of entities, E u A set of relationships, R –often “less than” or “less than or equal” –note that not everything has to be related

Measurement - part 2 5 Numerical u A set of entities –also called the “answer set” –usually numbers - natural numbers, integers or reals u A set of relations –usually already exists –often “less than” or “less than or equal”

Measurement - part 2 6 The Mapping u The representation condition –M(x) rel M(y) if x rel y –x rel y iff M(x) rel M(y) u Both have been used by classical measurement theory authors u I prefer the first definition

Measurement - part 2 7 “BIG” example u We want to measure people as BIG –i.e. height and weight u Empirically, if two people are the same height, the heavier is bigger –if two people are the same weight, the taller is bigger u Answer set is real or tuple?

Measurement - part 2 8 Classic Example u McCabe’s Cyclomatic Number u Empirical - Control Flow Graph u Numerical (Answer Set) - integers u mapping - E-N+2

Measurement - part 2 9 Empirical u How can we rank McCabe’s? u What is the relationship? u What is a partial order?

Measurement - part 2 10 Creating a New Theory Why should a theory devised for physical phenomenon be useful for software - an artificial phenomenon?

Measurement - part 2 11 Empirical Relations u One cludge that appears very often in the computer science literature is to define the empirical relation as that which makes the representation condition hold for the measure u The truth is that we do not have centuries of consensus on the empirical relationships

Measurement - part 2 12 Artificial u Software has been described as an artificial science because we control the objects. In fact, the objects are artifacts - made by humans u However, if there are constraints on these artifacts, it is usually in the operations that can change the artifacts

Measurement - part 2 13 Transformations u Consider the transformations that you can do to a syntactically correct program that maintains the correctness: – add a statement – add a condition – remove a statement

Measurement - part 2 14 MOM u Model - Order - Mapping u the model is the abstraction u the order is an ordering on the abstraction –can be partial, can be constructive u the mapping is from the model to the answer set –must preserve the order (I.e. rep condition)

Measurement - part 2 15 MOM

Measurement - part 2 16 Triangle Problem cin>>a>>b>>c; type=“scalene”; if (a==b||b==c||a==c) type=“isosceles”; if (a==b&&b==c) type=“equilateral”; if (a>=b+c||b>=a+c||c>=a+b) type=“not a triangle”; if (a<=0||b<=0||c<=0) type=“bad inputs”; cout<<type;

Measurement - part 2 17 Triangle CFG 1,2,3a 3b 4a 4b 5a 5b 6a 6b 7

Measurement - part 2 18 Formal Spec u CFG is described by set of nodes {1,3b,4a,4b,5a,5b,6a,6b,7} and set of arcs {(1,3b),(1,4a),(3b,4a),(4a,4b),(4a,5a), (4b,5a), (5a,5b),(5a,6a),(5b,6a),(6a,6b), (6a,7),(6b,7)

Measurement - part 2 19 Partial Order u Originally, for all cfg x,y, x <=y if and only if all nodes and edges in x are also in y. u Thus adding an edge to x made a new cfg y such that x <= y but y may not be a cfg for a valid program u Constructive definition - x <= y if there is a set of transforms (additive) such that the transforms are applied to x produce y

Measurement - part 2 20 Representation Condition u Can prove that for all cfg’s x and y, if x<=y then m(x) <= m(y) u Note that this is not the iff rep condition. Since the partial orders on the abstractions are partial, if can only be one way

Measurement - part 2 21 Proof of monotonicity u Can show that no additive transform can decrease the cfg or the value of the mapping u Can show that additive transforms of adding if-then, if-then-else, while will always result in an increase of 1 in the value of the mapping