Please give detail explanation!!!!!!!!!!! Jimmy has just designed a new language
ID: 3822145 • Letter: P
Question
Please give detail explanation!!!!!!!!!!!
Jimmy has just designed a new language Ji++ with graphical programming capabilities and decided to adopt the hybrid implementation approach. As such, Jimmy designed the JiVM abstract machine, and implemented Ji++ compiler(s) and JiVM emulators using the C language. The following questions are based on the need to run Ji++ programs on the Windows, MacOS, and Linux platforms. Besides giving the answers, you should also provide brief justifications. (i) How many Ji++ compiler(s) has to be written? (ii) How many executable(s) of the Ji++ compiler has to be generated? (iii) How many JiVM emulator(s) has to be written? (iv) How many executable(s) of the JiVM emulator has to be generated? (v) During testing, Jimmy compiled his first Ji++ program on the Windows platform, and transferred the object codes to try to run on the MacOS platform. Do you think that the object codes can run successful on the MacOS? Why or why not?Explanation / Answer
i) 3 Ji++ compilers need to be written
Generally compiler's are platform dependent which means there must be different compiler depending on the platform. Here we want for 3 platforms windows, linux and mac os.
ii) 3 executables needed to be generated
Executables are not same for the multiple platforms. Each platform will have different executables.
iii) 3 Emulator need to be written
Emulators are the virtual machines helps to run the programs. These emulators are different for different platforms. These are platform dependent.
iv) 3 executables needed to be generated
Executables are not same for the multiple platforms. Each platform will have different executables.
v) Yes the object code will run
Object code is platform independent. Compiler will generate this object code. This will run across all the platforms so, there is no problem in compiling the program and generating object code in windows and this code will run successfully in any other platform.