GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/theory/arrays/theory_arrays_rewriter.cpp Lines: 9 9 100.0 %
Date: 2021-03-23 Branches: 6 14 42.9 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file theory_arrays_rewriter.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Morgan Deters
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 [[ Add one-line brief description here ]]
13
 **
14
 ** [[ Add lengthier description here ]]
15
 ** \todo document this file
16
 **/
17
18
#include "expr/attribute.h"
19
#include "theory/arrays/theory_arrays_rewriter.h"
20
21
namespace CVC4 {
22
namespace theory {
23
namespace arrays {
24
25
namespace attr {
26
  struct ArrayConstantMostFrequentValueTag { };
27
  struct ArrayConstantMostFrequentValueCountTag { };
28
}/* CVC4::theory::arrays::attr namespace */
29
30
typedef expr::Attribute<attr::ArrayConstantMostFrequentValueCountTag, uint64_t> ArrayConstantMostFrequentValueCountAttr;
31
typedef expr::Attribute<attr::ArrayConstantMostFrequentValueTag, Node> ArrayConstantMostFrequentValueAttr;
32
33
1114
Node getMostFrequentValue(TNode store) {
34
1114
  return store.getAttribute(ArrayConstantMostFrequentValueAttr());
35
}
36
1114
uint64_t getMostFrequentValueCount(TNode store) {
37
1114
  return store.getAttribute(ArrayConstantMostFrequentValueCountAttr());
38
}
39
40
597
void setMostFrequentValue(TNode store, TNode value) {
41
597
  return store.setAttribute(ArrayConstantMostFrequentValueAttr(), value);
42
}
43
597
void setMostFrequentValueCount(TNode store, uint64_t count) {
44
597
  return store.setAttribute(ArrayConstantMostFrequentValueCountAttr(), count);
45
}
46
47
}/* CVC4::theory::arrays namespace */
48
}/* CVC4::theory namespace */
49
26685
}/* CVC4 namespace */