Abstract

We compare the structural complexity of various classes of structured programs. To achieve this we concentrate on a notion called “reducibility”. Loosely speaking, given two classes of programs C1 and C2, we say that C1 is reducible to C2 (C1≤wC2) if and only if for every program P in C1, there is a program in C2 that computes the same function as P and uses the same primitive actions and predicates as P. If C1 is reducible to C2, but C2 is not reducible to C1, then we say that C1<wC2. We explore this notion of reducibility for several classes of programs. These include: D-charts and BJn-charts, which are programs based on the DO-WHILE construct, a familiar construct in the literature on structured programs; REn-charts, GREn-charts and DREn-charts, which are programs constructed using a continuously repeating block of code with exit statements, similar to the REPEAT-EXIT construct of BLISS; TDn-charts, which are programs based on control structures arising from top-down programming. Several results on these classes of programs are proved here. These results includeo(a)BJn-charts <w BJn+1-charts, and ∪n≥1 BJn-charts <w RE1-charts;(b)REn-charts <w REn+1-charts, GREn-charts <w GREn+1-charts, DREn-charts <w GREn+2-charts;(c)TDn-charts ≤w RE3n-charts. BJn-charts <w BJn+1-charts, and ∪n≥1 BJn-charts <w RE1-charts; REn-charts <w REn+1-charts, GREn-charts <w GREn+1-charts, DREn-charts <w GREn+2-charts; TDn-charts ≤w RE3n-charts. In addition, it is shown that an arbitrary program P is reducible to a D-chart if and only if P does not contain a loop with two distinct exits. The paper concludes by suggesting various open problems.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.