1. A method for static detection and categorization of information-flow downgraders, comprising: transforming a program stored in a memory device by statically analyzing program variables to yield a single assignment for each variable in an instruction set; translating the instruction set to production rules with string operations to identify a finite set of strings; generating a context-free grammar from the production rules; and identifying an information-flow downgrader function by checking the finite set of strings against one or more function specifications.