LCOV - code coverage report
Current view: top level - buildbot/coverage/build/test/api/cpp/issues - proj-issue377.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 24 24 100.0 %
Date: 2024-09-24 10:47:28 Functions: 1 1 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Aina Niemetz, Andrew Reynolds, Mathias Preiner
       4                 :            :  *
       5                 :            :  * This file is part of the cvc5 project.
       6                 :            :  *
       7                 :            :  * Copyright (c) 2009-2024 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 #377
      14                 :            :  *
      15                 :            :  */
      16                 :            : 
      17                 :            : #include <cvc5/cvc5.h>
      18                 :            : 
      19                 :            : #include <cassert>
      20                 :            : 
      21                 :            : using namespace cvc5;
      22                 :            : 
      23                 :          1 : int main(void)
      24                 :            : {
      25                 :          2 :   TermManager tm;
      26                 :          2 :   Solver slv(tm);
      27                 :          1 :   slv.setOption("incremental", "true");
      28                 :          1 :   slv.setOption("check-proofs", "true");
      29                 :          2 :   Sort s1 = tm.getBooleanSort();
      30                 :          2 :   Sort s2 = tm.getIntegerSort();
      31                 :          2 :   Sort s3 = tm.mkBitVectorSort(81);
      32                 :          2 :   Term t5 = tm.mkConst(s2, "_x4");
      33                 :          2 :   Term t27 = tm.mkBoolean(false);
      34                 :            :   Term t35 = tm.mkBitVector(81,
      35                 :            :                             "01111101110010010010110100110101000100101001101000"
      36                 :            :                             "0111011010001110001111010101100",
      37                 :          3 :                             2);
      38                 :          4 :   Term t37 = tm.mkTerm(Kind::BITVECTOR_TO_NAT, {t35});
      39                 :          2 :   Term t40 = tm.mkTerm(Kind::PI);
      40                 :          5 :   Term t43 = tm.mkTerm(Kind::ADD, {t40, t40});
      41                 :          5 :   Term t45 = tm.mkTerm(tm.mkOp(Kind::IAND, {31}), {t37, t5});
      42                 :          5 :   Term t66 = tm.mkTerm(Kind::EQUAL, {t43, t40});
      43                 :          5 :   Term t101 = tm.mkTerm(Kind::LT, {t37, t45});
      44                 :          1 :   slv.assertFormula({t66});
      45                 :          7 :   Term t102 = tm.mkTerm(Kind::AND, {t101, t27, t101, t101});
      46                 :          4 :   Term t103 = tm.mkTerm(Kind::NOT, {t102});
      47                 :          1 :   slv.checkSatAssuming({t103});
      48                 :          3 :   Term t104 = tm.mkTerm(Kind::NOT, {t101});
      49                 :          1 :   slv.checkSatAssuming({t104});
      50                 :          1 : }

Generated by: LCOV version 1.14