https://github.com/efeslab/ironpatch_hiring
https://github.com/efeslab/ironpatch_hiring
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/efeslab/ironpatch_hiring
- Owner: efeslab
- Created: 2022-01-08T22:07:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-08T22:07:48.000Z (over 4 years ago)
- Last Synced: 2025-02-27T03:19:13.177Z (over 1 year ago)
- Language: C
- Size: 1000 Bytes
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a test assignment for hiring a student for Ironpatch.
Read the paper [KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs](https://www.usenix.org/legacy/event/osdi08/tech/full_papers/cadar/cadar.pdf).
Pay special attention to section `5.5 Checking tool equivalence`:
in this section the authors describes how they take two copies of the same software, rename all the symbols and use KLEE to compare the output.
In this challenge, you will be provided with 3 simple programs: , and .
The goal is to find for which inputs the outputs of these programs are identical, and for what inputs they differ
Please follow these steps:
1. compile all 3 programs into LLVM IR, and do not touch the source code in the next steps.
1. write an LLVM pass to rename all the symbols in the LLVM IR. For example rename `main` from into `prog1_main` and `main` from into . Feel free to use any other naming convention, as long as all symbols have different and predictable names.
1. Create a file `main.c` that would invoke each pair of functions (for example `prog1_main` and `prog2_main`), feed them with symbolic input and compare the outputs using `klee_assert`. You might have to emulate library functions.
1. For each pair of programs, report for which inputs the outputs are identical, and for which inputs they are different.
Please make sure to include a README with step-by-step execution instructions, a Makefile and a script to automatically run everything. Optional: include a short walk-through vide.
The readme (and the video) should include an explanation how the files generated by KLEE detect the inputs that generate different outputs.
Feel free to either set-up an environment won your personal machine or use [this Virtual Box VM](https://drive.google.com/file/d/1dSolsZLJ7RS6RF61LsmKiWe2R2R7Txsp/view?usp=sharing) that has Archlinux with LLVM-10 and KLEE already installed and in the PATH of the user `mini`. (All passwords are `mini` as well).