1. The first step in developing a hybrid implementation of a programming language is to design...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. The first step in developing a hybrid implementation of a programming language is to design an ab- stract machine. In order to execute a program written in the source language, we need a compiler that translates the source and generates object codes in the abstract machine language, which are in turn interpreted by an abstract machine emulator running on the target computer. Java is a good example language enjoying a hybrid implementation. (a) (2 marks) Give a disadvantage of hybrid implementations with respect to the compilation approach. Explain why. (b) (4 marks) Give two potential good uses (or advantages) of hybrid implementations over the compilation approach. (c) 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 lan- guage. The following questions are based on the need to run Ji++ programs on the Win- dows, MacOS, and Linux platforms. Besides giving the answers, you should also provide brief justifications. (i) (2 marks) How many Ji++ compiler(s) has to be written? (ii) (2 marks) How many executable(s) of the Ji++ compiler has to be generated? (iii) (2 marks) How many JiVM emulator(s) has to be written? (iv) (2 marks) How many executable(s) of the JiVM emulator has to be generated? (v) (2 marks) 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? 1. The first step in developing a hybrid implementation of a programming language is to design an ab- stract machine. In order to execute a program written in the source language, we need a compiler that translates the source and generates object codes in the abstract machine language, which are in turn interpreted by an abstract machine emulator running on the target computer. Java is a good example language enjoying a hybrid implementation. (a) (2 marks) Give a disadvantage of hybrid implementations with respect to the compilation approach. Explain why. (b) (4 marks) Give two potential good uses (or advantages) of hybrid implementations over the compilation approach. (c) 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 lan- guage. The following questions are based on the need to run Ji++ programs on the Win- dows, MacOS, and Linux platforms. Besides giving the answers, you should also provide brief justifications. (i) (2 marks) How many Ji++ compiler(s) has to be written? (ii) (2 marks) How many executable(s) of the Ji++ compiler has to be generated? (iii) (2 marks) How many JiVM emulator(s) has to be written? (iv) (2 marks) How many executable(s) of the JiVM emulator has to be generated? (v) (2 marks) 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?
Expert Answer:
Related Book For
Using Financial Accounting Information The Alternative to Debits and Credits
ISBN: 978-1133161646
7th Edition
Authors: Gary A. Porter, Curtis L. Norton
Posted Date:
Students also viewed these computer network questions
-
Image transcription text Module 5 Discussion A' Instructions: This discussion will be completed in two parts, and will give you an opportunity to reect upon this week's content and to interact with...
-
Portray in words what transforms you would have to make to your execution to some degree (a) to accomplish this and remark on the benefits and detriments of this thought.You are approached to compose...
-
Interactive promotion allows customers and companies to work together to create mutually beneficial exchange relationships in an ongoing dialogue. True or false
-
What are some general properties and characteristics of covalently bonded materials?
-
You're trying to save to buy a new $150,000 Ferrari. You have $35,000 today that can be invested at your bank. The bank pays 2.1 percent annual interest on its accounts. How long will it be before...
-
Sketch curves, to the same scale, of kinetic energy versus time for an elastic collision between cart A, originally moving with speed \(v\), and cart \(\mathrm{B}\), originally at rest, when (a)...
-
Use the Rolling Hills data from Problem 14-27A. Requirements 1. Prepare the 2012 statement of cash flows by the direct method. 2. How will what you learned in this problem help you evaluate an...
-
Fickel Company has two manufacturing departments-Assembly and Testing & Packaging. The predetermined overhead rates in Assembly and Testing & Packaging are $20.00 per direct labor-hour and $16.00 per...
-
Martin & Associates borrowed $5,000 on April 1, 2010 at 8% interest with both principal and interest due on March 31, 2011 how much should be in the firm's interest payable account at December...
-
The Procter & Gamble Company (P&G) is a force in the global marketplace. It is the biggest U.S. advertiser at some $5 billion annually, and spends a staggering $9 billion annually worldwide on...
-
In 2015, the government of Saudi Arabia announced an ambitious plan, known as Vision 2030, to diversify the economy beyond oil. Saudis plans to modernize its economy will require copious funding,...
-
Alibaba Group Holding Limited (alibaba.com) was founded in 1999 by Jack Ma as an e-commerce company to facilitate sales among companies that provide consumer-to-consumer, business-to-consumer, and...
-
Your company, a white goods manufacturer (primarily major kitchen appliances) based in the United States, has decided to pursue international expansion opportunities in sub-Saharan Africa. To achieve...
-
Fortune conducts an annual survey and publishes the rankings of the worlds most admired companies. Locate the most recent ranking available, and focus on the factors used to determine which companies...
-
Write a brief note on Total Reward, in which you address the following: Introduction, substantial topic headings and sub-headings, and conclusion
-
On October 31 Juanita Ortega, owner of Outback Guide Service, received a bank statement dated October 30. Juanita found the following: 1. The checkbook has a balance of $2,551.34. 2. The bank...
-
Define human communication.
-
______________ refers to the location, time, and occasion where communication occurs.
-
Identify the four steps of the KEYS process.
Study smarter with the SolutionInn App