ilang  1.1.4
ILAng: A Modeling and Verification Platform for SoCs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros
inv_abc_parse.h
1 // ---Hongce Zhang
5 
6 #ifndef ILANG_VTARGET_OUT_INV_ABC_PARSE_H__
7 #define ILANG_VTARGET_OUT_INV_ABC_PARSE_H__
8 
9 #include <ilang/config.h>
10 #ifdef INVSYN_INTERFACE
11 
12 #include <ilang/vtarget-out/inv-syn/inv_cnf.h>
13 
14 #include <set>
15 #include <string>
16 #include <vector>
17 
18 namespace ilang {
19 
21 class AbcInvariantParser {
22 
23 protected:
25  std::string parse_result;
27  std::set<std::string> outside_reference;
28 
30  void parse(const std::string& blif_name, const std::string& abc_result_fn);
31 
33  void parse(const std::string& blif_name, const std::string& abc_result_fn,
34  const std::string& gla_map_fn);
35 
37  void parseAigerResultWoGLA(const std::string& aig_map_fn,
38  const std::string& abc_result_fn,
39  InvariantInCnf& inv_cnf,
40  const InvariantInCnf& ref_cnf,
41  const std::string& blif_fn_name);
42 
44  void parseAigerResultWithGLA(const std::string& aig_map_fn,
45  const std::string& abc_result_fn,
46  const std::string& gla_map_fn,
47  InvariantInCnf& inv_cnf,
48  const InvariantInCnf& ref_cnf,
49  const std::string& blif_fn_name);
50 
52  const std::string dut_name;
54  const bool discourage_outside_var_ref;
56  const bool replace_outside_var_ref;
58  bool parse_succeed;
59 
60 public:
61  AbcInvariantParser(const std::string& blif_name,
62  const std::string& abc_result_fn,
63  const std::string& dut_name,
64  bool discourage_outside_variable_reference,
65  bool replace_outside_variable_reference,
66  const std::string& gla_abs_fn, bool useAiger,
67  const std::string& aiger_map_name, InvariantInCnf& inv_cnf,
68  const InvariantInCnf& ref_cnf);
69 
70  std::string GetParseResult() const { return parse_result; }
71 
72  const std::set<std::string>& GetNewVarDefs() const {
73  return outside_reference;
74  }
75 
76  bool get_parse_status() const { return parse_succeed; }
77 }; // class AbcInvariantParser
78 
79 }; // namespace ilang
80 
81 #endif // INVSYN_INTERFACE
82 
83 #endif // ILANG_VTARGET_OUT_INV_ABC_PARSE_H__