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

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Haniel Barbosa, Mathias Preiner
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
 * The RealToInt preprocessing pass.
14
 *
15
 * Converts real operations into integer operations.
16
 */
17
18
#include "cvc5_private.h"
19
20
#ifndef CVC5__PREPROCESSING__PASSES__REAL_TO_INT_H
21
#define CVC5__PREPROCESSING__PASSES__REAL_TO_INT_H
22
23
#include <vector>
24
25
#include "context/cdhashmap.h"
26
#include "expr/node.h"
27
#include "preprocessing/preprocessing_pass.h"
28
29
namespace cvc5 {
30
namespace preprocessing {
31
namespace passes {
32
33
18918
class RealToInt : public PreprocessingPass
34
{
35
  using NodeMap = context::CDHashMap<Node, Node>;
36
37
 public:
38
  RealToInt(PreprocessingPassContext* preprocContext);
39
40
 protected:
41
  PreprocessingPassResult applyInternal(
42
      AssertionPipeline* assertionsToPreprocess) override;
43
44
 private:
45
  Node realToIntInternal(TNode n, NodeMap& cache, std::vector<Node>& var_eq);
46
  /** Cache for the above method */
47
  NodeMap d_cache;
48
};
49
50
}  // namespace passes
51
}  // namespace preprocessing
52
}  // namespace cvc5
53
54
#endif /* CVC5__PREPROCESSING__PASSES__REAL_TO_INT_H */