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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started