The application of formal logic to programs and programming
CD Allen · IBM Systems Journal · 1971
The techniques required and results obtainable when applying logic to programs are well illustrated by Example 4. Firstly, it demonstrates the possibility of treating program segments in isolation, and using the results obtained directly in their condensed forms in a treatment of the containing program. With this technique, the amount of formalism involved at any one stage in the proof can be kept within reasonable bounds. It also shows that any program computing the dot product under the appropriate conditions may be substituted for the inner loop.