2022-04-05 13:38:57 -07:00
|
|
|
###############################################################################
|
2021-11-16 20:56:37 +02:00
|
|
|
# Top contributors (to current version):
|
2022-04-05 13:38:57 -07:00
|
|
|
# Yoni Zohar, Aina Niemetz, Alex Ozdemir
|
2021-11-16 20:56:37 +02:00
|
|
|
#
|
|
|
|
|
# This file is part of the cvc5 project.
|
|
|
|
|
#
|
2022-04-05 13:38:57 -07:00
|
|
|
# Copyright (c) 2009-2022 by the authors listed in the file AUTHORS
|
2021-11-16 20:56:37 +02:00
|
|
|
# in the top-level source directory and their institutional affiliations.
|
|
|
|
|
# All rights reserved. See the file COPYING in the top-level source
|
|
|
|
|
# directory for licensing information.
|
2022-04-05 13:38:57 -07:00
|
|
|
# #############################################################################
|
2021-11-16 20:56:37 +02:00
|
|
|
#
|
|
|
|
|
# Test for issue #6111
|
|
|
|
|
##
|
|
|
|
|
|
2022-02-02 15:45:42 -08:00
|
|
|
import cvc5
|
|
|
|
|
from cvc5 import Kind
|
2021-11-16 20:56:37 +02:00
|
|
|
|
2022-02-02 15:45:42 -08:00
|
|
|
solver = cvc5.Solver()
|
2021-11-16 20:56:37 +02:00
|
|
|
solver.setLogic("QF_BV")
|
|
|
|
|
bvsort12979 = solver.mkBitVectorSort(12979)
|
|
|
|
|
input2_1 = solver.mkConst(bvsort12979, "intpu2_1")
|
|
|
|
|
zero = solver.mkBitVector(bvsort12979.getBitVectorSize(), "0", 10)
|
|
|
|
|
|
2022-04-01 12:45:36 -07:00
|
|
|
bvult_res = solver.mkTerm(Kind.BITVECTOR_ULT, zero, input2_1)
|
2021-11-16 20:56:37 +02:00
|
|
|
solver.assertFormula(bvult_res)
|
|
|
|
|
|
|
|
|
|
bvsort4 = solver.mkBitVectorSort(4)
|
|
|
|
|
concat_result_42 = solver.mkConst(bvsort4, "concat_result_42")
|
|
|
|
|
bvsort8 = solver.mkBitVectorSort(8)
|
|
|
|
|
concat_result_43 = solver.mkConst(bvsort8, "concat_result_43")
|
|
|
|
|
|
|
|
|
|
args2 = []
|
|
|
|
|
args2.append(concat_result_42)
|
|
|
|
|
args2.append(
|
2022-04-01 12:45:36 -07:00
|
|
|
solver.mkTerm(solver.mkOp(Kind.BITVECTOR_EXTRACT, 7, 4), concat_result_43))
|
|
|
|
|
solver.assertFormula(solver.mkTerm(Kind.EQUAL, *args2))
|
2021-11-16 20:56:37 +02:00
|
|
|
|
|
|
|
|
args3 = []
|
|
|
|
|
args3.append(concat_result_42)
|
|
|
|
|
args3.append(
|
2022-04-01 12:45:36 -07:00
|
|
|
solver.mkTerm(solver.mkOp(Kind.BITVECTOR_EXTRACT, 3, 0), concat_result_43))
|
|
|
|
|
solver.assertFormula(solver.mkTerm(Kind.EQUAL, *args3))
|
2021-11-16 20:56:37 +02:00
|
|
|
|
|
|
|
|
print(solver.checkSat())
|