package listeners; import gov.nasa.jpf.ListenerAdapter; import gov.nasa.jpf.vm.Instruction; import gov.nasa.jpf.vm.ThreadInfo; import gov.nasa.jpf.vm.VM; /** * This listener prints the mnemonics of the executed bytecode instructions. * * @author Franck van Breugel */ public class Mnemonics extends ListenerAdapter { /** * Whenever an instruction is to be executed, prints its mnemonic. * * @param vm JPF's vm. * @param thread thread currently running. * @param instruction instruction to be executed next. */ public void executeInstruction(VM vm, ThreadInfo currentThread, Instruction instruction) { System.out.println(instruction.getMnemonic()); } }