Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4. Conditional assignments (10 points). When rummaging through the syntax manual of other imperative programming language and comparing them to the while language considered in
4. Conditional assignments (10 points). When rummaging through the syntax manual of other imperative programming language and comparing them to the while language considered in class, a clever student found that we totally neglected their favorite feature of conditional assignments. Indeed, the conditional assignment x :=Q?el : e2 that assigns term el to variable x if formula Q is true and otherwise assigns term e2 to x is missing. Your job is to define a semantics [0 := Q?el : e2] for the conditional assignment 2 :=Q?el : e2 as the set of all pairs of initial and final states of running x := Q?el : e2. After having done so, your next task is to design a sound axiom for it: ([:=?:]) [x :=Q?el : e2]p(x) + 5. Now prove it! (10 points). Use the semantics from part 4 to prove that your axiom is sound, i.e., that it is a valid formula of dynamic logic
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started