Question: Need help 6. We would like to extend the self-interpreter u. while for WHILE (discussed in Lecture 7 and available from our Canvas site) so

Need help

Need help 6. We would like to extend the self-interpreter u. while

for WHILE (discussed in Lecture 7 and available from our Canvas site)

6. We would like to extend the self-interpreter u. while for WHILE (discussed in Lecture 7 and available from our Canvas site) so that it can also interpret WHILE++ programs in abstract syntax. Due to the architecture of the self- interpreter program you only need to change the implementation of the step macro STEPn.while (which will be released on our Canvas site just after the last seminar at the end of Week 4). Note that you just have to add the required additional code for the iterator. Submit the answer to this question in a separate text file STEPL.while. One must be able to successfully run the universal program u as interpreter for WHILE++ changing its STEPn.while macro call to a STEPL.while macro call. This is how we will test your answer and you should test yours in this way before submitting. You won't get marks if your STEPL macro is syntactically incorrect. Also make sure you test that your code does not lead to non-termination. This often happens when one does not clear the command stack properly. In your STEPL.while program you may use macro calls to any program published on the Canvas site but if you do so, please don't include them in your submission. You must not call any self-defined programs. Add some comments to the code you add to help the marker understand what you are doing. [22 marks] 6. We would like to extend the self-interpreter u. while for WHILE (discussed in Lecture 7 and available from our Canvas site) so that it can also interpret WHILE++ programs in abstract syntax. Due to the architecture of the self- interpreter program you only need to change the implementation of the step macro STEPn.while (which will be released on our Canvas site just after the last seminar at the end of Week 4). Note that you just have to add the required additional code for the iterator. Submit the answer to this question in a separate text file STEPL.while. One must be able to successfully run the universal program u as interpreter for WHILE++ changing its STEPn.while macro call to a STEPL.while macro call. This is how we will test your answer and you should test yours in this way before submitting. You won't get marks if your STEPL macro is syntactically incorrect. Also make sure you test that your code does not lead to non-termination. This often happens when one does not clear the command stack properly. In your STEPL.while program you may use macro calls to any program published on the Canvas site but if you do so, please don't include them in your submission. You must not call any self-defined programs. Add some comments to the code you add to help the marker understand what you are doing. [22 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!