GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/preprocessing/passes/rewrite.cpp Lines: 7 7 100.0 %
Date: 2021-03-22 Branches: 8 16 50.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file rewrite.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Caleb Donovick
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 rewrite preprocessing pass
13
 **
14
 ** Calls the rewriter on every assertion
15
 **/
16
17
#include "preprocessing/passes/rewrite.h"
18
19
#include "preprocessing/assertion_pipeline.h"
20
#include "theory/rewriter.h"
21
22
namespace CVC4 {
23
namespace preprocessing {
24
namespace passes {
25
26
using namespace CVC4::theory;
27
28
29
8995
Rewrite::Rewrite(PreprocessingPassContext* preprocContext)
30
8995
    : PreprocessingPass(preprocContext, "rewrite"){};
31
32
33
22789
PreprocessingPassResult Rewrite::applyInternal(
34
  AssertionPipeline* assertionsToPreprocess)
35
{
36
210956
  for (unsigned i = 0; i < assertionsToPreprocess->size(); ++i) {
37
188167
    assertionsToPreprocess->replace(i, Rewriter::rewrite((*assertionsToPreprocess)[i]));
38
  }
39
40
22789
  return PreprocessingPassResult::NO_CONFLICT;
41
}
42
43
44
}  // namespace passes
45
}  // namespace preprocessing
46
26676
}  // namespace CVC4