The Way of Z: Practical Programming with Formal Methods