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 #435. 11 : : */ 12 : : #include <cvc5/cvc5.h> 13 : : 14 : : using namespace cvc5; 15 : : 16 : 1 : int main(void) 17 : : { 18 : 1 : TermManager tm; 19 : 1 : Solver solver(tm); 20 : 1 : solver.setOption("strings-exp", "true"); 21 : 1 : Sort s1 = tm.mkUninterpretedSort("_u0"); 22 : 1 : Sort s3 = tm.getBooleanSort(); 23 : 1 : Sort _p7 = tm.mkParamSort("_p7"); 24 : 3 : DatatypeDecl _dt5 = tm.mkDatatypeDecl("_dt5", {_p7}); 25 : 2 : DatatypeConstructorDecl _cons33 = tm.mkDatatypeConstructorDecl("_cons33"); 26 : 1 : _cons33.addSelector("_sel31", s1); 27 : 1 : _cons33.addSelector("_sel32", _p7); 28 : 1 : _dt5.addConstructor(_cons33); 29 : 3 : std::vector<Sort> _s6 = tm.mkDatatypeSorts({_dt5}); 30 : 1 : Sort s6 = _s6[0]; 31 : 3 : Sort s21 = s6.instantiate({s3}); 32 : 1 : Sort s42 = tm.mkSequenceSort(s21); 33 : 1 : Term t40 = tm.mkConst(s42, "_x64"); 34 : 3 : Term t75 = tm.mkTerm(Kind::SEQ_REV, {t40}); 35 : 4 : Term t91 = tm.mkTerm(Kind::SEQ_PREFIX, {t75, t40}); 36 : 1 : solver.checkSatAssuming({t91}); 37 : 1 : }