Compiler I WS 2001/2002 - Slide 89
Objectives:
An efficient data structure
In the lecture:
Explanations and examples for
- Explain the concept of identifier stacks.
- Demonstrate the effect of the operations.
- O(1) access instaed of linear search.
- Explain how the current environment is changed using operations Enter and Leave, which insert a set of bindings into the stacks or remove it.
Suggested reading:
Kastens / Übersetzerbau, Section 6.2.2
Questions:
- In what sense is this data structure efficient?
- Describe a program for which a linear search in definition lists is more efficient than using this data structure.
- The efficiency advantage may be lost if the operations are executed in an unsuitable order. Explain!
- How can the current environment be changed without calling Enter and Leave explicitly?
©2001 by Prof. Dr. Uwe Kastens
Generiert mit Camelot | Probleme mit Camelot? | Geändert am: 10.04.2006