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...

• Homework Help
• 1

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 ────────

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&lt;I, A[k]&lt;&gt;Y) OR (for every 1≤k≤N, A[k]&lt;&gt;Y) AND I=-1] AND UNCH(A,Y)} 4. (6 pts.) Give a conditional function comprised of two (predicate -&gt; rule) pairs using concurrent assignment functions for the following program: if x&gt;0 then x := x-3; y := x+3 end_if f = (x&gt;0 x,y := x-3,x | x≤0 x,y := x,y)...
View Full Document

• Fall '08
• Thebaut

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern