Using Trace Formulae for Security Protocol Design