ilang  1.1.4
ILAng: A Modeling and Verification Platform for SoCs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros
v_eq_check_legacy_bmc.h
Go to the documentation of this file.
1 
4 #ifndef ILANG_ILA_MNGR_V_LEGACY_BMC_H__
5 #define ILANG_ILA_MNGR_V_LEGACY_BMC_H__
6 
7 #include <map>
8 
9 #include <z3++.h>
10 
13 #include <ilang/util/container.h>
14 
16 namespace ilang {
17 
19 class LegacyBmc {
20 public:
21  // ------------------------- CONSTRUCTOR/DESTRUCTOR ----------------------- //
23  LegacyBmc();
25  ~LegacyBmc();
26 
27  // ------------------------- METHODS -------------------------------------- //
29  void AddInit(ExprPtr init);
30 
32  void AddInvariant(ExprPtr inv);
33 
35  void AddProperty(ExprPtr prop);
36 
38  z3::check_result Check(InstrLvlAbsPtr m0, const int& k0, InstrLvlAbsPtr m1,
39  const int& k1);
40 
41 private:
42  // ------------------------- MEMBERS -------------------------------------- //
44  z3::context ctx_;
46  Z3ExprAdapter gen_ = Z3ExprAdapter(ctx_);
47 
49  ExprPtrVec invs_;
51  //
52  ExprPtrVec inits_;
53 
56  bool def_tran_ = false;
57 
58  // ------------------------- HELPERS -------------------------------------- //
64  z3::expr UnrollCmplIla(InstrLvlAbsPtr m, const int& k, const int& pos = 0);
65 
68  z3::expr Instr(const InstrPtr& instr, const std::string& suffix_prev,
69  const std::string& suffix_next, bool complete);
70 
75  z3::expr IlaOneHotFlat(const InstrLvlAbsPtr& ila,
76  const std::string& suffix_prev,
77  const std::string& suffix_next);
78 
79 }; // class LegacyBmc
80 
81 } // namespace ilang
82 
83 #endif // ILANG_ILA_MNGR_V_LEGACY_BMC_H__
Expr::ExprPtr ExprPtr
Pointer type for normal use of Expr.
Definition: expr.h:138
~LegacyBmc()
Default destructor.
The class for the Instruction. An Instr object contains:
Definition: instr.h:24
void AddInvariant(ExprPtr inv)
Add invariant to the solver.
z3::check_result Check(InstrLvlAbsPtr m0, const int &k0, InstrLvlAbsPtr m1, const int &k1)
Legacy BMC where two ILAs are unrolled and compared monolithically.
Simplified bounded model checking engine for ILAs.
Definition: v_eq_check_legacy_bmc.h:19
Instr::InstrPtr InstrPtr
Pointer type for normal use of Instr.
Definition: instr.h:132
LegacyBmc()
Default constructor.
Expr::ExprPtrVec ExprPtrVec
Type for storing a set of Expr.
Definition: expr.h:140
InstrLvlAbs::InstrLvlAbsPtr InstrLvlAbsPtr
Pointer type for normal use of InstrLvlAbs.
Definition: instr_lvl_abs.h:326
void AddInit(ExprPtr init)
Add initial condition to the solver.
The class for generating z3 expression from an ILA.
Definition: z3_expr_adapter.h:20
void AddProperty(ExprPtr prop)
Add property of one ILA.