mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	FreshConst is_sort
This commit is contained in:
		
							parent
							
								
									ad2934f8cf
								
							
						
					
					
						commit
						6b5d351248
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1506,6 +1506,8 @@ def Consts(names, sort):
 | 
			
		|||
 | 
			
		||||
def FreshConst(sort, prefix="c"):
 | 
			
		||||
    """Create a fresh constant of a specified sort"""
 | 
			
		||||
    if z3_debug():
 | 
			
		||||
        _z3_assert(is_sort(sort), f"Z3 sort expected, got {type(sort)}")
 | 
			
		||||
    ctx = _get_ctx(sort.ctx)
 | 
			
		||||
    return _to_expr_ref(Z3_mk_fresh_const(ctx.ref(), prefix, sort.ast), ctx)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue