Exam 2 Review - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Exam 2 Review

Description:

King, et al., Is Proof More Cost-Effective than Testing? Linger, Cleanroom Software Engineering for Zero-Defect Software. Coverage (cont'd) ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 22
Provided by: mcat
Category:
Tags: exam | linger | review

less

Transcript and Presenter's Notes

Title: Exam 2 Review


1
Exam 2 Review
Software Testing and Verification Lecture 26
  • Prepared by
  • Stephen M. Thebaut, Ph.D.
  • University of Florida

2
Coverage
  • Lectures 16 through 25 (total of 10)
  • Required readings 7-8
  • King, et al., Is Proof More Cost-Effective than
    Testing?
  • Linger, Cleanroom Software Engineering for
    Zero-Defect Software

3
Coverage (contd)
  • Optional problem sets 3 and 4
  • Axiomatic verification and predicate transforms
  • Function-based verification
  • Topics
  • Formal Program Specification
  • Axiomatic Verification
  • Predicate Transforms
  • Functional Verification
  • Cleanroom Software Engineering

4
Other Resources
  • Practice Exams
  • Lesson Plans (including Self-Check Quiz
    Questions)

5
Ground Rules and Format
  • You will have 90 minutes to complete the exam.
  • No notes, books, calculators, or PDAs are
    allowed.
  • All answers should be given in the spaces
    provided on the exam only.

6
Exam Procedures for EDGE Students
  • Proctors should schedule a single exam time
    during normal working hours for all students at
    each site. If this is not possible, exams may be
    scheduled outside normal working hours (e.g., in
    the evening).
  • Exams are made available to proctors the same day
    they are administered to on-campus students.
  • Proctors should return ORIGINAL exams directly to
    the instructor, preferably via overnight delivery.

7
Ground Rules and Format (contd)
  • Question format may be short answer, matching,
    true/false, fill-in-the-blank, proofs, etc.
  • The point-value of each question will be given.

8
Sample Problems
  • (4 pts.) Which of the following best captures the
    precise meaning of "P S Q"? (Circle one of
    the following.)
  • P holds before S executes and terminates in state
    Q.
  • P holds before S executes and Q will hold if S
    terminates.
  • if P holds before executing S, S will terminate
    in state Q.
  • if P holds before executing S, Q will hold if S
    terminates.

9
Sample Problems (contd)
  • (5 pts.) Suppose P while b do s Q for some P,
    Q, b, and s. Suppose, too, that K wp(while b do
    s, Q). Which of the following statements are
    NECESSARILY true?
  • P ? K
  • K ? P
  • K ? b s K
  • (K ? b) ? Q
  • K while b do s Q

10
Sample Problems (contd)
  • (6 pts.) Indicate the truth value of each of the
    following assertions.
  • xltn y x1 x y-1 y-1ltn ? xx'
  • wp(s1, x17) ? y5 s1 xgt0 ? y5
  • x5 s2 y3?xgt0 s2 ygt0

11
Sample Problems (contd)
  • Consider the assertion biga if bgtbig then big
    b end_if bigMax(a,b)
  • (4 pts.) Prove the above using the appropriate
    RULE OF INFERENCE. Give the Rule being used and
    show all steps.
  • (4 pts.) Use the WEAKEST PRECON-DITION-BASED
    METHOD to prove that the assertion holds. Show
    all steps.

12
Sample Problems (contd)
  • (13 pts.) Prove the following assertion (not
    shown) using the Repeat_until Rule of Inference
    derived in problem set 3. Clearly state the rule
    and show all steps.
  • (8 pts.) Determine the correctness relationships
    between program P and each of the functions below
    (not shown). Circle "C" for Complete, "S" for
    Sufficient, or "N" for Neither.

13
Sample Problems (contd)
  • (7 pts.) Identify H0, H1, H2, and Hi such that
    wp(M, yx-k) H0 V H1 V H2 V...V Hi V... where
  • M while tltgtk do
  • t t-1
  • y y1
  • end_while
  • Express the wp in CLOSED FORM.

14
Sample Problems (contd)
  • (9 pts.) For program P and function f below,
    prove f P.
  • P repeat
  • x x-1
  • y yt
  • until xn
  • f (xgtn -gt x,y n,yt(x-n))
  • Clearly identify ALL correctness conditions and
    cases that must be considered.

15
Sample Problems (contd)
  • (contd)
  • The ONLY correctness relationship that may be
    ASSUMED to hold is
  • (x,y x-1,yt) x x-1 y yt
  • ALL others must be proven using the correctness
    conditions/working correctness questions
    considered in class.

16
Sample Problems (contd)
  • (7 pts.) For program P below, use the Invariant
    Status Theorem to synthesize a limited invariant
    that COULD be used to prove that the program is
    weakly correct with respect to pre-condition
    true and post-condition yx-k using the while
    loop rule of inference. (Show your work.)

17
Sample Problems (contd)
  • (contd)
  • P y 0
  • t x
  • while tltgtk do
  • t t-1 y y1
  • end_while

18
Sample Problems (contd)
  • (4 pts.) In "Cleanroom Software Engineering for
    Zero-Defect Software," Linger claims that
    statistical usage testing is "more that 20 times
    more effective" than coverage testing at doing
    something. What is it more effective at doing,
    and why is this so?

19
Sample Problems (contd)
  • (6 pts.) The following statements concern the
    paper, "Is Proof More Cost-Effective Than
    Testing," by King, et al. Indicate either "true"
    or "false" as appropriate.
  • The paper suggests that while Z-based proofs of
    correctness are clearly useful, they are NOT as
    efficient at finding faults as system validation
    tests.

20
Sample Problems (contd)
  • (contd)
  • UK Defense Standards require a formal
    specification and design, as well as formal
    arguments to link specification to design and
    design to code.
  • Consistent with DoD and UK Defense standards, the
    system was implemented using the full Ada
    language.

21
Exam 2 Review
Software Testing and Verification Lecture 26
  • Prepared by
  • Stephen M. Thebaut, Ph.D.
  • University of Florida
Write a Comment
User Comments (0)
About PowerShow.com