mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	Bit-Propagation for most operations (Backtracking missing)
This commit is contained in:
		
							parent
							
								
									c8b9127028
								
							
						
					
					
						commit
						173fb9c2bd
					
				
					 7 changed files with 706 additions and 150 deletions
				
			
		|  | @ -43,6 +43,7 @@ class tbv_manager { | |||
|     ptr_vector<tbv> allocated_tbvs; | ||||
| public: | ||||
|     tbv_manager(unsigned n): m(2*n) {} | ||||
|     tbv_manager(const tbv_manager& m) = delete; | ||||
|     ~tbv_manager(); | ||||
|     void reset(); | ||||
|     tbv* allocate(); | ||||
|  | @ -127,7 +128,7 @@ private: | |||
|         return (fixed_bit_vector::get(index) << 1) | (unsigned)fixed_bit_vector::get(index+1); | ||||
|     } | ||||
| }; | ||||
| 
 | ||||
|      | ||||
| class tbv_ref { | ||||
|     tbv_manager& mgr; | ||||
|     tbv* d; | ||||
|  | @ -152,4 +153,12 @@ public: | |||
|     unsigned num_tbits() const { return mgr.num_tbits(); } | ||||
| }; | ||||
| 
 | ||||
| inline std::ostream& operator<<(std::ostream& out, tbv_ref const& c) { | ||||
|     const char* names[] = { "z", "0", "1", "x" };  | ||||
|     for (unsigned i =  c.num_tbits(); i > 0; i--) { | ||||
|         out << names[(unsigned)c[i - 1]];  | ||||
|     } | ||||
|     return out; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue