Describing Console I/O Behavior for Testing Student Submissions in Haskell

📅 2020-08-21
🏛️ TFPIE
📈 Citations: 4
Influential: 0
📄 PDF

career value

168K/year
🤖 AI Summary
Automated verification of interactive console I/O programs in Haskell education remains challenging due to the dynamic, history-dependent nature of student implementations. Method: We propose a lightweight, formal behavioral specification language that uniquely integrates global state and execution history, expressed via regex-like syntax; its trace-based semantics enable probabilistic testing and scalable verification through *sampleable validity*. Contribution/Results: Our system automatically validates student submissions against behavioral specifications and supports pedagogical closed-loop applications—including real-time feedback generation, example solution synthesis, and exercise randomization. Empirical evaluation demonstrates substantial improvements in test coverage and pedagogical adaptability while preserving formal rigor. To our knowledge, this is the first framework for verifying interactive behaviors in functional programming education that simultaneously achieves theoretical soundness and practical deployability.
📝 Abstract
We present a small, formal language for specifying the behavior of simple console I/O programs. The design is driven by the concrete application case of testing interactive Haskell programs written by students. Specifications are structurally similar to lexical analysis regular expressions, but are augmented with features like global variables that track state and history of program runs, enabling expression of an interesting range of dynamic behavior. We give a semantics for our specification language based on acceptance of execution traces. From this semantics we derive a definition of the set of all traces valid for a given specification. Sampling that set enables us to mechanically check program behavior against specifications in a probabilistic fashion. Beyond testing, other possible uses of the specification language in an education context include related activities like providing more helpful feedback, generating sample solutions, and even generating random exercise tasks.
Problem

Research questions and friction points this paper is trying to address.

Formal language for specifying console I/O program behavior
Testing interactive Haskell programs in education
Semantics-based trace validation for probabilistic behavior checking
Innovation

Methods, ideas, or system contributions that make the work stand out.

Formal language for console I/O behavior specification
Semantics based on execution trace acceptance
Probabilistic checking of program behavior
🔎 Similar Papers
No similar papers found.