Logical Derivation of Computer Programs