skip to main content
article

Chirp on crickets: teaching compilers using an embedded robot controller

Published: 03 March 2006 Publication History

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.

References

[1]
ACM Computing Curricula 2001, Computer Science volume. http://www.sigcse.org/cc2001/.
[2]
ANTLR documentation. http://www.antlr.org/doc.
[3]
Curriculum '68: Recommendations for the undergraduate program in computer science. Communications of the ACM, pages 151--197, Mar. 1968.
[4]
Curriculum '78: Recommendations for the undergraduate program in computer science. Communications of the ACM, pages 147--166, Mar. 1979.
[5]
A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.
[6]
K. Andrews, R. R. Henry, and W. K. Yamamoto. Design and implementation of the uw illustrated compiler. In Proceedings of 1988 conference on Programming Language design and Implementation.
[7]
K. D. Cooper and L. Torczon. Engineering a Compiler. Morgan Kaufmann, 2003.
[8]
S. Debray. Making compiler design relevant for students who will (most likely) never design a compiler. In Proceedings of 2002 SIGCSE technical symposium on Computer science education, pages 341--345.
[9]
T. R. Henry. Teaching compiler construction using a domain specific language. In Proceedings of 2005 SIGCSE technical symposium on Computer science education, pages 7--11.
[10]
F. Martin, B. Mikhak, M. Resnick, B. Silverman, and R. Berg. To mindstorms and beyond: Evolution of a construction kit for magical machines. In A. Druin and J. Hendler, editors, Robots for Kids: Exploring New Technologies for Learning, pages 9--33. Morgan Kaufmann, 2000.
[11]
F. Martin, B. Mikhak, and B. Silverman. Metacricket: A designer's kit for making computational devices. IBM Systems Journal, 39(3 & 4), 2000.
[12]
F. G. Martin and S. Kuhn. Computing in context: Integrating an embedded computing project into a course on ethical and societal issues. in press, 2006.
[13]
F. G. Martin, N. Palmer, and B. Skinner. The virtual cricket: A web-based simulator for learning robot programming. In preparation.
[14]
D. Z. Nguyen, M. Ricken, and S. Wong. Design patterns for parsing. In Proceedings of 2005 SIGCSE technical symposium on Computer science education.
[15]
M. Resnick, R. Berg, and M. Eisenberg. Beyond black boxes: Bringing transparency and aesthetics back to scientific investigation. Journal of the Learning Sciences, 9(1):7--30, 2000.
[16]
L. Xu and F. Martin. The chirp language specification. Technical Report TR-2005-003, Dept. of Computer Science, UMass Lowell.

Cited By

View all
  • (2020)Evaluation of simulation systems suitable for teaching compiler construction coursesComputer Applications in Engineering Education10.1002/cae.2223128:3(606-625)Online publication date: 31-Mar-2020
  • (2016)An Experience Report on Teaching Compiler Design Concepts Using Case-Based and Project-Based Learning Approaches2016 IEEE Eighth International Conference on Technology for Education (T4E)10.1109/T4E.2016.052(216-219)Online publication date: Dec-2016
  • (2010)Teaching compiler code generationACM SIGCSE Bulletin10.1145/1709424.170944041:4(30-34)Online publication date: 18-Jan-2010
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGCSE Bulletin
ACM SIGCSE Bulletin  Volume 38, Issue 1
March 2006
553 pages
ISSN:0097-8418
DOI:10.1145/1124706
Issue’s Table of Contents
  • cover image ACM Conferences
    SIGCSE '06: Proceedings of the 37th SIGCSE technical symposium on Computer science education
    March 2006
    612 pages
    ISBN:1595932593
    DOI:10.1145/1121341
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 March 2006
Published in SIGCSE Volume 38, Issue 1

Check for updates

Author Tags

  1. compiler construction
  2. educational robotics
  3. embedded processor
  4. language processing
  5. virtual machine

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)0
Reflects downloads up to 07 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2020)Evaluation of simulation systems suitable for teaching compiler construction coursesComputer Applications in Engineering Education10.1002/cae.2223128:3(606-625)Online publication date: 31-Mar-2020
  • (2016)An Experience Report on Teaching Compiler Design Concepts Using Case-Based and Project-Based Learning Approaches2016 IEEE Eighth International Conference on Technology for Education (T4E)10.1109/T4E.2016.052(216-219)Online publication date: Dec-2016
  • (2010)Teaching compiler code generationACM SIGCSE Bulletin10.1145/1709424.170944041:4(30-34)Online publication date: 18-Jan-2010
  • (2015)Background to Design Smart LOs and Supporting ToolsSmart Learning Objects for Smart Education in Computer Science10.1007/978-3-319-16913-2_9(185-209)Online publication date: 2015
  • (2014)TPFOSSSProceedings of the 2014 IEEE Sixth International Conference on Technology for Education10.1109/T4E.2014.56(245-248)Online publication date: 18-Dec-2014
  • (2014)Attribute grammars made easier: EvDebugger a visual debugger for attribute grammars2014 International Symposium on Computers in Education (SIIE)10.1109/SIIE.2014.7017699(23-28)Online publication date: Nov-2014
  • (2013)Gears of our childhoodProceedings of the 12th International Conference on Interaction Design and Children10.1145/2485760.2485786(173-182)Online publication date: 24-Jun-2013
  • (2008)A modular approach to language engineering using XML and inexpensive robotsJournal of Computing Sciences in Colleges10.5555/1352627.135264923:5(133-141)Online publication date: 1-May-2008
  • (2008)Language engineering in the context of a popular, inexpensive robot platformACM SIGCSE Bulletin10.1145/1352322.135215440:1(43-47)Online publication date: 12-Mar-2008
  • (2008)Language engineering in the context of a popular, inexpensive robot platformProceedings of the 39th SIGCSE technical symposium on Computer science education10.1145/1352135.1352154(43-47)Online publication date: 12-Mar-2008
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media