Monitor tasks, also known as passive tasks, are a kind of Ada task that is subject to well-known and very powerful optimization. In most compilation systems that perform this optimization, monitor tasks are identified to the complier by the user, via an implementation-defined pragma. This paper describes an alternate approach, whereby the compiler automatically recognizes and optimizes monitor tasks, without need of a pragma, compiler option, or any other user action. The advantages and disadvantages of this approach are discussed, both in terms of the functional impact to the user and the execution-time efficiency of the optimization.
/lp/association-for-computing-machinery/automatic-compiler-recognition-of-monitor-tasks-JTIyaz8zNH