Published online by Cambridge University Press: 05 June 2012
Introduction
This chapter will introduce a far-reaching generalization of the concept of a function. Its definition will reflect the fact that it could be implemented on a computer by a list with two columns, one column with entries from one set, and the other column with entries from a second set. This is a simple example of a relational database.
The idea of a cartesian product of two sets introduced in Chapter 3 is a very powerful one, and will enable us to considerably extend the range of applications we can model.
Example 4.1 In a Modula-2 program, several procedures Proc_1, Proc_2, Proc_3, …, are defined. In the definition of Proc_1, there are calls to both Proc_2 and Proc_1 itself. In Proc_2, there are calls to Proc_1 and Proc_3. In Proc_3, there are calls to Proc_2, and Proc_5, and so on. It is required to find the exact dependency of each procedure on any others, both directly and indirectly.
If we can tabulate the direct dependencies, then we can find all of the indirect ones too, by chasing through chains of direct calls. To find the effect of a call of any procedure, we merely need to create a list or database of pairs of procedure names, listing (Proc_i, Proc_j) whenever Proc_i calls Proc_j. The list is as in Figure 4.1.
To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.