Debian Codegraph @

test/api/python/issues/issue6111.py

raw
1 ###############################################################################
2 # Top contributors (to current version):
3 # Aina Niemetz, Yoni Zohar, Alex Ozdemir
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 issue #6111
14 ##
15
16 import cvc5
17 from cvc5 import Kind
18
19 tm = cvc5.TermManager()
20 solver = cvc5.Solver(tm)
21 solver.setLogic("QF_BV")
22 bvsort12979 = tm.mkBitVectorSort(12979)
23 input2_1 = tm.mkConst(bvsort12979, "intpu2_1")
24 zero = tm.mkBitVector(bvsort12979.getBitVectorSize(), "0", 10)
25
26 bvult_res = tm.mkTerm(Kind.BITVECTOR_ULT, zero, input2_1)
27 solver.assertFormula(bvult_res)
28
29 bvsort4 = tm.mkBitVectorSort(4)
30 concat_result_42 = tm.mkConst(bvsort4, "concat_result_42")
31 bvsort8 = tm.mkBitVectorSort(8)
32 concat_result_43 = tm.mkConst(bvsort8, "concat_result_43")
33
34 args2 = []
35 args2.append(concat_result_42)
36 args2.append(tm.mkTerm(tm.mkOp(Kind.BITVECTOR_EXTRACT, 7, 4), concat_result_43))
37 solver.assertFormula(tm.mkTerm(Kind.EQUAL, *args2))
38
39 args3 = []
40 args3.append(concat_result_42)
41 args3.append(tm.mkTerm(tm.mkOp(Kind.BITVECTOR_EXTRACT, 3, 0), concat_result_43))
42 solver.assertFormula(tm.mkTerm(Kind.EQUAL, *args3))
43
44 print(solver.checkSat())