#ifndef EXTRACTOR_H
#define EXTRACTOR_H
#include “llvm/ADT/MapVector.h”
Copyright By PowCoder代写 加微信 powcoder
#include “llvm/IR/Function.h”
#include “llvm/IR/Instructions.h”
#include “llvm/IR/Type.h”
#include
#include
#include
#include “Utils.h”
using namespace llvm;
using InstMapTy = std::map
using DefMapTy = std::map
class Extractor {
Extractor(const std::string OutDir) {
DefFile.open(OutDir + “/def.facts”);
UseFile.open(OutDir + “/use.facts”);
NextFile.open(OutDir + “/next.facts”);
TaintFile.open(OutDir + “/taint.facts”);
SanitizerFile.open(OutDir + “/sanitizer.facts”);
DivFile.open(OutDir + “/div.facts”);
~Extractor() {
DefFile.close();
UseFile.close();
NextFile.close();
TaintFile.close();
SanitizerFile.close();
DivFile.close();
void addNext(const InstMapTy &InstMap, Instruction *X, Instruction *Y);
void addDef(const InstMapTy &InstMap, Value *X, Instruction *L);
void addUse(const InstMapTy &InstMap, Value *X, Instruction *L);
void addDiv(const InstMapTy &InstMap, Value *X, Instruction *L);
void addTaint(const InstMapTy &InstMap, Instruction *L);
void addSanitizer(const InstMapTy &InstMap, Instruction *L);
void extractConstraints(const InstMapTy &InstMap, Instruction *I);
void printTuple(std::string Name, Value *V1, Value *V2) {
std::cerr << Name << "(\"" << toString(V1) << "\", \"" << toString(V2)
<< "\")" << std::endl;
std::map
std::ofstream DefFile, UseFile, NextFile, TaintFile, SanitizerFile, DivFile;
#endif // EXTRACTOR_H
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com