Published August 8, 2019 | Version v1
Software Open

Automatic and Scalable Detection of Logical Errors in Functional Programming Assignments

  • 1. Korea University

Description

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

artifact.zip

Files (3.6 GB)

Name Size Download all
md5:b822e7f8618098b37a0c0be09a9ee596
3.6 GB Preview Download
md5:b5d7035adbfbe746062e8197b21b41e7
1.1 kB Download
md5:4990926f9cf69173a6503855f2ea359a
750 Bytes Preview Download