Branch data Line data Source code
1 : : /****************************************************************************** 2 : : * Top contributors (to current version): 3 : : * 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 #308. 14 : : */ 15 : : #include <cvc5/cvc5.h> 16 : : 17 : : #include <cassert> 18 : : 19 : : using namespace cvc5; 20 : : 21 : 1 : int main(void) 22 : : { 23 : 2 : TermManager tm; 24 : 2 : Solver solver(tm); 25 : 1 : solver.setOption("check-proofs", "true"); 26 : 2 : Sort s1 = tm.getBooleanSort(); 27 : 2 : Term t1 = tm.mkConst(s1, "_x0"); 28 : 5 : Term t2 = tm.mkTerm(Kind::XOR, {t1, t1}); 29 : 1 : solver.checkSatAssuming({t2}); 30 : 2 : auto unsat_core = solver.getUnsatCore(); 31 [ - + ]: 1 : assert(!unsat_core.empty()); 32 : 1 : }