Published online by Cambridge University Press: 03 September 2009
In this chapter we discuss the concept of pathwise decomposition in more detail. First, we need to formally define some terms so that we can speak precisely and concisely.
In abstract, by pathwise decomposition we mean the process of rewriting a program into an equivalent program set, consisting of more than one element. To be more precise, we have the following definition.
Definition 5.1a
Given a piece of source code /\C;S, to decompose it pathwise is to find a program set {/\C1;S1, /\C2;S2, …, /\Cn;Sn} such that
/\C;S ⇔ {/\C1;S1, /\C2;S2, …, /\Cn;Sn},
n > 1,
Ci ⋀ Cj ≡ F for any i ≠ j, and
C1 ⋁ C2 ⋁… ⋁ Cn. ≡ C.
Presumably, it is written to implement a function that can be decomposed pathwise, as subsequently described.
Definition 5.1b
Given a function, say, f, to decompose it pathwise is to rewrite it in such a way that it includes a description of the following elements:
f: X → Y,
f = {f1, f2,…, fm},
X = X1 ⋃ X2 ⋃… ⋃ Xm,
fi: Xi → Y for all 1 ≤ i ≤ m.
Definition 5.2a
A set {/\C1;S1, /\C2;S2,…, /\Cn;Sn} of subprograms is said to be compact if, for any i ≠ j, Ci ⋀ Cj ≡ F implies that Si is not logically equivalent to Sj.
Intuitively, a program set is said to be compact if every subprogram computes a different function. We can characterize a set of subfunctions in a similar manner.
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.