Target
- Implement an NPD checker based on LLVM
Testcases
- Juliet v1.3 for C/C++ (the NPD cases)
- a well-maintained test-suite (user guide);
- the .bc is compiled with LLVM 10.0.0 with debug information, only containing the NPD bugs;
- the buggy code exists in the function with the word “bad” in its name, e.g.,
badSink(), CWE476_NULL_Pointer_Dereference__char_41_bad()
- Programs in SPEC2000, including:
art, bzip2, crafty, eon, equake, gap, gzip, mcf, mesa, parser, perlbmk, vortex, vpr
- the .bc is compiled with LLVM 10.0.0 with debug information
- The testcases could be accesses at: https://drive.google.com/drive/folders/1NDZOqYR0mZ7tUE-dd6RKq_AOdyV1U5vb
Requirements
- For the Juliet test-suite, the Precision and Recall of the detection should be no less than 0.65 and 0.55 separately.
- As per the document of Juliet test-suite, it contains 348 NPD errors in total.
- Then, run the implementation on SPEC2000, recording the detection results and processing time.
- The Deadline is Jul. 11.
Submission
- The submission contains the implementation source code and analysis results;
- For Juliet, output a .txt file, named as HB_Juliet_StuFstName_StuID, e.g., HB_Juliet_Mahiro_013038.txt;
- For each program of SPEC2000, output a .txt file, named as HB_ProgName_stuFstName_StuID, e.g., HB_mesa_Mahiro_013038.txt;
- Include all resulting files in a single directory named as HB_StuFstName_StuID, compress the directory and submit the package, e.g., HB_Mahiro_013038.tar.gz;
- In each .txt file, every detected NPD error occupies exactly one line to specify the location information, including the line number and the function it resides in:
- format string:
"%d\t%s" % (line_no, func_name)
- The last line of each .txt file summarizes the results of that program:
- format string:
"%d\t%d\t%.3f\t%.3f\t%.3f" % (true_pos, false_pos, precision, recall, process_time)