Question: Suppose you are implementing a simple computer system that works by loading data into registers and then applying an operation to them. You will include
Suppose you are implementing a simple computer system that works by loading data into registers and then applying an operation to them. You will include a compiler for a simple programming language, and a trivial job scheduler that just runs programs in the order submitted. Which is most suited for the following purposes? Hint: Use each once.
- A. Doubly Linked Lists
- B. Hash Tables
- C. Stacks
- D. Queues
- E. Binary Trees
Keeping track of definitions associated with symbols (e.g. foo <- function (x) ...)
Representing parsed expressions so you can convert inorder expressions such as "x + y" into the postorder sequence "x y +" needed by your hardware
Keeping track of active subprocedure calls to be continued
Keeping track of the order in which programs should be run
Can be used to implement many of the other ADTs on the list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
