Identify the clauses that go with predicate p

Identify the clauses that go with predicate p

1. Use the following predicate to answer (a)-(c) below:

p = a ∧ (~b v c)

(a) Identify the clauses that go with predicate p.

(b) Compute (and simplify) the conditions under which each of the clauses determines predicate p. Show your work for partial credit.

(c) Write the complete truth table for all clauses. Label your rows starting from 1. Use the format in the example underneath the definition of Combinatorial Coverage in Section 3.2. That is, row 1 should be all clauses true. You should include columns for the conditions under which each clause determines the predicate, and also a column for the predicate itself.

2. Use the following predicate to answer (a)-(f) below:

p = a ∧ (~b v ~c)

(a) Give the complete truth table for all clauses.

(b) Identify all pairs of rows from your table that satisfy General Active Clause Coverage (GACC) with respect to each clause.

(c) Identify all pairs of rows from your table that satisfy Correlated Active Clause Coverage (CACC) with respect to each clause.

(d) Identify all pairs of rows from your table that satisfy Restricted Active Clause Coverage (RACC) with respect to each clause.

(e) Identify all 4-tuples of rows from your table that satisfy General Inactive Clause Coverage (GICC) with respect to each clause. Identify any infeasible GICC test requirements.

(f) Identify all 4-tuples of rows from your table that satisfy Restricted Inactive Clause Coverage (RICC) with respect to each clause. Identify any infeasible RICC test requirements.

3. Given the below Truth Table, identify all pairs of rows that satisfy RACC for major clause a (Pa).

  a b c d P
1 T T T T T
2 T T T F T
3 T T F T T
4 T T F F T
5 T F T T T
6 T F T F T
7 T F F T T
8 T F F F T
9 F T T T F
10 F T T F F
11 F T F T F
12 F T F F F
13 F F T T F
14 F F T F F
15 F F F T F
16 F F F F F

4. Answer questions (a) and (b) for the method threePred() below:

public String threePred (int x, int y, int z)

{

boolean w;

if (x <= y)

w = true;

else

w = false;

if (w  && x+y == 10 && z < x)

return “A”;

else

return “B”;

}

(a) Identify test inputs for threePred() that achieve Restricted Active Clause Coverage (RACC).

(b) Identify test inputs for threePred() that achieve Restricted Inactive Clause Coverage (RICC).

5. Consider the following deterministic finite state machine and answer questions (a)-(c):

Current State Condition Next State
Idle a v b Active
Active a ^ b Idle
Active ¬b WindDown
WindDown a Idle

(a) Draw the finite state machine.

(b) This machine does not specify which conditions cause a state to transition back to itself. However, these conditions can be derived from the existing conditions. Derive the conditions under which each state will transition back to itself.

HINT: Take the negation of the conditions on each outgoing transition, and “and” them together.

(c) Find CACC tests for each transition from the Active state.

6. Use the following function to answer (a)-(b) below:

f = ab + a¯bc + ¯a¯bc

(a) Draw the Karnaugh maps for f and ¯ f.

(b) Find the nonredundant prime implicant representation for f and ¯ f.

Order from us and get better grades. We are the service you have been looking for.