From requirements to specification: a formal perspective