Assignment_9_Worksheet_sol.pdf - Software Testing Verification Assignment 9 Group Activity Worksheet Solutions 1(10 pts Which of the following

Assignment_9_Worksheet_sol.pdf - Software Testing...

This preview shows page 1 out of 1 page.

Software Testing & Verification Assignment 9 Group Activity Worksheet -- Solutions 1. (10 pts.) Which of the following expressions are propositions and which are predicates? Circle at most one answer for each part. (You will receive +2 pts. for each correct answer and -1 pt. for each incorrect answer.) a. Object X is a duck proposition predicate cannot determine b. Mickey Mouse is a duck proposition predicate cannot determine c. At least one object X proposition predicate cannot determine is a duck. d. There is at least one duck proposition predicate cannot determine that likes to eat Y. e. There is at least one cow that proposition predicate cannot determine actively promotes eating more chicken. 2. (3 pts.) What is the difference, if any, between the following two logical expressions? A, B, C ────────
Image of page 1

Unformatted text preview: (A Λ B Λ C) D D Their logical interpretation is identical, but the “Rule of Inference” form on the left implies that the writer believes the conditional statement to be True (i.e., valid). 3. (6 pts.) Give an appropriate pre- and post-condition for a program that sets variable I to the index of the first instance of Y in the non-empty array A[1:N], or to -1 if Y is not an element of array A[1:N]. pre-condition: {N≥1} post-condition: {[(1≤I≤N AND A[I]=Y AND for every 1≤k<I, A[k]<>Y) OR (for every 1≤k≤N, A[k]<>Y) AND I=-1] AND UNCH(A,Y)} 4. (6 pts.) Give a conditional function comprised of two (predicate -> rule) pairs using concurrent assignment functions for the following program: if x>0 then x := x-3; y := x+3 end_if f = (x>0 x,y := x-3,x | x≤0 x,y := x,y)...
View Full Document

  • Fall '08
  • Thebaut

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes