Chirp on crickets: teaching compilers using an embedded robot controller

  • Authors:
  • Li Xu;Fred G. Martin

  • Affiliations:
  • University of Massachusetts Lowell, Lowell, MA;University of Massachusetts Lowell, Lowell, MA

  • Venue:
  • Proceedings of the 37th SIGCSE technical symposium on Computer science education
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Traditionally, the topics of compiler construction and language processing have been taught as an elective course in Computer Science curricula. As such, students may graduate with little understanding or experience with the useful techniques embodied in modern compiler construction.In this paper, we present the design of Chirp, a language specification and compiler implementation. As a language, Chirp is based on Java/C syntax conventions and is matched with the stack-based virtual machine that is built into the simple yet versatile Handy Cricket educational robot controller. As a compiler, the Chirp design is a series of Java components. These modules demonstrate key compiler construction techniques including lexing, parsing, intermediate representation, semantic analysis, error handling and code generation.We have designed a 6-week teaching module to be integrated into an intermediate-level undergraduate programming class. In the module, students will incrementally build the Chirp compiler, culminating with code generation for the Cricket controller. They will test their work on both physical Cricket-based robots and a web-based Cricket simulator. The Chirp system and our pedagogical design provides a realistic and engaging environment to teach compilers in undergraduate core programming courses.