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: 2026-03-16 10:41:14 Functions: 1 1 100.0 %
Branches: 2 4 50.0 %

           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 #420.
      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                 :            : 
      21                 :          1 :   solver.setOption("strings-exp", "true");
      22                 :          1 :   solver.setOption("produce-models", "true");
      23                 :          1 :   solver.setOption("produce-unsat-cores", "true");
      24                 :          1 :   Sort s2 = tm.getRealSort();
      25                 :          1 :   Sort s3 = tm.mkUninterpretedSort("_u0");
      26                 :          2 :   DatatypeDecl _dt1 = tm.mkDatatypeDecl("_dt1", {});
      27                 :          2 :   DatatypeConstructorDecl _cons16 = tm.mkDatatypeConstructorDecl("_cons16");
      28                 :          1 :   _cons16.addSelector("_sel13", s3);
      29                 :          1 :   _dt1.addConstructor(_cons16);
      30                 :          3 :   std::vector<Sort> _s4 = tm.mkDatatypeSorts({_dt1});
      31                 :          1 :   Sort s4 = _s4[0];
      32                 :          1 :   Sort s5 = tm.mkSequenceSort(s2);
      33                 :          1 :   Term t3 = tm.mkConst(s5, "_x18");
      34                 :          1 :   Term t7 = tm.mkConst(s4, "_x22");
      35                 :            :   // was initially a dt size application
      36                 :          2 :   Term t13 = tm.mkConst(tm.getIntegerSort(), "t13");
      37                 :          4 :   Term t53 = tm.mkTerm(Kind::SEQ_NTH, {t3, t13});
      38                 :          1 :   solver.checkSat();
      39 [ +  + ][ -  - ]:          3 :   solver.blockModelValues({t53, t7});
      40                 :          1 :   solver.checkSat();
      41                 :          1 : }

Generated by: LCOV version 1.14