To make a Formal Languages and Automata Theory course more palatable to Computer Science students, a new trend has emerged that integrates the program-by-design methodology. Such courses are being successfully delivered, but have revealed that students need error messages that they comprehend and that reinforce the design steps when errors are thrown. This article describes a novel contract-based error messaging system that exploits blame assignment and message customization to help students advance their programming efforts. The described system has two novel features. The first is that the error messaging system is tightly-coupled with the steps of a design recipe for state machines. Error messages always include the step of the design recipe not successfully completed. The second is integrated support for testing, which reduces the amount of repeated code written for unit testing. The programmer optionally specifies words that ought and that ought not be in the machine’s language. An error is thrown when there are words for which the expected behavior is not achieved and machine construction fails.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Error Messages for Students Taught Using a Systematic Program Design Curriculum

  • Shamil Dzhatdoyev,
  • Josephine A. Des Rosiers,
  • Marco T. Morazán

摘要

To make a Formal Languages and Automata Theory course more palatable to Computer Science students, a new trend has emerged that integrates the program-by-design methodology. Such courses are being successfully delivered, but have revealed that students need error messages that they comprehend and that reinforce the design steps when errors are thrown. This article describes a novel contract-based error messaging system that exploits blame assignment and message customization to help students advance their programming efforts. The described system has two novel features. The first is that the error messaging system is tightly-coupled with the steps of a design recipe for state machines. Error messages always include the step of the design recipe not successfully completed. The second is integrated support for testing, which reduces the amount of repeated code written for unit testing. The programmer optionally specifies words that ought and that ought not be in the machine’s language. An error is thrown when there are words for which the expected behavior is not achieved and machine construction fails.