Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * Top contributors (to current version): 3 : : * Andrew Reynolds, Aina Niemetz 4 : : * 5 : : * This file is part of the cvc5 project. 6 : : * 7 : : * Copyright (c) 2009-2025 by the authors listed in the file AUTHORS 8 : : * in the top-level source directory and their institutional affiliations. 9 : : * All rights reserved. See the file COPYING in the top-level source 10 : : * directory for licensing information. 11 : : * **************************************************************************** 12 : : * 13 : : * Test for project issue #538 14 : : * 15 : : */ 16 : : #include <cvc5/cvc5.h> 17 : : 18 : : using namespace cvc5; 19 : 1 : int main(void) 20 : : { 21 : 2 : TermManager tm; 22 : 2 : Solver solver(tm); 23 : 1 : solver.setOption("incremental", "false"); 24 : 2 : Sort s0 = tm.mkBitVectorSort(128); 25 : 2 : Term t1 = tm.mkConst(s0, "_x2"); 26 : 2 : Op o2 = tm.mkOp(Kind::BITVECTOR_TO_NAT); 27 : 4 : Term t3 = tm.mkTerm(o2, {t1}); 28 : 2 : Sort s4 = t3.getSort(); 29 : 2 : Op o5 = tm.mkOp(Kind::INT_TO_BITVECTOR, {27}); 30 : 4 : Term t6 = tm.mkTerm(o5, {t3}); 31 : 2 : Sort s7 = t6.getSort(); 32 : 2 : Op o8 = tm.mkOp(Kind::BITVECTOR_SGE); 33 : 5 : Term t9 = tm.mkTerm(o8, {t6, t6}); 34 : 1 : Sort s10 = t9.getSort(); 35 [ + + ][ - - ]: 3 : solver.checkSatAssuming({t9, t9}); 36 : 1 : return 0; 37 : : }