CS686 Assignment 7: Dependable Computing - Individual Reading and Activity - Prof. John Kn, Assignments of Computer Science

Information about assignment 7 for the cs686 course at the university of virginia, focusing on dependable computing. Students are required to complete individual reading assignments and activities, including summarizing readings and determining loop invariants. Group projects involve designing test harnesses and discussing system software dependencies.

Typology: Assignments

Pre 2010

Uploaded on 07/29/2009

koofers-user-dns
koofers-user-dns 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1
Department of Computer Science University of Virginia
CS686 - DEPENDABLE COMPUTING
ASSIGNMENT 7
DUE: APRIL 21
Please type the Reading and Individual Activity parts of the assignment single spaced, 12pt type
with 1” margins, and indented paragraphs with no space between paragraphs. Be sure to include a
face page with course number and course name, assignment number, date, and your name.
For the project part, follow the project document guidelines.
Individual Reading
Complete the readings from assignment 6. In the e-mail I sent out, I deferred several items from
the list, so the list for this assignment should be:
(i) Barnes chapter 2. Please work with the rest of your group to schedule the use of your group’s
copy of the book. (ii) Storey chapter 12. (iii) Paper 23 on the class Web site. Prepare a half-page
summary. Turn in your summary.
Individual Activity
As with the reading, two questions were deferred from assignment 6.
1. Complete whichever two questions from assignment 6 you deferred.
2. Consider the following piece of program:
i, max : integer;
values : array[1..100] of integer;
i := 2;
max := values[1];
while i <= 100 loop
if max < values[i] then
max := values[i];
i := i + 1;
end loop
Determine the loop invariant. State the invariant as a SPARK assertion.
3. Java uses a garbage collection approach to reclaiming dynamic storage. Is it possible for a
Java program to “leak” memory? If so, why? If not, why not?
4. Dynamic memory management is problematic for safety-critical systems, and SPARK Ada
specifically disallows it. What are the issues that make dynamic memory management prob-
lematic?
5. In full Ada, exceptions are propagated up the dynamic call chain until a handler is found.
SPARK Ada specifically disallows all exceptions because they are not easy to analyze. Would
the inclusion of exception handlers in every function and procedure along with a static check
of the handlers being there be a way to allow Ada exceptions in SPARK Ada? If so, why? If
not, why not?
pf2

Partial preview of the text

Download CS686 Assignment 7: Dependable Computing - Individual Reading and Activity - Prof. John Kn and more Assignments Computer Science in PDF only on Docsity!

Page 1

Department of Computer Science University of Virginia

CS686 - D EPENDABLE COMPUTING

ASSIGNMENT 7

DUE: A PRIL 21

Please type the Reading and Individual Activity parts of the assignment single spaced, 12pt type with 1” margins, and indented paragraphs with no space between paragraphs. Be sure to include a face page with course number and course name, assignment number, date, and your name. For the project part, follow the project document guidelines.

Individual Reading

Complete the readings from assignment 6. In the e-mail I sent out, I deferred several items from the list, so the list for this assignment should be: (i) Barnes chapter 2. Please work with the rest of your group to schedule the use of your group’s copy of the book. (ii) Storey chapter 12. (iii) Paper 23 on the class Web site. Prepare a half-page summary. Turn in your summary.

Individual Activity

As with the reading, two questions were deferred from assignment 6.

  1. Complete whichever two questions from assignment 6 you deferred.
  2. Consider the following piece of program:

i, max : integer; values : array[1..100] of integer; i := 2; max := values[1]; while i <= 100 loop if max < values[i] then max := values[i]; i := i + 1; end loop Determine the loop invariant. State the invariant as a SPARK assertion.

  1. Java uses a garbage collection approach to reclaiming dynamic storage. Is it possible for a Java program to “leak” memory? If so, why? If not, why not?
  2. Dynamic memory management is problematic for safety-critical systems, and SPARK Ada specifically disallows it. What are the issues that make dynamic memory management prob- lematic?
  3. In full Ada, exceptions are propagated up the dynamic call chain until a handler is found. SPARK Ada specifically disallows all exceptions because they are not easy to analyze. Would the inclusion of exception handlers in every function and procedure along with a static check of the handlers being there be a way to allow Ada exceptions in SPARK Ada? If so, why? If not, why not?

Page 2

Department of Computer Science University of Virginia

Group Project

As I mentioned in class, the project concept that I had is probably a bit too elaborate for our pur- poses. The goal, of course, is to maximize learning and minimize pain. With that in mind, I con- clude that there is not a lot to be learned from a firedrill approach to completing an implementation. In this and the next assignment, we will work on topics more likely to yield edu- cational value.

  1. Consider the problem of testing the system that you have been considering. Based on your group’s thinking and the discussion in Storey chapter 12, design a test harness for the project system. Pay particular attention to: (a) the overall architecture of the test harness; (b) testing the timing requirements; (c) ensuring that the test environment is as close as possible to the actual operational environment; (d) how you will define a “test case”; (e) how you will syn- thesize the necessary inputs; (f) how you will determine whether the system you are testing is working correctly; (g) measurement of test coverage metrics; (h) and how you will automate the whole thing.
  2. Consider the problem of your system development stopping with source code. Your system depends for its correct operation on various pieces of system software as we discussed in class. As a group activity, create a list of the system software upon which you depend and dis- cuss the problems that this dependence causes. Pay particular attention to: (a) the spectrum of problems that might arise in the system software; (b) the severity of the various problems; and (c) how you might detect the presence of defects during development so as to deal with them before your software is deployed, e.g., could you test some of the system software?