1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Andrew Reynolds |
4 |
|
* |
5 |
|
* This file is part of the cvc5 project. |
6 |
|
* |
7 |
|
* Copyright (c) 2009-2021 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 #306 |
14 |
|
* |
15 |
|
*/ |
16 |
|
|
17 |
|
#include "api/cpp/cvc5.h" |
18 |
|
|
19 |
|
using namespace cvc5::api; |
20 |
|
|
21 |
1 |
int main(void) |
22 |
|
{ |
23 |
2 |
Solver slv; |
24 |
1 |
slv.setOption("check-proofs", "true"); |
25 |
1 |
slv.setOption("proof-check", "eager"); |
26 |
2 |
Sort s1 = slv.getBooleanSort(); |
27 |
2 |
Sort s3 = slv.getStringSort(); |
28 |
2 |
Term t1 = slv.mkConst(s3, "_x0"); |
29 |
2 |
Term t3 = slv.mkConst(s1, "_x2"); |
30 |
2 |
Term t11 = slv.mkString(""); |
31 |
2 |
Term t14 = slv.mkConst(s3, "_x11"); |
32 |
2 |
Term t42 = slv.mkTerm(Kind::ITE, t3, t14, t1); |
33 |
2 |
Term t58 = slv.mkTerm(Kind::STRING_LEQ, t14, t11); |
34 |
2 |
Term t95 = slv.mkTerm(Kind::EQUAL, t14, t42); |
35 |
1 |
slv.assertFormula(t95); |
36 |
1 |
slv.checkSatAssuming({t58}); |
37 |
1 |
} |