simulator generation function, except instruction.cpp