Debian Codegraph @

test/api/python/issues/proj-issue306.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 ##
14
15 import cvc5
16 from cvc5 import Kind
17
18 tm = cvc5.TermManager()
19 slv = cvc5.Solver(tm)
20 slv.setOption("check-proofs", "true")
21 slv.setOption("proof-check", "eager")
22 s1 = tm.getBooleanSort()
23 s3 = tm.getStringSort()
24 t1 = tm.mkConst(s3, "_x0")
25 t3 = tm.mkConst(s1, "_x2")
26 t11 = tm.mkString("")
27 t14 = tm.mkConst(s3, "_x11")
28 t42 = tm.mkTerm(Kind.ITE, t3, t14, t1)
29 t58 = tm.mkTerm(Kind.STRING_LEQ, t14, t11)
30 t95 = tm.mkTerm(Kind.EQUAL, t14, t42)
31 slv.assertFormula(t95)
32 slv.checkSatAssuming(t58)