16.01.2015 Views

CS2013-final-report

CS2013-final-report

CS2013-final-report

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

What is the format of the course<br />

Colorado State University uses a semester system: this course is 15 weeks long with 2 one and a half hour of<br />

lectures per week and 1 weekly recitation section (4 total contact hours / week, for approximately 60 total hours<br />

not counting the <strong>final</strong> exam). There is a 16 th week for <strong>final</strong> exams. In the past this course has been only on<br />

campus, but starting in Spring 2013 we are providing it as a blended on campus and online course.<br />

How are students assessed<br />

There are 7 programming assignments and 4 written homeworks, which together constitute 50% of the course<br />

grade. The programming assignments lead the students through the iterative development of a compiler written in<br />

Java that translates a subset of Java to AVR assembly code. The AVR assembly code is then assembled and linked<br />

with the avr-gcc tool chain to run on Meggy Jr game devices. The process is iterative in that the first<br />

programming assignment that starts building the compiler results in a compiler that can generate the AVR code for<br />

the setPixel() call; therefore students can write MeggyJava programs that draw 8x8 pictures on their devices.<br />

Later assignments incrementally add features to the MeggyJava language and data structures such as abstract<br />

syntax trees to the compiler. We also have a simulator available at http://code.google.com/p/mjsim/ to enable<br />

debugging of the generated AVR code and for grading purposes. Students start doing their programming<br />

assignments individually, but are then encouraged to work as programming pairs. We expect students to spend<br />

approximately 8-12 hours each week outside of the classroom on the course.<br />

Course textbooks and materials<br />

Lecture notes written by the instructor and materials available online largely replace a textbook, though for<br />

additional resources, we recommend Modern Compiler Implementation in Java (Second Edition) by Andrew<br />

Appel, Cambridge, 2002. Additionally we provide the students with a link and reading assignments for a free<br />

online book Basics in Compiler Design by Torben Mogensen. The lecture notes are available at the webpage<br />

provided above.<br />

Why do you teach the course this way<br />

We view the compiler course as bringing together many theoretical and practical skills from previous courses and<br />

enabling the students to use these skills within the context of a full semester project. The key elements of this<br />

course are the approach to iterative compiler development, the emphasis on many software development tools such<br />

as debuggers, revision control, etc., and mapping a high level programming language, Java, to a popular assembly<br />

language for embedded systems. All of these elements are new editions to the compiler course in our department<br />

and have been incorporated into the course since 2007. In general the move to targeting an active assembly<br />

language AVR that operates on a game device Meggy Jr has been more popular with the students than the previous<br />

targets of C and then MIPS.<br />

This course is an elective and students do consider it to be challenging. Many students discuss the compiler<br />

developed in this course with potential employers. Additionally graduates <strong>report</strong> that understanding how a<br />

language maps to assembly helps their debugging skills after starting positions in industry after their degree.<br />

Body of Knowledge coverage<br />

KA Knowledge Unit Topics Covered Hours<br />

AL<br />

Basic Automata Computability and<br />

Complexity<br />

Finite state machines, regular expressions, and context<br />

free grammars<br />

2<br />

AL<br />

Advanced Automata Computability<br />

and Complexity<br />

NFAs, DFAs, their equivalence, and push-down<br />

automata.<br />

2<br />

PL<br />

Event Driven and Reactive<br />

Programming<br />

Programming the Meggy Jr game device. 3<br />

PL Program Representation All 1<br />

- 349 -

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

Saved successfully!

Ooh no, something went wrong!