GCC Code Coverage Report
Directory: . Exec Total Coverage
File: test/api/issue4889.cpp Lines: 15 15 100.0 %
Date: 2021-08-14 Branches: 16 32 50.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Andrew Reynolds, Aina Niemetz
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 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 "api/cpp/cvc5.h"
17
18
using namespace cvc5::api;
19
20
1
int main()
21
{
22
2
  Solver slv;
23
2
  Sort sort_int = slv.getIntegerSort();
24
2
  Sort sort_array = slv.mkArraySort(sort_int, sort_int);
25
2
  Sort sort_fp128 = slv.mkFloatingPointSort(15, 113);
26
2
  Sort sort_fp32 = slv.mkFloatingPointSort(8, 24);
27
2
  Sort sort_bool = slv.getBooleanSort();
28
2
  Term const0 = slv.mkConst(sort_fp32, "_c0");
29
2
  Term const1 = slv.mkConst(sort_fp32, "_c2");
30
2
  Term const2 = slv.mkConst(sort_bool, "_c4");
31
2
  Term ite = slv.mkTerm(ITE, const2, const1, const0);
32
2
  Term rem = slv.mkTerm(FLOATINGPOINT_REM, ite, const1);
33
2
  Term isnan = slv.mkTerm(FLOATINGPOINT_ISNAN, rem);
34
1
  slv.checkSatAssuming(isnan);
35
1
  return 0;
36
}