Formal derivation of a class of computers