mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	return negated literal when expression is "not"
This commit is contained in:
		
							parent
							
								
									7ddfc54250
								
							
						
					
					
						commit
						4392b88718
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -805,6 +805,7 @@ struct goal2sat::imp : public sat::sat_internalizer {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    sat::literal internalize(expr* n, bool redundant) override {
 | 
			
		||||
        bool is_not = m.is_not(n, n);
 | 
			
		||||
        flet<bool> _top(m_top_level, false);
 | 
			
		||||
        unsigned sz = m_result_stack.size();
 | 
			
		||||
        (void)sz;
 | 
			
		||||
| 
						 | 
				
			
			@ -820,6 +821,9 @@ struct goal2sat::imp : public sat::sat_internalizer {
 | 
			
		|||
            m_map.insert(n, result.var());    
 | 
			
		||||
            m_solver.set_external(result.var());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (is_not)
 | 
			
		||||
            result.neg();
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue