16.01.2015 Views

CS2013-final-report

CS2013-final-report

CS2013-final-report

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

solutions to truly hard problems, such as instruction scheduling; the problems are designed to have a high ratio of<br />

thought to programming.<br />

Body of Knowledge coverage<br />

KA Knowledge Unit Topics Covered Hours<br />

AL<br />

Basic Automata<br />

Computability and<br />

Complexity<br />

Finite state machines, regular expressions, and context-free grammars 2<br />

AL<br />

Advanced<br />

Automata<br />

Theory and<br />

Computability<br />

DFA & NFAs (Thompson’s construction, the subset construction,<br />

Hopcroft’s DFA minimization algorithm, Brzozowski’s DFA minimization<br />

algorithm), regular expressions, context-free grammars (designing CFGs<br />

and parsing them — recursive descent, LL(1), and LR(1) techniques<br />

3<br />

PL<br />

Program<br />

Representation<br />

Syntax trees, abstract syntax trees, linear forms (3 address code), plus<br />

lexically scoped symbol tables<br />

2<br />

PL<br />

Language<br />

Translation &<br />

Execution<br />

Interpretation, compilation, representations of procedures, methods, and<br />

objects, memory layout (stack, heap, static),<br />

Automatic collection versus manual deallocation<br />

4<br />

PL Syntax Analysis Scanner construction<br />

Parsing: top-down recursive descent parsers, LL(1) parsers and parser<br />

generators, LR(1) parsers and parser generators<br />

6<br />

PL<br />

Compiler Semantic<br />

Analysis<br />

Construction of intermediate representations, simple type checking, lexical<br />

scoping, binding, name resolutions; attribute grammar terms, evaluation<br />

techniques, and strengths and weaknesses<br />

3<br />

PL Code Generation How to implement specific programming language constructs, as well as<br />

algorithms for instruction selection (both tree pattern matching and<br />

peephole-based schemes),<br />

Instruction scheduling, register allocation<br />

6<br />

Other comments<br />

The undergraduate compiler course provides an important opportunity to address three of the expected<br />

characteristics of Computer Science graduates:<br />

Appreciation of the Interplay Between Theory and Practice: The automation of scanners and parsers is one of the<br />

best examples of theory put into practical application. Ideas developed in the 1960s became commonplace tools in<br />

the 1970s. The same basic ideas and tools are (still) in widespread use in the 2010’s.<br />

At the same time, compilers routinely compute and use approximate solutions to intractable problems, such as<br />

instruction scheduling and register allocation which are NP-complete in almost any realistic formulation, or<br />

constant propagation which runs into computability issues in its more general forms. In theory classes, students<br />

learn to discern the difference between the tractable and the intractable; in a good compiler class, they learn to<br />

approximate the solution to these problems and to use the results of such approximations.<br />

System-level Perspective: The compiler course enhances the students’ understanding of systems in two quite<br />

different ways. As part of learning to implement procedure calls, students come to understand how an agreement<br />

on system-wide linkage conventions creates the necessary conditions for interoperability between application code<br />

and system code and for code written in different languages and compiled with different compilers. In many ways,<br />

- 362 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!