CBMC
bdd_expr.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Conversion between exprt and miniBDD
4 
5 Author: Michael Tautschnig, michael.tautschnig@qmul.ac.uk
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_SOLVERS_PROP_BDD_EXPR_H
13 #define CPROVER_SOLVERS_PROP_BDD_EXPR_H
14 
22 #include <util/expr.h>
23 
24 #include <solvers/bdd/bdd.h> // IWYU pragma: keep
25 
26 #include <unordered_map>
27 
33 class bdd_exprt
34 {
35 public:
36  bddt from_expr(const exprt &expr);
37  exprt as_expr(const bddt &root) const;
38 
39 protected:
41 
42  typedef std::unordered_map<exprt, bddt, irep_hash> expr_mapt;
43 
45 
48  std::vector<exprt> node_map;
49 
50  bddt from_expr_rec(const exprt &expr);
51  exprt as_expr(
52  const bdd_nodet &r,
53  std::unordered_map<bdd_nodet::idt, exprt> &cache) const;
54 };
55 
56 #endif // CPROVER_SOLVERS_PROP_BDD_EXPR_H
Choice between the different interface to BDD libraries.
Conversion between exprt and bbdt This encapsulate a bdd_managert, thus BDDs created with this class ...
Definition: bdd_expr.h:34
std::unordered_map< exprt, bddt, irep_hash > expr_mapt
Definition: bdd_expr.h:42
std::vector< exprt > node_map
Mapping from BDD variables to expressions: the expression at index i of node_map corresponds to the i...
Definition: bdd_expr.h:48
exprt as_expr(const bddt &root) const
Definition: bdd_expr.cpp:171
bddt from_expr_rec(const exprt &expr)
Definition: bdd_expr.cpp:19
bdd_managert bdd_mgr
Definition: bdd_expr.h:40
expr_mapt expr_map
Definition: bdd_expr.h:44
bddt from_expr(const exprt &expr)
Definition: bdd_expr.cpp:87
Manager for BDD creation.
Definition: bdd_cudd.h:137
Low level access to the structure of the BDD, read-only.
Definition: bdd_cudd.h:28
Logical operations on BDDs.
Definition: bdd_cudd.h:78
Base class for all expressions.
Definition: expr.h:56
static int8_t r
Definition: irep_hash.h:60