5 #ifndef ILANG_VTARGET_OUT_INV_OBJ_H__
6 #define ILANG_VTARGET_OUT_INV_OBJ_H__
10 #include <ilang/smt-inout/yosys_smt_parser.h>
11 #include <ilang/vtarget-out/inv-syn/inv_cnf.h>
29 typedef std::vector<std::tuple<std::string, std::string, int>>
40 #ifdef INVSYN_INTERFACE
43 bool AddInvariantFromChcResultFile(
45 const std::string& chc_result_fn,
bool flatten_datatype,
46 bool flatten_hierarchy,
bool discourage_outside_var_referral =
true);
51 const std::string& tag,
52 const std::string& chc_result_fn,
53 bool discourage_outside_var_referral =
true,
54 bool change_outside_var =
true);
57 bool AddInvariantFromAbcResultFile(
58 const std::string& blif_fname,
const std::string& abc_fname,
59 bool warning_outside_var,
bool replace_outside_var,
60 const std::string& gla_map_fname,
bool useAiger,
61 const std::string& aiger_map_name, InvariantInCnf& inv_cnf,
62 const InvariantInCnf& ref_cnf);
64 #endif // INVSYN_INTERFACE
68 const std::string& vlg_in);
83 bool export_smt_encoding =
true)
const;
108 #endif // ILANG_VTARGET_OUT_INV_OBJ_H__
void ImportFromFile(const std::string &fn)
import invariants that has been previous exported
size_t NumInvariant() const
the number of invariants
std::vector< std::string > inv_vec_t
the vector of multiple invariants
Definition: inv_obj.h:27
std::string dut_inst_name
the buffered dut instance name
Definition: inv_obj.h:103
void InsertFromAnotherInvObj(const InvariantObject &r)
this is to support making candidate invariant as confirmed
const inv_vec_t & GetVlgConstraints() const
generate invariants
InvariantObject()
empty invariants
std::vector< std::string > smt_formula_vec_t
the vector of original smt-formula for datapoint attempt
Definition: inv_obj.h:34
std::vector< std::tuple< std::string, std::string, int > > extra_var_def_vec_t
the vector of extra_var defs exprs
Definition: inv_obj.h:30
void AddInvariantFromVerilogExpr(const std::string &tag, const std::string &vlg_in)
copy constructor = default
void ClearAllInvariants()
clear all stored invariants
the invariant object, it needs smt-info to parse
Definition: inv_obj.h:23
const extra_free_var_def_vec_t & GetExtraFreeVarDefs() const
get the free vars
std::vector< std::string > inv_vlg_exprs
the expressions
Definition: inv_obj.h:95
to parse an smt file this will only work on the yosys's generated smt and not on the assembled CHC ...
Definition: yosys_smt_parser.h:22
smt_formula_vec_t smt_formula_vec
the original smt formula
Definition: inv_obj.h:101
extra_var_def_vec_t inv_extra_vlg_vars
the extra variables that are needed to ...
Definition: inv_obj.h:97
extra_free_var_def_vec_t inv_extra_free_vars
the extra free variables // there might be repetition // check it
Definition: inv_obj.h:99
void set_dut_inst_name(const std::string &name)
called by the target generator?
std::map< std::string, int > extra_free_var_def_vec_t
the vector of free var defs exprs
Definition: inv_obj.h:32
const extra_var_def_vec_t & GetExtraVarDefs() const
get the vars
const smt_formula_vec_t & GetSmtFormulae() const
get the smt formula
void ExportToFile(const std::string &fn, bool export_smt_encoding=true) const
export invariants to a file
void RemoveInvByIdx(size_t idx)
remove an invariant by its index