13.07.2015 Views

Software Design 2e - DIM

Software Design 2e - DIM

Software Design 2e - DIM

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.

308Jackson Structured Programming (JSP)Figure 14.18 Example of a boundary clash: two views of a text file. (a) From the programmer’sviewpoint. (b) From the operating system’s viewpoint.known as ‘program inversion’. However, as has been observed by Cameron (1988a),it is unfair to regard program inversion as simply a means of resolving structureclashes. It can be used to assist with the structuring of solutions to other types of problem,including interactive programs and interrupt-handling programs (Sanden, 1985).There is not enough space to give a detailed account of program inversion in thischapter, but the basic idea behind it can be summarized fairly briefly. In order to useinversion, we adopt the form of solution that was originally identified as appropriatefor the example of the Christmas payments, which is to design two programs thatshare a common data structure. In that example, this requires that one of the originalfiles be sorted into an intermediate file, and that the sorted file be the input to the

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

Saved successfully!

Ooh no, something went wrong!