mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 11:42:28 +00:00 
			
		
		
		
	add priority queue to instantiation
This commit is contained in:
		
							parent
							
								
									22b0c3aa70
								
							
						
					
					
						commit
						46f754c43d
					
				
					 19 changed files with 1138 additions and 541 deletions
				
			
		
							
								
								
									
										53
									
								
								src/sat/smt/q_clause.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								src/sat/smt/q_clause.cpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,53 @@ | |||
| /*++
 | ||||
| Copyright (c) 2020 Microsoft Corporation | ||||
| 
 | ||||
| Module Name: | ||||
| 
 | ||||
|     q_clause.cpp | ||||
| 
 | ||||
| Abstract: | ||||
| 
 | ||||
|     Clause and literals | ||||
| 
 | ||||
| Author: | ||||
| 
 | ||||
|     Nikolaj Bjorner (nbjorner) 2021-01-24 | ||||
| 
 | ||||
| --*/ | ||||
| 
 | ||||
| #include "sat/smt/q_clause.h" | ||||
| 
 | ||||
| 
 | ||||
| namespace q { | ||||
| 
 | ||||
|     std::ostream& lit::display(std::ostream& out) const { | ||||
|         ast_manager& m = lhs.m(); | ||||
|         if (m.is_true(rhs) && !sign)  | ||||
|             return out << lhs; | ||||
|         if (m.is_false(rhs) && !sign)  | ||||
|             return out << "(not " << lhs << ")"; | ||||
|         return  | ||||
|             out << mk_bounded_pp(lhs, lhs.m(), 2)  | ||||
|                 << (sign ? " != " : " == ")  | ||||
|                 << mk_bounded_pp(rhs, rhs.m(), 2); | ||||
|     } | ||||
| 
 | ||||
|     std::ostream& clause::display(euf::solver& ctx, std::ostream& out) const { | ||||
|         out << "clause:\n"; | ||||
|         for (auto const& lit : m_lits) | ||||
|             lit.display(out) << "\n"; | ||||
|         binding* b = m_bindings; | ||||
|         if (b) { | ||||
|             do { | ||||
|                 for (unsigned i = 0; i < num_decls(); ++i) | ||||
|                     out << ctx.bpp((*b)[i]) << " "; | ||||
|                 out << "\n";             | ||||
|                 b = b->next(); | ||||
|             } | ||||
|             while (b != m_bindings); | ||||
|         } | ||||
|         return out; | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue