HOW TO USE PINFI:

1. Installation
- Make sure pin is installed. (pin-2.11-49306 has been tested to work; later versions would not. -- pwu)
- Copy the top-level directory (everything except the example/ subdirectory) to <pin root>/source/tools/
- Set environmental variable PIN_HOME to the root directory of the PIN installation. -- pwu
- In the command line, type 'make' under the root folder of the pinfi project to compile the pinfi.
- After compiling pinfi, a folder called obj-intel64 will be created under the project folder.

2. Usage

- We provide a fault injection script located in example/, namely faultinject.py. There are several variables in the script need to be set based on your own configurations:
  - progbin: folder path to the benchmark under test
  - pinbin: path to the executable of pin
  - instcategorylib: path to instcategory.so which can be found under obj-intel64 folder.
  - instcountlib: path to instcount.so which can be found under obj-intel64 folder.
  - filib: path to faultinjection.so which can be found under obj-intel64 folder.
  - outputdir: std output generated by the benchmark under test.
  - errordir: error output generated by the benchmark under test.
  - basedir: golden output generated by the benchmark under test.
  - optionlist: configure parameters as desired based on the benchmark undertest.

- Put the instructions category (default is 'all') that are desired to be fault injected in pin.instcategory.txt under the directory where faultinject.py locates, and run faultinject.py to inject faults in the specified locations. We provide an example of the pin.instcategory.txt file in example/ as well.