Using Ada for industrial embedded microprocessor applications, II
Arthur G. Duncan, J. S. Hutchison · 1982
In [1], we illustrated how Ada could be used to separate the high level logical operations of an embedded control program from the low level details of how to access the various physical devices controlled by the program. We further illustrated how this information hiding could be achieved without loss of storage or run-time efficiency. In this paper, we continue our investigation by illustrating how one can use the exception handling facility of Ada to separate the normal operation of a control program from the handling of exceptional conditions. The goals are (1) to be able to view the normal flow of control and the error recovery separately, without having to embed one in the other, (2) after recovering from an error, to be able to restart or continue operation of the system, and (3) to accomplish goals 1 and 2 without loss of efficiency.