100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Assign_2_SOLN University of Florida CEN 6070 $9.99   Add to cart

Exam (elaborations)

Assign_2_SOLN University of Florida CEN 6070

 9 views  0 purchase
  • Course
  • Institution

CIS 4930/6930: Programs, Functions, Strange Loops, and Consciousness Programs and Functions Assignment 2 1. (4 pts.) Which one of the following statements best captures the precise meaning of the strong correctness predicate, "{P} S {Q} strongly"? (Circle ONE only.) a. P must hold before S e...

[Show more]

Preview 1 out of 3  pages

  • April 8, 2023
  • 3
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
avatar-seller
CIS 4930/6930: Programs, Functions, Strange Loops, and
Consciousness
Programs and Functions Assignment 2

1. (4 pts.) Which one of the following statements best captures the precise meaning
of the strong correctness predicate, "{P} S {Q} strongly"? (Circle ONE only.)

a. P must hold before S executes and Q must hold if S terminates.

b. {P} S {Q} is true unless Q could be false if S terminates.

c. If P holds before executing S, S must terminate in state Q.

d. If P holds before executing S, {P} S {Q} is true unless S could terminate with
Q being false.

e. {P} S {Q} is true unless Q is always false when S terminates, given that P
held before executing S.


2. (9 pts.) Consider the hypothesized invariant:
for the assertion:




Which of the following correctly identifies which of the while_do statement ROI
antecedents would hold when attempting to prove this assertion using the given
hypothesized invariant? (Circle ONE only.)

a. initialization only (6 pts.) e. initialization and finalization only (9 pts.)

b. preservation only (0 pts.) f. initialization and preservation only (3 pts.)

c. finalization only (6 pts.) g. initialization, preservation, and finalization (6 pts.)

d. preservation and finalization only (3 pts.) h. none of the antecedents would hold (3 pts.)

Partial credit points are indicated red for each alternative to the correct answer, e. As stated in
class, the given hypothesized invariant means: “Sum is equal to the sum of the first J elements
of array X – i.e., X[1]+X[2]+…+X[J]”. Therefore, the sum of the first 0 elements (=no elements)
is 0.


This study source was downloaded by 100000850872992 from CourseHero.com on 04-08-2023 16:31:14 GMT -05:00


https://www.coursehero.com/file/122497716/Assign-2-SOLNdocx/

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ExamsConnoisseur. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $9.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

83249 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.99
  • (0)
  Add to cart