A Formal Approach to Reactive System Design