GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/arrays/theory_arrays_rewriter.h Lines: 3 3 100.0 %
Date: 2021-05-22 Branches: 4 12 33.3 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Clark Barrett, Morgan Deters, Andres Noetzli
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__ARRAYS__THEORY_ARRAYS_REWRITER_H
22
#define CVC5__THEORY__ARRAYS__THEORY_ARRAYS_REWRITER_H
23
24
#include <unordered_map>
25
#include <unordered_set>
26
27
#include "theory/rewriter.h"
28
#include "theory/theory_rewriter.h"
29
#include "theory/type_enumerator.h"
30
31
namespace cvc5 {
32
namespace theory {
33
namespace arrays {
34
35
Node getMostFrequentValue(TNode store);
36
uint64_t getMostFrequentValueCount(TNode store);
37
void setMostFrequentValue(TNode store, TNode value);
38
void setMostFrequentValueCount(TNode store, uint64_t count);
39
40
22420
static inline Node mkEqNode(Node a, Node b) {
41
22420
  return a.eqNode(b);
42
}
43
44
360090
class TheoryArraysRewriter : public TheoryRewriter
45
{
46
  /**
47
   * Puts array constant node into normal form. This is so that array constants
48
   * that are distinct nodes are semantically disequal.
49
   */
50
  static Node normalizeConstant(TNode node);
51
52
 public:
53
  /** Normalize a constant whose index type has cardinality indexCard */
54
  static Node normalizeConstant(TNode node, Cardinality indexCard);
55
56
  RewriteResponse postRewrite(TNode node) override;
57
58
  RewriteResponse preRewrite(TNode node) override;
59
60
  TrustNode expandDefinition(Node node) override;
61
62
  static inline void init() {}
63
  static inline void shutdown() {}
64
65
}; /* class TheoryArraysRewriter */
66
67
}  // namespace arrays
68
}  // namespace theory
69
}  // namespace cvc5
70
71
#endif /* CVC5__THEORY__ARRAYS__THEORY_ARRAYS_REWRITER_H */