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

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
24
namespace cvc5 {
25
namespace preprocessing {
26
namespace passes {
27
28
9942
ExtRewPre::ExtRewPre(PreprocessingPassContext* preprocContext)
29
9942
    : PreprocessingPass(preprocContext, "ext-rew-pre"){};
30
31
24
PreprocessingPassResult ExtRewPre::applyInternal(
32
    AssertionPipeline* assertionsToPreprocess)
33
{
34
138
  for (unsigned i = 0, size = assertionsToPreprocess->size(); i < size; ++i)
35
  {
36
114
    assertionsToPreprocess->replace(
37
        i,
38
342
        extendedRewrite((*assertionsToPreprocess)[i],
39
114
                        options().smt.extRewPrepAgg));
40
  }
41
24
  return PreprocessingPassResult::NO_CONFLICT;
42
}
43
44
45
}  // namespace passes
46
}  // namespace preprocessing
47
29577
}  // namespace cvc5