Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 5 ( 1 2 pts . , 0 . 5 pts . each condition ) : Backward reasoning Find the weakest precondition of each

Problem 5(12 pts.,0.5 pts. each condition): Backward reasoning
Find the weakest precondition of each code sequence by inserting the appropriate condition in
each blank. The first intermediate condition in part (1) is supplied as an example. Please simplify
your answers as much as possible. Assume all referenced variables are defined as integers.
(1) Use the wp() notation shown in the example for all conditions in this part.
x=-1;
{wp(z=2**y+x;,z10)}={2y+x10}=
{2y10-x}={y?bar(10)-x2}
z=2*y+x;
{z10}
(2) Use the wp() notation for all conditions in this part.
{:{x0}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions