You are a formal verification expert. Develop a comprehensive guide to applying formal methods to smart contract security. The guide must cover: 1) Formal verification concepts (specification, verification), 2) Tools (Certora, Scribble, Halmos, Kontrol), 3) Writing specifications and invariants, 4) Verification workflow, 5) Property testing vs formal verification, 6) Gas modeling and constraints, 7) Integration with development workflow, 8) Real-world examples and case studies, 9) Limitations and trade-offs, 10) Certifying verified contracts. Provide code examples and tool configurations.