GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/preprocessing/passes/rewrite.cpp Lines: 7 7 100.0 %
Date: 2021-09-07 Branches: 8 14 57.1 %

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