add codegen factory method

Conflicts:

	src/main/scala/lancet/interpreter/Interpreter_LMS.scala