GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/preprocessing/passes/real_to_int.h Lines: 1 1 100.0 %
Date: 2021-03-22 Branches: 0 0 0.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file real_to_int.h
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Haniel Barbosa, Mathias Preiner
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 The RealToInt preprocessing pass
13
 **
14
 ** Converts real operations into integer operations
15
 **/
16
17
#include "cvc4_private.h"
18
19
#ifndef CVC4__PREPROCESSING__PASSES__REAL_TO_INT_H
20
#define CVC4__PREPROCESSING__PASSES__REAL_TO_INT_H
21
22
#include <vector>
23
24
#include "expr/node.h"
25
#include "preprocessing/preprocessing_pass.h"
26
27
namespace CVC4 {
28
namespace preprocessing {
29
namespace passes {
30
31
using NodeMap = std::unordered_map<Node, Node, NodeHashFunction>;
32
33
17984
class RealToInt : public PreprocessingPass
34
{
35
 public:
36
  RealToInt(PreprocessingPassContext* preprocContext);
37
38
 protected:
39
  PreprocessingPassResult applyInternal(
40
      AssertionPipeline* assertionsToPreprocess) override;
41
42
 private:
43
  Node realToIntInternal(TNode n, NodeMap& cache, std::vector<Node>& var_eq);
44
};
45
46
}  // namespace passes
47
}  // namespace preprocessing
48
}  // namespace CVC4
49
50
#endif /* CVC4__PREPROCESSING__PASSES__REAL_TO_INT_H */