Layering is a standard software structuring technique
If you’ve taken OS, you’ve seen it in its classic form in Dijkstra’s T.H.E. system
Level 5: User Programs
Level 4: Buffering for input and output devices
Level 3: Operator Console Device Driver
Level 2: Memory Management (Software Paging)
Level 1: CPU Scheduling (priority) P and V operations
Level 0: Hardware
Parnas’ paper discusses layering in terms of the potential ease of extension and contraction of systems
Strictly, one layer can only use operations at the next lower level
This constrains, in the extreme, invocations between components at a given level
This constrains recursion
It prohibits calling down multiple levels
But layering does allow for a nice style of building: a lower layer can be debugged and tested without concern for the higher layers, since there are by definition no dependences
Invokes vs. uses
Parnas discusses how the uses relation is distinct from the invokes relation
A program A uses a program B if the correctness of A depends on the presence of a correct version of B
Requires specification and implementation of A and the specification of B
Again, what is the "specification"? The interface? Implied or informal semantics?
Here's an example where invokes does not imply uses
Invocation without use: name service with cached hints
ipAddr := cache(hostName);
if not(ping(ipAddr))
ipAddr := lookup(hostName)
endif
What is the relationship, if any, between layering and information hiding modules?
HW2 has one question in this regard
Strict application of layering in operating systems is hard; for example, if you have lots of processes, you may not be able to store all your process tables in memory, so you might have a dependency from process table management to virtual memory
Here's a small example of this, taken from the FAMOS operating system (family of operating systems) research project from the early 1980's
An OS might have both a "process ADT" and a "segment ADT", each of which hides secrets such as the data structures to support these functions
But in terms of layering, you might have the structure:
Level 3: Segment management
Level 2: Process management
Level 1: Segment creation
Level 0: Process creation
So, the information hiding modules (the ADTs) span levels in this situation
Language support for layering
Why do we have tons of language support for information hiding modules, but essentially none for layering?
Projects
Projects may be done singly or in pairs
The details of the project must be negotiated with the instructor, but a lot of leeway is permitted
You should start discussing ideas with me early in the quarter
The form of the report may vary, but in general should take the form of a web page accessible to the rest of the class
The project proposal must be negotiated with me no later than Friday February 12, 1999
Projects are due on Thursday March 18, 1999 (but are appreciated earlier!)
For projects done in pairs, the grade will almost certainly be identical for both participants
The project is intended to be a significant one; if it were a term paper, I would like it to be in the 15-20 page range; (like software, it is hard to size projects effectively)
Broad categories that may be acceptable
Application of a software engineering tool, including a retrospective on how the tool did or did not help
An in-depth literature search on a topic in software engineering along with a report on that search
An experiment to test some hypothesis about software engineering
Broad categories that are not likely to be acceptable
Writing code that you have to write anyway
Random (perhaps even deep) thoughts on "how (some aspect of) software engineering should be done"
Projects that include proprietary information that would prohibit dissemination of your work
Examples of possible projects (remember, these are only examples and in all cases, the evaluation of the activity is a crucial part of the project)
Taking or producing a finite state specification (in statecharts, RSML, etc.) and applying model checking techniques to increase confidence in the specification's correctness
Applying existing reverse engineering tools (RIGI, Reflexion Models, etc.) to an existing code base (perhaps some freeware)
Taking or producing a formal specification, converting it to PVS and applying the PVS theorem prover to the specification
Designing and running an experiment that increases our insights in one of the following topics
Does polymorphism make for better programs?
Is the benefit of documentation greater than the opportunity cost of producing it?
What are the sizes of characteristic slices of programs?
Applying existing test coverage tools aggressively to some public domain software