Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * This file is part of the cvc5 project. 3 : : * 4 : : * Copyright (c) 2009-2026 by the authors listed in the file AUTHORS 5 : : * in the top-level source directory and their institutional affiliations. 6 : : * All rights reserved. See the file COPYING in the top-level source 7 : : * directory for licensing information. 8 : : * **************************************************************************** 9 : : * 10 : : * Test for project issue #436. 11 : : */ 12 : : #include <cvc5/cvc5.h> 13 : : 14 : : #include <cassert> 15 : : 16 : : using namespace cvc5; 17 : : 18 : 1 : int main(void) 19 : : { 20 : 1 : TermManager tm; 21 : 1 : Solver solver(tm); 22 : : 23 : 1 : solver.setOption("produce-abducts", "true"); 24 : 1 : solver.setOption("solve-bv-as-int", "sum"); 25 : 1 : Sort s8 = tm.mkBitVectorSort(68); 26 : 1 : Term t17 = tm.mkConst(s8, "_x6"); 27 : 1 : Term t23; 28 : : { 29 : 1 : uint32_t bw = s8.getBitVectorSize(); 30 : 1 : t23 = tm.mkBitVector(bw, 1); 31 : : } 32 : 4 : Term t33 = tm.mkTerm(Kind::BITVECTOR_ULT, {t17, t23}); 33 : : // solve-bv-as-int is incompatible with get-abduct 34 : : try 35 : : { 36 : 1 : solver.getAbduct(t33); 37 : : } 38 [ - + ]: 1 : catch (CVC5ApiException& e) 39 : : { 40 : 1 : return 0; 41 : 1 : } 42 : 0 : assert(false); 43 : 1 : }