LCOV - code coverage report
Current view: top level - buildbot/coverage/build/test/api/cpp/issues - proj-issue420.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 23 23 100.0 %
Date: 2024-10-24 11:38:43 Functions: 1 1 100.0 %
Branches: 2 4 50.0 %

           Branch data     Line data    Source code
       1                 :            : /******************************************************************************
       2                 :            :  * Top contributors (to current version):
       3                 :            :  *   Aina Niemetz, Andrew Reynolds
       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 #420.
      14                 :            :  */
      15                 :            : #include <cvc5/cvc5.h>
      16                 :            : 
      17                 :            : using namespace cvc5;
      18                 :            : 
      19                 :          1 : int main(void)
      20                 :            : {
      21                 :          2 :   TermManager tm;
      22                 :          2 :   Solver solver(tm);
      23                 :            : 
      24                 :          1 :   solver.setOption("strings-exp", "true");
      25                 :          1 :   solver.setOption("produce-models", "true");
      26                 :          1 :   solver.setOption("produce-unsat-cores", "true");
      27                 :          2 :   Sort s2 = tm.getRealSort();
      28                 :          2 :   Sort s3 = tm.mkUninterpretedSort("_u0");
      29                 :          3 :   DatatypeDecl _dt1 = tm.mkDatatypeDecl("_dt1", {});
      30                 :          3 :   DatatypeConstructorDecl _cons16 = tm.mkDatatypeConstructorDecl("_cons16");
      31                 :          1 :   _cons16.addSelector("_sel13", s3);
      32                 :          1 :   _dt1.addConstructor(_cons16);
      33                 :          4 :   std::vector<Sort> _s4 = tm.mkDatatypeSorts({_dt1});
      34                 :          2 :   Sort s4 = _s4[0];
      35                 :          2 :   Sort s5 = tm.mkSequenceSort(s2);
      36                 :          2 :   Term t3 = tm.mkConst(s5, "_x18");
      37                 :          2 :   Term t7 = tm.mkConst(s4, "_x22");
      38                 :            :   // was initially a dt size application
      39                 :          3 :   Term t13 = tm.mkConst(tm.getIntegerSort(), "t13");
      40                 :          4 :   Term t53 = tm.mkTerm(Kind::SEQ_NTH, {t3, t13});
      41                 :          1 :   solver.checkSat();
      42 [ +  + ][ -  - ]:          3 :   solver.blockModelValues({t53, t7});
      43                 :          1 :   solver.checkSat();
      44                 :          1 : }

Generated by: LCOV version 1.14