What's the result of an interpreter? Will it change high-level language into assembly language or machine language, which is binary code?
If it's the latter, does that mean interpreted language doesn't have relation with Introduction sets?
One language can only has one interpreter? Is it because interpreter doesn't do any optimization, so we don't need to find a better interpreter?
What's the result of an interpreter?
The result of the interpreter is the result of the interpreted program. So if you have the program print "hello"
, the result of running the interpreter is that "hello" is printed to the screen.
This is what differentiates an interpreter from a compiler where the result would be an executable file and only when running that file, "hello" would be printed to the screen.
Will it change high-level language into assembly language or machine language, which is binary code?
It might (if your definition of "interpreter" includes JIT-compilers), but often an interpreter only produces intermediate byte code and then interprets that without producing either assembly or machine code. And a basic interpreter might not generate any kind of code and just execute the source code directly.
If it's the latter, does that mean interpreted language doesn't have relation with Introduction sets?
(I assume you mean instruction sets).
If an interpreter produces assembly or machine code, it will have to care about the instruction set of the CPU it's being run on. If it doesn't, it won't.
One language can only has one interpreter?
No, the same language can have as many different interpreters and compilers as people are willing to write. It is not unusual for a language to have multiple interpreters.
Is it because interpreter doesn't do any optimization, so we don't need to find a better interpreter?
No. Interpreters can and do perform optimization, though generally less than compilers do because, since there is no separate compilation step, any time spent on optimization increases the start-up time of the program.