PolyBoRi
BooleEnv.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 //*****************************************************************************
14 //*****************************************************************************
15 
16 #ifndef polybori_BooleEnv_h_
17 #define polybori_BooleEnv_h_
18 
19 // load PolyBoRi settings
20 # include <polybori/pbori_defs.h>
21 
22 #include <polybori/BoolePolyRing.h>
23 #include <vector>
24 
25 // Obey stricter dependence of Sun Studio compiler
26 // todo: resolve dependency
27 #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
28 # define PBORI_ENV_RING_NOTINLINED
29 #endif
30 
31 
33 
34 
35 class BoolePolyRing;
36 //extern BoolePolyRing active_ring;
37 class COrderingBase;
38 
46 class BooleEnv:
48  public CTypes::auxtypes_type {
49 
50  public:
51  //-------------------------------------------------------------------------
52  // types definitions
53  //-------------------------------------------------------------------------
54 
56  typedef BooleEnv self;
57 
60 
62 
68 
70  typedef std::vector<idx_type> block_idx_type;
71 
73  typedef block_idx_type::const_iterator block_iterator;
74 
75  //-------------------------------------------------------------------------
76  // constructors and destructor
77  //-------------------------------------------------------------------------
78 
80  using base::ordercodes;
81 
82 // /// Access idx-th variable of the active ring
83 // static var_type variable(idx_type idx);
84 
85 // /// Get numerical code for current ordering
86 // static ordercode_type getOrderCode();
87 
88 // /// Get numerical code for current base ordering
89 // /// (the same for non-block orderings)
90 // static ordercode_type getBaseOrderCode();
91 
92 // /// Get empty decision diagram
93 // static dd_type zero();
94 
95 // /// Get decision diagram with all variables negated
96 // static dd_type one();
97 
98 // /// Get number of ring variables the of active ring
99 // static size_type nVariables();
100 
102 
104 
105 // private:
106 // #ifdef PBORI_ENV_RING_NOTINLINED
107 // static ring_type& ring();
108 // #else
109 // static ring_type& ring() {
110 // static BooleEnv::ring_type active_ring(1000, CTypes::lp, false);
111 
112 // return active_ring;
113 // }
114 // #endif
115 // // static manager_type& manager();
116 // static order_type& ordering();
117 // public:
118 
119 // /// Set name of variable with index idx
120 // static void setVariableName(idx_type idx, vartext_type varname);
121 
122 // /// Get name of variable with index idx
123 // static vartext_type getVariableName(idx_type idx);
124 
125 // /// @name interface for block orderings, if the vcurrent orderins is a block ordering
126 // //@{
127 // /// Returns iterator over the indices, where the (next) block starts.
128 // /// (The first one implicitely starts at zero.)
129 // static block_iterator blockBegin();
130 
131 // /// Returns end marker of iteration
132 // static block_iterator blockEnd();
133 
134 // /// Add index where the next block starts
135 // static void appendBlock(idx_type idx);
136 
137 // /// Reset block-related data
138 // static void clearBlocks();
139 
140 // /// Index where the last blocks starts
141 // static idx_type lastBlockStart();
142 // //@}
143 
144 // /// Change order of current ring
145 // static void changeOrdering(ordercode_type code);
146 
147 // /// Print low-level information
148 // static ostream_type& print(ostream_type&);
149 
150 // /// Activate given ring
151 // static void set(ring_type& theRing);
152 };
153 
155 
156 
159 block_begin(const BooleEnv::ring_type& ring);
160 
161 
164 block_end(const BooleEnv::ring_type& ring);
165 
167 
168 #endif // of #ifndef polybori_BooleEnv_h_