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

Line Exec Source
1
/*********************                                                        */
2
/*! \file issue4889.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Andrew Reynolds
6
 ** This file is part of the CVC4 project.
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.\endverbatim
11
 **
12
 ** \brief Test for issue #4889
13
 **/
14
15
#include "api/cvc4cpp.h"
16
17
using namespace CVC4::api;
18
19
1
int main()
20
{
21
#ifdef CVC4_USE_SYMFPU
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
#endif
36
1
  return 0;
37
}