GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/fp/theory_fp_rewriter.h Lines: 1 1 100.0 %
Date: 2021-08-17 Branches: 0 0 0.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Andres Noetzli, Martin Brain, 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
 * [[ Add one-line brief description here ]]
14
 *
15
 * [[ Add lengthier description here ]]
16
 * \todo document this file
17
 */
18
19
#include "cvc5_private.h"
20
21
#ifndef CVC5__THEORY__FP__THEORY_FP_REWRITER_H
22
#define CVC5__THEORY__FP__THEORY_FP_REWRITER_H
23
24
#include "theory/fp/fp_expand_defs.h"
25
#include "theory/theory_rewriter.h"
26
27
namespace cvc5 {
28
namespace theory {
29
namespace fp {
30
31
typedef RewriteResponse (*RewriteFunction) (TNode, bool);
32
33
9850
class TheoryFpRewriter : public TheoryRewriter
34
{
35
 public:
36
  TheoryFpRewriter(context::UserContext* u);
37
38
  RewriteResponse preRewrite(TNode node) override;
39
  RewriteResponse postRewrite(TNode node) override;
40
41
  /**
42
   * Rewrite an equality, in case special handling is required.
43
   */
44
  Node rewriteEquality(TNode equality)
45
  {
46
    // often this will suffice
47
    return postRewrite(equality).d_node;
48
  }
49
  /** Expand definitions in node */
50
  TrustNode expandDefinition(Node node) override;
51
52
 protected:
53
  /** TODO: document (projects issue #265) */
54
  RewriteFunction d_preRewriteTable[kind::LAST_KIND];
55
  RewriteFunction d_postRewriteTable[kind::LAST_KIND];
56
  RewriteFunction d_constantFoldTable[kind::LAST_KIND];
57
  /** The expand definitions module. */
58
  FpExpandDefs d_fpExpDef;
59
}; /* class TheoryFpRewriter */
60
61
}  // namespace fp
62
}  // namespace theory
63
}  // namespace cvc5
64
65
#endif /* CVC5__THEORY__FP__THEORY_FP_REWRITER_H */