CS447 Study Guide - Final Guide: Call Site, If And Only If, Hp Quality Center

52 views6 pages
user avatar
Published on 16 Oct 2011
School
University of Waterloo
Department
Computer Science
Course
CS447
Professor
Fault, Error, Failure
Definitions
Debugging: The process of finding a fault given a failure.
Error: An incorrect internal state (unobserved).
Failure: External, incorrect behaviour with respect to the expected behaviour
(observed).
Fault: A static defect in the software (incorrect lines of code).
Test Failure: Execution that results in a failure.
Testing: Evaluating software by observing its execution.
Graphs
Types of Coverage
NC, Node Coverage
o TR contains each reachable node in G.
EC, Edge Coverage
o TR contains each reachable path of length up to 1, inclusive, in G.
o Includes single nodes due to “up to” part.
EPC, Edge Pair Coverage
o TR contains each reachable path of length up to 2, inclusive, in G.
CPC, Complete Path Coverage
o TR contain all paths in G.
o Impossible if graph has a loop
SPC, Specified Path Coverage
o TR contains a set S of test paths, where S is supplied as a parameter.
PPC, Prime Path Coverage
o TR contains each prime path in G.
o PPC does not subsume EPC
If a node n has a path to itself EPC requires [n, n, m] which is
not prime.
SRTC, Simple Round Trip Coverage
o TR contains at least one round-trip path for each reachable node in G
that begins and ends a round-trip path.
CRTC, Complete Round Trip Coverage
o TR contains all round-trip paths for each reachable node in G.
ADC, All-Defs Coverage
o For each set of du-paths S=du(n,v), TR contains at least one path d in
S.
o Every def reaches a use
AUC, All-Uses Coverage
o For each set of du-paths to uses S=du(ni,nj,v), TR contains at least
one path d in S.
o Every def reaches all possible uses.
ADUPC, All-Du-Paths Coverage
o For each set S=du(ni, nj, v), TR contains every path d in S.
o All the paths between defs and uses.
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in
Definitions
Actual parameter: Variable in the caller.
Formal parameter: Variable in the callee.
Basic Block: A block which has one entry point and one exit point.
Best Effort Touring: Satisfy as many test requirements as possible without
sidetrips. Allow side trips to satisfy unsatisfied test requirements.
Caller: A unit that invokes another unit.
Callee: The unit that is called.
Callsite: Statement or node where the call appears.
Definition (def): A location where a value for a variable is stored into
memory.
def(n) or def(e): The set of variables that are defined by bode n or edge e.
Def-clear: A path from li to lj is def-clear with respect to variable v if v is not
given another value on any of the nodes or edges in the path.
du-path: A simple subpath that is def-clear with respect to v from a def of v to
a use of v.
DU pair: A pair of locations (li, lj) such that a variable v is defined at li and
used at lj.\
First-use: The set of nodes that have uses of a variable u and for which there
is a def-clear and use-clear path from the call site to the nodes.
Last-def: The set of nodes that define a variable x and has a def-clear path
from the node through a callsite to a use in another unit.
Prime Path: A simple path that does not appear as a proper subpath of any
other simple path.
Reach: If there is a def-clear path from li to lj with respect to v, the def of v at
li reaches the use at lj.
Round Trip Path: A prime path that starts and ends at the same node.
Simple Path: A path from node ni to nj is simple if no node appears more
than once, except possibly the first and last nodes are the same
Tour: A test path p tours subpath q if q is a subpath of p.
Tour With Sidetrips: A test path p tours subpath p with sidetrips iff every
edge in q is also in p in the same order.
Tour With Detours: A test path p tours subpath p with detours iff every node
in q is also in p in the same order.
Use: A location where a variable’s value is accessed.
use(n) or use(e): The set of variables that are used by node n or edge e.
Logical Expressions
Types of Coverage
PC, Predicate Coverage
o For all p in P, p evaluates to true, and p evaluates to false
CC, Clause Coverage
o For each c in C, c evaluates to true, and c evaluates to false
CoC, Combinatorial Coverage
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 6 pages and 3 million more documents.

Already have an account? Log in

Document Summary

Debugging: the process of finding a fault given a failure. Failure: external, incorrect behaviour with respect to the expected behaviour (observed). Fault: a static defect in the software (incorrect lines of code). Test failure: execution that results in a failure. Testing: evaluating software by observing its execution. Nc, node coverage: tr contains each reachable node in g. Ec, edge coverage: tr contains each reachable path of length up to 1, inclusive, in g. Includes single nodes due to up to part. Epc, edge pair coverage: tr contains each reachable path of length up to 2, inclusive, in g. Cpc, complete path coverage: tr contain all paths in g. Spc, specified path coverage: tr contains a set s of test paths, where s is supplied as a parameter. Ppc, prime path coverage: tr contains each prime path in g, ppc does not subsume epc.