LCOV - code coverage report
Current view: top level - buildbot/coverage/build/test/api/cpp/issues - issue4889.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 16 16 100.0 %
Date: 2024-12-31 12:36:47 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 issue #4889
      14                 :            :  */
      15                 :            : 
      16                 :            : #include <cvc5/cvc5.h>
      17                 :            : 
      18                 :            : using namespace cvc5;
      19                 :            : 
      20                 :          1 : int main()
      21                 :            : {
      22                 :          2 :   TermManager tm;
      23                 :          2 :   Solver slv(tm);
      24                 :          2 :   Sort sort_int = tm.getIntegerSort();
      25                 :          2 :   Sort sort_array = tm.mkArraySort(sort_int, sort_int);
      26                 :          2 :   Sort sort_fp128 = tm.mkFloatingPointSort(15, 113);
      27                 :          2 :   Sort sort_fp32 = tm.mkFloatingPointSort(8, 24);
      28                 :          2 :   Sort sort_bool = tm.getBooleanSort();
      29                 :          2 :   Term const0 = tm.mkConst(sort_fp32, "_c0");
      30                 :          2 :   Term const1 = tm.mkConst(sort_fp32, "_c2");
      31                 :          2 :   Term const2 = tm.mkConst(sort_bool, "_c4");
      32                 :          6 :   Term ite = tm.mkTerm(Kind::ITE, {const2, const1, const0});
      33                 :          5 :   Term rem = tm.mkTerm(Kind::FLOATINGPOINT_REM, {ite, const1});
      34                 :          3 :   Term isnan = tm.mkTerm(Kind::FLOATINGPOINT_IS_NAN, {rem});
      35                 :          1 :   slv.checkSatAssuming(isnan);
      36                 :          1 :   return 0;
      37                 :            : }

Generated by: LCOV version 1.14