1 |
|
/****************************************************************************** |
2 |
|
* Top contributors (to current version): |
3 |
|
* Justin Xu, Abdalrhman Mohamed, Andres Noetzli |
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 preprocessing pass super class. |
14 |
|
*/ |
15 |
|
|
16 |
|
#include "preprocessing/preprocessing_pass.h" |
17 |
|
|
18 |
|
#include "preprocessing/assertion_pipeline.h" |
19 |
|
#include "preprocessing/preprocessing_pass_context.h" |
20 |
|
#include "printer/printer.h" |
21 |
|
#include "smt/env.h" |
22 |
|
#include "smt/smt_statistics_registry.h" |
23 |
|
#include "smt/solver_engine_scope.h" |
24 |
|
#include "util/statistics_stats.h" |
25 |
|
|
26 |
|
namespace cvc5 { |
27 |
|
namespace preprocessing { |
28 |
|
|
29 |
165253 |
PreprocessingPassResult PreprocessingPass::apply( |
30 |
|
AssertionPipeline* assertionsToPreprocess) { |
31 |
330506 |
TimerStat::CodeTimer codeTimer(d_timer); |
32 |
165253 |
Trace("preprocessing") << "PRE " << d_name << std::endl; |
33 |
165253 |
verbose(2) << d_name << "..." << std::endl; |
34 |
165253 |
PreprocessingPassResult result = applyInternal(assertionsToPreprocess); |
35 |
165238 |
Trace("preprocessing") << "POST " << d_name << std::endl; |
36 |
330476 |
return result; |
37 |
|
} |
38 |
|
|
39 |
506267 |
PreprocessingPass::PreprocessingPass(PreprocessingPassContext* preprocContext, |
40 |
506267 |
const std::string& name) |
41 |
|
: EnvObj(preprocContext->getEnv()), |
42 |
|
d_preprocContext(preprocContext), |
43 |
|
d_name(name), |
44 |
506267 |
d_timer(statisticsRegistry().registerTimer("preprocessing::" + name)) |
45 |
|
{ |
46 |
506267 |
} |
47 |
|
|
48 |
506102 |
PreprocessingPass::~PreprocessingPass() { Assert(smt::solverEngineInScope()); } |
49 |
|
|
50 |
|
} // namespace preprocessing |
51 |
31137 |
} // namespace cvc5 |