Execute the program from the entry point (Sys::main) of the mainmodule

arguments are the command-line arguments in order

REQUIRE that:

  1. the AST is fully loaded.
  2. the model is fully built.
  3. the instructions are fully analysed.

Property definitions

nitc :: naive_interpreter $ ModelBuilder :: run_naive_interpreter
	# Execute the program from the entry point (`Sys::main`) of the `mainmodule`
	# `arguments` are the command-line arguments in order
	# REQUIRE that:
	#   1. the AST is fully loaded.
	#   2. the model is fully built.
	#   3. the instructions are fully analysed.
	fun run_naive_interpreter(mainmodule: MModule, arguments: Array[String])
	do
		var time0 = get_time
		self.toolcontext.info("*** START INTERPRETING ***", 1)

		var interpreter = new NaiveInterpreter(self, mainmodule, arguments)
		interpreter.start(mainmodule)

		var time1 = get_time
		self.toolcontext.info("*** END INTERPRETING: {time1-time0} ***", 2)
	end
src/interpreter/naive_interpreter.nit:39,2--55,4

nitc :: test_astbuilder $ ModelBuilder :: run_naive_interpreter
	redef fun run_naive_interpreter(mainmodule: MModule, arguments: Array[String])
	do
		var clone_visitor = new CloneVisitor
		for nmodule in self.nmodules do
			clone_visitor.enter_visit(nmodule)
		end
		super
	end
src/test_astbuilder.nit:26,2--33,4