A method of validating binary code transformation in one aspect includes
analyzing original program and transform program. Control flow graphs are
generated for both programs. The two graphs are traversed to create
respective linear invariant representations. The linear representations
are compared to identify incorrect transformations.