13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

250 The User Interface Chapter 7references, and even drawings. In other cases, these features are provided by separateprograms that convert higher-level descriptions into more primitive pieces. For example,formulas can be converted into page-location and font-selection commands. Simpledrawings can be converted to short line segments.Some editors for bit-mapped display terminals combine the functions of text editingand formatting. The terminal displays a reasonably accurate facsimile of the documentthat will actually be produced.3.2 Program preparationUniversity environments often have computer installations where a large proportion oftime is spent building programs. A similar situation holds in software houses andresearch labs. The ‘‘life cycle’’ of programs involves the following steps:(1) Define the requirements.(2) Choose data structures and algorithms.(3) Write a program.(4) Verify that the requirements are met.(5) Compile, link, and run the program.(6) Test the program and diagnose the errors.(7) Maintain the program.Unfortunately, these milestones are not sequential. Step 4 could discover that therequirements are not met, in which case the programmer may need to return to step 3 (orpossibly step 1). Step 5 often turns up problems, both major and minor, that force theprogrammer to retrace some steps. Step 6 turns up harder problems, some of which maybe very difficult to diagnose. As errors are corrected, the programmer may have toretreat all the way to step 1 or, more commonly, to step 3. Step 7 involves keeping theprogram running even though the requirements may change. It is often performed by agroup of people different from the group involved in the other steps.Tools exist to assist the programmer during various steps in the life cycle of a program.There are no particularly good tools for the first two steps. Program requirementscan sometimes be written as assertions about the relationship between input and output;these assertions have a mathematical flavor.Writing the program usually involves the text editor, which may have somefeatures specifically designed for editing programs. These features include automaticindentation, checking for parenthesis balance, and ability to find declarations of variablesquickly. Some experimental editors are tailored to particular programming languages.They can enforce syntactic correctness, prompt the programmer for declarations, correctsyntax errors, and even check that types match.If the requirements for the program are expressed in mathematical form, someexperimental tools can help verify that a given program satisfies those requirements.However, these tools are still quite primitive and expensive.Many tools have been written for the compilation phase. Modern languages arevery helpful in promoting a clear program structure and in providing information (like

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!