1. A method of analyzing a security specification, the method comprising: identifying a downgrader in a computer program under test; via a processor, performing testing on the downgrader in a first level of analysis; responsive to the downgrader not passing the testing performed in the first level of analysis: automatically synthesizing a counter example for the downgrader, wherein synthesizing the counter example for the downgrader comprises encoding as a first logical formula a complement of a regular pattern asserting a security property of a method corresponding to the downgrader, encoding as a second logical formula instructions of the method within a call graph, and feeding the first logical formula and the second logical formula into a string-analysis solver; creating a test unit for the downgrader using the counter example as an input parameter to the downgrader; and executing the test unit to perform testing on the downgrader in a second level of analysis.