CpSc 372
Exam 2
Name______________________________________________
Answer any FOUR of the five questions. Place a large X on the question you are omitting. If you answer all five, the one on which you score the best will NOT be counted. All questions are counted the same: 25 points each. Answer all parts of each question.
You can not have a laptop in the exam. You may have the class notes, handouts, copies of submitted homework. You have from 12:30 am until 1:45am for the exam.
d. The proof shows that the program correctly implements the specification by not changing the entering parameter value.
e. The SDK provides more faithful user interface and the Petri Net representation provides a more faithful execution of the inter-process communication. The disadvantage is that the behavior modeled is more coarse grained than actual execution.
f.
“All paths” executes every way to traverse the code
including the maximum number of traversals of all iterative statements while “all
branches” only covers at least one way to get to each decision statement but
not all ways to get to each decision
Deadlock would be represented by a halt to the forward traversal along the petri net. Where it stops helps determine where the problem is located.
The percentage of attributes for which the architecture is analyzed.
The MVC pattern would be used to decompose the client. The model would handle the interaction with the server to hide where the data comes from from the views and controllers.
process DefaultClientProcess
features
put: in event
data port;
get: out event
data port;
end DefaultClientProcess;
process
implementation DefaultClientProcess.impl
subcomponents
clientThread:
thread interactWithClient.basic;
connections
connection2: event data port put -> clientThread.receiveData;
connection1: event data port clientThread.requestData -> get;
end DefaultClientProcess.impl;
The plugin extends (inherits from) an abstract plugin. Then the new plugin can be polymorphically passed as a parameter into the platform.
The Junit hierarchy of test classes can follow the same hierarchy as the plugins hierarchy.
The two pieces are the specification and the implementation. By separating, there can be multiple implementations of each specification. The elements of the specification are used at the beginning and the end of the implementation to show the inputs and the outputs of the implementation.
Pre-condition
Post-condition
Invariant
Pre: defines the conditions under which the contract applies
Post: defines the guarantee of service provided the pre-condition is met
Invariant: the conditions that do not change for the life of the contract
Some of the test cases should be devoted to searching for the faults that are defined in the fault model. The design review should search to see if the design contains these faults.
SONAR would be executed after each code check in or at least at the end of each iteration.
The two groups need to have different perspectives. The core asset team takes the long term investment view and consider all products while the product builders take a short term focused view on one product.
Inheritance is static
In the Inception phase testers help determine if
requirements are testable; in the elaboration phase test cases are written to
help ensure that the specification is complete; in the construction phase
actual code is tested ; in the transition phase system
and acceptance tests are conducted as the product is deployed
For all questions about reasoning tables use this example.
Procedure Inc_Dec(I:integer)
Requires Min_Int <= I and
(I+1) <= Max_Int
Ensures I = #I
Procedure
Increment(I);
Decrement(I);
End
Reasoning Table
|
State |
Code |
Assume True |
Confirm True |
|
0 |
|
Pre_condition of Inc_Dec I0+1 <= MAX_Int |
Pre_condition for Increment I0<=MAX_int |
|
|
Increment(I) |
|
|
|
1 |
|
Post_condition of Increment I1=I0+1 |
Pre_condition for Decrement MIN_int<=(I1-1) |
|
|
Decrement(I) |
|
|
|
2 |
|
Post_condition for Decrement I2=I1-1 |
Post condition for Inc_Dec I2=I0 |
<= (less than or equal to)