Question: ( QUESTION 7 ) (10 points total ) SAT and SMT solvers are sometimes u sed to help generate test cases or to enumerate possible

(

QUESTION

7

)

(10

points

total

)

SAT and SMT solvers are sometimes u

sed to help

generate test cases or to enumerate possible

scenarios/states that the system could be in.

You will use that capability to address the issue

below.

As I was using the tea kettle, I noticed the following behavior:

when I set the target

temperature to 212,

even though I press the Keep W

arm button, the tea kettle never goes

into

Keep Warm mode (the indicator light for Keep Warm never turns on).

I assume this

is a safety feature

you probably dont want the kettle to be continuously boiling your

water.

This could lead to the water all boiling away and/or the heating element burning

out.

It is interesting to note that this behavior is not docume

nted in the user manual.

Therefore, we can consider the following as a requirement:

R1:

If the Kettle is On and the Target Temp = 212, then the Keep Warm Mode is Off.

The requirement

R1

above

can be expressed as a propositional logic formula that has

the

following three atomic propositions:

P = Kettle is On [Pre]

Q =

Target Temp = 212 [Pre]

R =

Keep Warm Mode is On

[Post]

Since the formula has three propositional variables, there will be 8 rows in its truth table

(e.g., 8 test cases that will cover

all possibilities of the system state relevant to the

requirement above).

Following the recipe given in class, use Z3 to generate the rows in the truth table (i.e.,

tests) for the requirement R1.

See slides

See slides 44

-

58 and the associated FYTD ex

ercises on slide 59 in the

Automated Reasoning for Propositional Logic lecture.

The solutions for the FYTD

Exercises on slide 59 can be found here:

https://drive.google.com/f

ile/d/0B2v9RmdjXXbUblZBTDZIQm1YcGM/view

Here are some hints:

In 7.txt

(5) points

(a) Express R1 as a propositional logic formula and figure out how to represent it as an assertion in Z3's input language syntax.

(b)

Interact with Z3 to build up the truth table associated with the formula following the recipe illustrated in class. During this process you will construct additional assertions representing the (negation of) the rows in the truth table.

(c) When you have finished the interaction,record in 7.txt each step of the interaction (which contains Z3 assertions representing the formula and the entries of the truth table).

In 7.logika

(5 points)

(d)

Construct a truth table in Logika to check its wellformedness, and using Logika comments, give a one sentence English summary of the intuition of each of the row in the truth table.

( QUESTION 7 ) (10 points total ) SAT and SMT solvers

Page 10 Since the formula has three propositional variables, there will he 8 rows in its truth table (e8 test cases that will cover all possibilities of the system state relevant to the requirement ahove). Following the "recipe" given in class, use Z3 to generate the rows in the truth table (i.e., ests") for the requirement R1 See slides See slides 44 58 and the associared FYTD exercises on side 59 in the Automated Reasoning for Propositional Logic lecture. The solutions for the FYTD Fxercises on slide 59 can be found here: file d/OB2v9 Here are some hints: In 7.txt (5) points (a) Express R1 as a propositional logic formula and figure out how to represent it as an assertion in Z3 s input language syntax. (b) Interact with Z3 to build up the tuth table associated with the formula following the "ecipe illustrated in class. During this process you will construct additional assertions represenling the (egationo the rows in the truth table (c) When you have finished the interaction, record in 7.xt each step of the interaction which contains assertions representing the formula and the entries of the truth table). In 7logika (5 points): (d) Construct a truth table in Logika to check its well-formedness, and using Logika comments,ive a one sentence Enlish summary of the intuition of each of the row in the truth table Page 10 Since the formula has three propositional variables, there will he 8 rows in its truth table (e8 test cases that will cover all possibilities of the system state relevant to the requirement ahove). Following the "recipe" given in class, use Z3 to generate the rows in the truth table (i.e., ests") for the requirement R1 See slides See slides 44 58 and the associared FYTD exercises on side 59 in the Automated Reasoning for Propositional Logic lecture. The solutions for the FYTD Fxercises on slide 59 can be found here: file d/OB2v9 Here are some hints: In 7.txt (5) points (a) Express R1 as a propositional logic formula and figure out how to represent it as an assertion in Z3 s input language syntax. (b) Interact with Z3 to build up the tuth table associated with the formula following the "ecipe illustrated in class. During this process you will construct additional assertions represenling the (egationo the rows in the truth table (c) When you have finished the interaction, record in 7.xt each step of the interaction which contains assertions representing the formula and the entries of the truth table). In 7logika (5 points): (d) Construct a truth table in Logika to check its well-formedness, and using Logika comments,ive a one sentence Enlish summary of the intuition of each of the row in the truth table

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!