This question has been solved
CS 536: Science of Programming - HW 6: Substitution // Forward Assignment, sp
USIITIllinois Institute of Technology States Satisfaction State UpdatesSubstitution // Forward Assignment sp
Syntactic Substitution, Forward Assignment, & sp
CourseNana.COM
CS 536: Science of Programming, Fall 2022 Due Wed Mar 8, 11:59 pm
CourseNana.COM
Problems [60 points total]
Class 12: Syntactic Substitutions [30 points]
CourseNana.COM
For Problems 1 – 4, Let p ≡ x – y < f ( a ) ∨ ∀ x . x ≥ a * y → ∃ y . f ( x – y ) > a + y * z and calculate the sub- stitutions below. Show some detail if you want partial credit for a wrong answer. Just do the syn- tactic calculations. Don't do any arithmetic or logical simplifications.
1. [4 points] p[y+z⧸x]
CourseNana.COM
- [6 points] p[a-y⧸y]
- [9 points] p[a*y⧸a]
- [11 points] p[x÷y⧸a][y-z⧸x]
Lecture 13: Forward Assignment; Strongest Postconditions [30 points]
CourseNana.COM
- [3points] GiveanexampleofanSsuchthat⊨{T}S{sp(T,S)}but⊭tot {T}S{sp(T,S)}.
- [5points] Syntacticallycalculatesp(x<y∧x+y≤n,x:=f(x+y);y:=g(x*y)). Don'tsimpli-
fy the result.
CourseNana.COM
For Problems 7 – 9, calculate each sp or wp result syntactically. If simplification is requested, do the syntactic calculation first, then simplify, maintaining logical equivalence unless asked other- wise.
7. [5 points] Calculate and then logically simplify sp(x<x*k,x:=x/2).
CourseNana.COM
- [5 points] Calculate (but don't simplify) wp(x:=x/2,x<x*k).
- [12=2*6 points]. Let S≡if even(n) then n:=n–1fi. (Let even(x)≡x%2=0 and
odd(x)≡x%2=1. Youcantreat¬even(x)≡odd(x)ifyoulike.)
CourseNana.COM
- Calculate and then logically simplify wp ( S , odd( x ) ).
- Calculate and then logically simplify sp ( n = n0 , S ). As part of simplification, drop n0. (The
simplified result will be strictly weaker than the unsimplified result.)
CourseNana.COM
CourseNana.COM
US代写,IIT代写,Illinois Institute of Technology 代写, States Satisfaction代写, State Updates代写,Substitution // Forward Assignment代写, sp代写,US代编,IIT代编,Illinois Institute of Technology 代编, States Satisfaction代编, State Updates代编,Substitution // Forward Assignment代编, sp代编,US代考,IIT代考,Illinois Institute of Technology 代考, States Satisfaction代考, State Updates代考,Substitution // Forward Assignment代考, sp代考,UShelp,IIThelp,Illinois Institute of Technology help, States Satisfactionhelp, State Updateshelp,Substitution // Forward Assignmenthelp, sphelp,US作业代写,IIT作业代写,Illinois Institute of Technology 作业代写, States Satisfaction作业代写, State Updates作业代写,Substitution // Forward Assignment作业代写, sp作业代写,US编程代写,IIT编程代写,Illinois Institute of Technology 编程代写, States Satisfaction编程代写, State Updates编程代写,Substitution // Forward Assignment编程代写, sp编程代写,USprogramming help,IITprogramming help,Illinois Institute of Technology programming help, States Satisfactionprogramming help, State Updatesprogramming help,Substitution // Forward Assignmentprogramming help, spprogramming help,USassignment help,IITassignment help,Illinois Institute of Technology assignment help, States Satisfactionassignment help, State Updatesassignment help,Substitution // Forward Assignmentassignment help, spassignment help,USsolution,IITsolution,Illinois Institute of Technology solution, States Satisfactionsolution, State Updatessolution,Substitution // Forward Assignmentsolution, spsolution,