GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/preprocessing/passes/extended_rewriter_pass.cpp Lines: 9 9 100.0 %
Date: 2021-05-22 Branches: 13 28 46.4 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Haniel Barbosa
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 ExtRewPre preprocessing pass.
14
 *
15
 * Applies the extended rewriter to assertions.
16
 */
17
18
#include "preprocessing/passes/extended_rewriter_pass.h"
19
20
#include "options/smt_options.h"
21
#include "preprocessing/assertion_pipeline.h"
22
#include "preprocessing/preprocessing_pass_context.h"
23
#include "theory/quantifiers/extended_rewrite.h"
24
25
namespace cvc5 {
26
namespace preprocessing {
27
namespace passes {
28
29
9459
ExtRewPre::ExtRewPre(PreprocessingPassContext* preprocContext)
30
9459
    : PreprocessingPass(preprocContext, "ext-rew-pre"){};
31
32
24
PreprocessingPassResult ExtRewPre::applyInternal(
33
    AssertionPipeline* assertionsToPreprocess)
34
{
35
79
  theory::quantifiers::ExtendedRewriter extr(options::extRewPrepAgg());
36
138
  for (unsigned i = 0, size = assertionsToPreprocess->size(); i < size; ++i)
37
  {
38
114
    assertionsToPreprocess->replace(
39
228
        i, extr.extendedRewrite((*assertionsToPreprocess)[i]));
40
  }
41
48
  return PreprocessingPassResult::NO_CONFLICT;
42
}
43
44
45
}  // namespace passes
46
}  // namespace preprocessing
47
28222
}  // namespace cvc5