#pragma once

#include "fault.h"
#include "lut.h"

using ll = long long;

class LUTCircuit {
public:
std::vector<LUT*> PIs;
std::vector<LUT*> POs;
std::vector<LUT*> luts;
};

class Circuit {
public:
std::vector<Gate*> PIs;
std::vector<Gate*> POs;
std::vector<Gate*> gates;
std::vector<Gate*> rtopo_gates;

std::unordered_map<std::string, Gate*> name2gate;

void parse_from_file(const char *filename);
LUTCircuit* build_lut_circuit();

};