CS201J: Engineering Software, Fall 2003
|
Notes: Thursday 4 September 2003
Assignments Due
- 9 September: Problem Set 2
For Problem Set 2, you will need to read Chapter 5-5.2, Chapter 6-6.3 and Chapter 10-10.2 and 10.7-10.11. Lab Hours Reminder: there will be staffed lab hours in Small Hall on Sunday 4-7 and Monday 7-9.- If you did not receive a message to the cs201j-students mailing list yesterday, that means I did not receive a registration survey from you before then. If you are in the class, you need to submit a registration survey (http://www.cs.virginia.edu/cs201j/survey.html).
Notes and Questions
What do we need to divide a problem into independent subproblems?
How does a specification constrain a client?
Our procedural specifications will use three clauses:
An implementation of a procedural specification is satisfactory if: if the client satisfies the precondition before the call, the postcondition is always satisfied after the call returns.
- REQUIRES — what the client must satisfy before calling the procedure (the precondition)
- MODIFIES — what state may be modified by the procedure (any state not listed in a modifies clause, may not be modified)
- EFFECTS — what the procedure guarantees will be true after the procedure returns (the postcondition), so long as the client satisfied the precondition in the REQUIRES clause
What is the point of having a MODIFIES clause?
What are the advantages and disadvangates of formal (instead of informal) specifications?
If a procedure's specification has no REQUIRES clause, what is the precondition?
If a procedure's specification has no MODIFIES clause, what can it modify?
What does it mean when a procedure has no EFFECTS clause?
Links
- Some informal specifications: Bill of Rights, US Tax Code, FIFA Laws of the Game. (If you aren't sure if FIFA thinks women can be called offside, read Douglas Hofstadter's A Person Paper on Purity in Language. Read the Post Scriptum on this essay before you find it offensive. This course will be intolerant of sexist language in your specifications and other writing.)
- Messages That Start with the Word "begin" Are Received as a Blank Attachments, Microsoft Knowledge Base
Then you should say what you mean, the March Hare went on.
I do, Alice hastily replied; at least--at least I mean what I say--that's the same thing, you know. Not the same thing a bit! said the Hatter. You might just as well say that "I see what I eat" is the same thing as "I eat what I see"!
You might just as well say, added the March Hare, that "I like what I get" is the same thing as "I get what I like"!
You might just as well say, added the Dormouse, who seemed to be talking in his sleep, that "I breathe when I sleep" is the same thing as "I sleep when I breathe"!
It IS the same thing with you, said the Hatter, and here the conversation dropped, and the party sat silent for a minute, while Alice thought over all she could remember about ravens and writing-desks, which wasn't much.
University of Virginia Department of Computer Science CS 201J: Engineering Software |
Sponsored by the National Science Foundation |
cs201j-staff@cs.virginia.edu |