Structured tasks
Frederick C. Hathorn · 1989
The inclusion of concurrent programming abstractions in modern programming languages such as Ada, has resurrected a well-known dilemma of the late 60's--How should programs be written so that source code readability, program understanding, debugging, testing and modification are all facilitated?The solution of the 60's was to use structured programming.But this applies unconditionally only to sequential programs, however.Concurrent programs of the 80's allow multiple tasks, conceptually executing simultaneously with independent threads of control.And multiple threads of control violate one of the fundamental assumptions of structured sequential programming.So what model then, can we use for developing concurrent programs?This paper briefly discusses some of the concurrent programming paradigms which have been proposed over the past decade.It then focuses on recent thinking within the Ada community about concurrent programming development.Two classes of tasks, calling tasks and service tasks, are defined and a theorem, the Structured Task Theorem, is proposed and proved.The theorem demonstrates that calling and service tasks are the basic components of concurrent programs.Furthermore, since calling and service tasks are sufficient for all concurrent programs they may collectively serve as the underlying model for concurrent program development. PARAI I FL PROCESS PARADIGMSIn 1966, Bohm and Jacopini published a seminal paper which laid the theoretical foundations for structured sequential programming.Essentially, they showed that any algorithm having a single entry and a single exit point could be programmed using only sequential composition, alternative selection (if-then-else), and