Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Which kind of dynamic semantics technique is associated with rephrasing a progra

ID: 3793236 • Letter: W

Question

Which kind of dynamic semantics technique is associated with rephrasing a program into a simpler well-know language (such as bytecode) and running t on virtual machine? a. Operational semantics b. Axiomatic semantics c. Denotational semantics d. Java semantics e. None of the above Semantic evaluation can involve formal methods (like denotational semantics) to prove that a program is correct Why is it important to be able to PROVE that a program is correct? Who cares? Under axiomatic semantics, given the following: a = b * 40 + 20 {a > 100 > where {a > 100} is the post-condition (output) required, what is... ..the weakest pre-condition? _____ ..one other valid pre-condition?______

Explanation / Answer

Answer

29.

d. Java Semantics

because Java Semantics can formally specify bytecode using the B method

30.

It is important to be able to prove that a program is correct because of the following reason:

i. so that it can be proven that the program is "sound" to reason about a particular (operational) interpretation strategy using a particular (axiomatic) proof system.

ii. so that it can be demonstrated that the low-level machine faithfully implements the high-level machine.

The hardware and software cares for the correctness of a program.

31.

given post condition:

a > 100

Substituting the value of a from what is given

b * 40 + 20 > 100

b * 40 > 80

b > 2

So, the weakest pre condition is b > 2

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote