Formal design methods for computer-aided design