The invention belongs to the technical field of computer
transplantation, and particularly relates to a
binary translation intermediate representation
correctness testing method and device based on
semantic equivalence verification, and the method comprises the steps: building a mapping rule between a source platform instruction and an intermediate representation; Performing state initialization on the intermediate representation, and constructing a
test case; And for the
test case, independently executing the source platform instruction and the intermediate representation respectively, and judging whether the
semantics between the source platform instruction and the intermediate representation are equivalent or not according to an independent execution result. According to the invention,an
intermediate code correctness test irrelevant to a specific
system architecture can be realized; a
black box and
white box testing method is combined; The method can quickly, efficiently and accurately locate the problems existing in the
binary translation intermediate representation, improves the test accuracy and efficiency, further shortens the
software development test period, guarantees the
software quality and reliability, and has a certain guiding significance for
binary translation tests between different platforms and the
computer software cross-platform
transplantation technology.