Software Open Access

Automatic and Scalable Detection of Logical Errors in Functional Programming Assignments

Dowon Song; Myungho Lee; Hakjoo Oh

We present a new technique for automatically detecting logical errors in functional programming assignments. Although logical errors are the most difficult type of errors compared to syntax or type errors, detecting them remains largely as a manual process that requires hand-made test cases. However, designing proper test cases is nontrivial and involves a lot of human efforts. Furthermore, manual test cases are unlikely to catch diverse errors because instructors cannot predict all corner cases of diverse student submissions. We aim to reduce this burden by automatically generating test cases for functional programs. Given a reference program from an instructor and a student's submission, our technique generates a counter-example that captures the semantic difference of the input programs without any manual effort. The key novelty behind our approach is the test case synthesis algorithm that combines enumerative search and symbolic verification in a tightly coupled way, which is in particular effective for detecting corner-case errors. The experimental results show that our technique is more effective than existing approaches. It detected 88 more errors that were missed by carefully designed test cases, and performed better than existing property-based testing techniques. We also demonstrate the usefulness of our technique in the context of test-case-based program repair, where it effectively helps to eliminate test-case-overfitted patches.

Files (3.6 GB)
Name Size
artifact.zip
md5:b822e7f8618098b37a0c0be09a9ee596
3.6 GB Download
LICENSE
md5:b5d7035adbfbe746062e8197b21b41e7
1.1 kB Download
README.md
md5:4990926f9cf69173a6503855f2ea359a
750 Bytes Download
82
35
views
downloads
All versions This version
Views 8282
Downloads 3535
Data volume 60.7 GB60.7 GB
Unique views 7878
Unique downloads 1212

Share

Cite as