Formal methods in system design