Aarohi’s Status Update for April 25

Aarohi’s Status Update for April 25

Progress

This week I worked on three major things. We had our demo on Wednesday, during which I realized that the interpreter doesn’t throw errors in many cases: for example, when a single “<” symbol was the only tile, or if I had a nonsense statement such as “if print”. My first task of the week was therefore to comb through the interpreter and throw errors wherever possible. Almost all of these were new syntax errors.

Then, I worked on function implementation. I decided to have two main function related subfunctions: identifying a function, where we just store the information of that function, and calling the function, where we go back to that position in the code where that function is defined and run that piece of code. Identifying a function is straightforward, since we just need to add the position of the function, identify if the function takes in an argument (currently, we are only dealing with functions that take one argument), and where the function ends (for return position). However, running a function is more tricky, since we need to

  1. deal with scope: for this, I’m considering creating a stack (or a map) that points to the current variable values (representing the current scope).
  2. Whether the function can be a standalone line or an expression. Currently, having an expression such as “1+1” by itself is illegal; it needs to go somewhere. However, calling a function f by itself is perfectly legal, which makes me think that expressions and functions should be dealt with differently. However, it is also legal to say x = f(2), making f(2) a legal expression.

I’m still considering different approaches for these problems.

Third, my team worked on putting together the final presentation for next week. I primarily worked on redrawing the system diagram and the interpreter flowchart, and also added tradeoffs regarding the interpreter.

Schedule

I am a little behind schedule for functions, since I did not expect running into this issue about functions and expressions. However, functions were not in the MVP, and currently, the MVP is ready to go from the GUI/Interpreter point.

Goals for next week:

  1. Have a successful final presentation!
  2. Continue working on functions.
  3. Write up final report, prepare for final video.

Leave a Reply

Your email address will not be published. Required fields are marked *