Formal Model of Program Dependences and Its Implications for Software Testing, Debugging, and Mainte - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Formal Model of Program Dependences and Its Implications for Software Testing, Debugging, and Mainte

Description:

... and Its Implications for Software Testing, Debugging, and Maintenance ... results support some earlier findings, contradict others, and suggest new approaches ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 17
Provided by: alice67
Category:

less

Transcript and Presenter's Notes

Title: Formal Model of Program Dependences and Its Implications for Software Testing, Debugging, and Mainte


1
Formal Model of Program Dependences and Its
Implications for Software Testing, Debugging, and
Maintenance
  • Paper by Podgurski and Clarke
  • Presented by Alice Lewis
  • 3/15/04

2
September 1990
  • IEEE Transactions on Software Engineering what
    a month!

3
Why?
  • Create the formal model
  • most models to date had been informal
  • Present arguments for how to use this for
  • software testing
  • software debugging
  • software maintenance
  • What works and what sort of works?
  • results support some earlier findings, contradict
    others, and suggest new approaches

4
Four Different Types of Dependences Discussed
  • Control dependence
  • Data flow dependence
  • Weak syntactic dependence
  • Strong syntactic dependence
  • Introduction of term semantic dependence
  • A program statement s is semantically dependent
    on s if the function computed by s potentially
    affects the execution behavior of s

5
Problems
  • These dependences are used to find operator
    faults
  • The problem of finding all operator faults is
    undecidable but finding program dependences is a
    necessary condition to finding operator faults
    that potentially impact other program statements

6
What to do about undecidable nature of problem?
  • Consider a subset/approximation of the problem
  • Relate control and data flow dependence to a
    concept called semantic dependence

7
Conclusions
  • Determination of syntactic dependences might be
    used to guide more discriminating methods for
    detecting dependence faults
  • Dependence analysis can be used to help determine
    what is impacted when code is being debugged or
    changed
  • in debug mode, the programmer wants to know what
    statement(s) caused the fault
  • in maintenance mode, the programmer wants to know
    what else will be impacted if a statement is
    changed
  • in testing we need to know what damage was done
    by any change

8
Three Main Results Presented in the Paper
  • Semantic dependence implies weak syntactic
    dependence
  • (If semantic dependence does not depend in a
    certain way on a program failing to terminate)
    then semantic dependence implies strong syntactic
    dependence
  • Data flow does not imply semantic dependence
  • Weak syntactic dependence does not imply semantic
    dependence
  • Strong syntactic dependence does not imply
    semantic dependence

9
Control Flow Graph
  • Directed graph with the following
  • Maximum outdegree of the vertices is at most two
  • There are two distinguished vertices index and
    final
  • Every vertex occurs on some VI VF walk
  • Vertices represent simple program statements
  • Arcs represent possible transfers of control

10
Use of Control Flow and def/use Graphs to Depict
Dependences
  • Data, Syntactic, and Semantic dependences are
    defined in terms of an annotated control flow
    graph called a def/use graph
  • D(v) denotes the set of variables defined at the
    statement represented by v
  • U(v) denotes the set of variables used at that
    statement

11
Control Dependence
  • Control dependence can be defined strictly in
    terms of the control graph
  • Strong control dependence
  • u is strongly dependent on v iff there exists a
    v-u walk vWu not containing the immediate forward
    dominator of v
  • Weak control dependence
  • u is weakly control dependent on v if v has
    successors v and v such that if the branch from
    v to v is executed then u can be bypassed or its
    execution delayed indefinitely
  • Weak and strong control dependence can be
    computed in O(IV(G)I3) time

12
Relation between Semantic and Syntactic Dependence
  • When can a change in the semantics of a program
    affect the execution behavior of another
    statement?
  • the undecidable problem
  • So rephrase the question When is one
    statement semantically dependent on another?

13
Some Important Findings/Proofs
  • The absence of weak syntactic dependence between
    two statements precludes all relationships
    between them that imply semantic dependence
  • The absence of strong syntactic dependence
    between two statements
  • does not necessarily preclude all relationships
    between them that imply semantic dependence
  • precludes all relationships between them that
    imply finitely demonstrated semantic dependence
  • The presence of direct data flow dependence, data
    flow dependence, or weak or strong syntactic
    dependence between two statements does not
    necessarily indicate any relationship between the
    statements that implies semantic dependence

14
Dependence Coverage Criteria
  • Test-data selection rules based on covering or
    exercising certain program dependences
  • Although its not possible to cover everything
    (complexity is quadratic), you can test high
    risk areas (which walks, which inputs) based on
    syntactic dependences
  • Missing (occurs in correct program but not faulty
    one) vs. spurious (reverse is true appears in
    faulty one but not correct one)
  • note how often do errors like these occur?

15
Previous Work
  • Weiser had flaws in his work
  • Weiser proposes that program dependences be used
    to determine the slice in a program that is
    potentially relevant to a given set of statements
  • Weiser uses slices to show relevance in debugging
    activities
  • the flaw is he assumes semantic dependence
    implies strong syntactic dependence Podgurski
    has proved this is false

16
Analysis of Paper
  • Important results were presented with lots of
    substance
  • of course much of this was his dissertation
  • presented at 1989 ACM SigSoft conference,
    according to Moriconis paper
  • Confusing presentation
  • definitions first?
  • conclusions later?
  • central theme throughout?
  • had the content of a textbook
  • How many bugs come from operator faults or
    dependence faults?
  • examples would help
Write a Comment
User Comments (0)
About PowerShow.com