To design a procedure to output a response to a terminal input, first design a program to process the entire stream of terminal inputs producing a stream of responses as shown in the system diagram below:

 

Inverting the resulting program with respect to the terminal input stream gives the desired procedure which we may imagine runs under control of a teleprocessing monitor (TM) as shown below:

To design a procedure to respond to a given interrupt, first design an interrupt handler that reads an input stream of interrupts and outputs a stream of responses; then invert the program with respect to its input stream to give the desired procedure.

Problems are sometimes implemented as a network of programs connected by serial data streams. The network can be simplified through inversion as a hierarchy of subroutines.

Consider the linear network below (suggestive of 'pipelining'):

 

Each of the programs, P2,...,Pn-1 can be inverted with respect to its input file, producing the inverted system diagram shown below:

The hierarchical network shown below:

can be inverted, producing: