2021-06-18 10:31:53 -07:00
|
|
|
/******************************************************************************
|
|
|
|
|
* Top contributors (to current version):
|
2022-04-05 13:38:57 -07:00
|
|
|
* Mathias Preiner, Aina Niemetz
|
2021-06-18 10:31:53 -07: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-06-18 10:31:53 -07: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.
|
|
|
|
|
* ****************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* Test for issue #6111
|
|
|
|
|
*
|
|
|
|
|
*/
|
2023-03-07 15:39:29 -08:00
|
|
|
#include <cvc5/cvc5.h>
|
|
|
|
|
|
2021-06-18 10:31:53 -07:00
|
|
|
#include <iostream>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2022-03-29 16:23:01 -07:00
|
|
|
using namespace cvc5;
|
2021-06-18 10:31:53 -07:00
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
Solver solver;
|
|
|
|
|
solver.setLogic("QF_BV");
|
|
|
|
|
Sort bvsort12979 = solver.mkBitVectorSort(12979);
|
|
|
|
|
Term input2_1 = solver.mkConst(bvsort12979, "intpu2_1");
|
2021-10-20 12:14:59 -07:00
|
|
|
Term zero = solver.mkBitVector(bvsort12979.getBitVectorSize(), "0", 10);
|
2021-06-18 10:31:53 -07:00
|
|
|
|
|
|
|
|
vector<Term> args1;
|
|
|
|
|
args1.push_back(zero);
|
|
|
|
|
args1.push_back(input2_1);
|
2022-03-21 17:22:41 -07:00
|
|
|
Term bvult_res = solver.mkTerm(BITVECTOR_ULT, {args1});
|
2021-06-18 10:31:53 -07:00
|
|
|
solver.assertFormula(bvult_res);
|
|
|
|
|
|
|
|
|
|
Sort bvsort4 = solver.mkBitVectorSort(4);
|
|
|
|
|
Term concat_result_42 = solver.mkConst(bvsort4, "concat_result_42");
|
|
|
|
|
Sort bvsort8 = solver.mkBitVectorSort(8);
|
|
|
|
|
Term concat_result_43 = solver.mkConst(bvsort8, "concat_result_43");
|
|
|
|
|
|
|
|
|
|
vector<Term> args2;
|
|
|
|
|
args2.push_back(concat_result_42);
|
2022-03-25 16:57:10 -07:00
|
|
|
args2.push_back(solver.mkTerm(solver.mkOp(BITVECTOR_EXTRACT, {7, 4}),
|
|
|
|
|
{concat_result_43}));
|
2022-03-21 17:22:41 -07:00
|
|
|
solver.assertFormula(solver.mkTerm(EQUAL, {args2}));
|
2021-06-18 10:31:53 -07:00
|
|
|
|
|
|
|
|
vector<Term> args3;
|
|
|
|
|
args3.push_back(concat_result_42);
|
2022-03-25 16:57:10 -07:00
|
|
|
args3.push_back(solver.mkTerm(solver.mkOp(BITVECTOR_EXTRACT, {3, 0}),
|
|
|
|
|
{concat_result_43}));
|
2022-03-21 17:22:41 -07:00
|
|
|
solver.assertFormula(solver.mkTerm(EQUAL, {args3}));
|
2021-06-18 10:31:53 -07:00
|
|
|
|
|
|
|
|
cout << solver.checkSat() << endl;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|