Thick Control Flows: Introduction and Prospects
Ville Leppänen, Martti J. Forsell, Jari-Matti Mäkelä · 2011
Besides correctness of programing, the technical software problem of many contemporary approaches to multithreaded computations is how to organize the co-operation of a huge number of parallel threads. For the software problems, we propose parallel thick control flows as the solution. When a thick control flow (in terms of the number of threads) is executing a statement or an expression of a program, all the threads are considered to execute the same program element synchronously in parallel. Considering method calls, when a control flow with thickness t calls a method, the method is not called separately by each of the t threads, but the control flow calls it only once with t threads. A call stack is not related to each thread but to each of the parallel control flows, since threads do not have program counters – only control flows have program counters. The concept of thread is only implicit. A thick thread-wise variable is an array-like value having a thread-wise actual value. Method signatures naturally advance types with thickness, but non-thick types are also useful. The concept of thick control flow makes the programmer to focus on co-operation of few parallel thick control flows instead of a huge number of parallel threads. The concept computation’s state is promoted as a flow is seen to have a state (instead of each thread). The concept of state has been in a central role in achieving correctness in sequential programs. The concept of thick control flows is related to data parallelism and stream computing. It is a natural generalization of ordinary imperative sequential programming.