1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
use crate::{
borrow_analysis::BorrowAnalysisProcessor,
clean_and_optimize::CleanAndOptimizeProcessor,
data_invariant_instrumentation::DataInvariantInstrumentationProcessor,
debug_instrumentation::DebugInstrumenter,
eliminate_imm_refs::EliminateImmRefsProcessor,
function_target_pipeline::{FunctionTargetPipeline, FunctionTargetProcessor},
global_invariant_analysis::GlobalInvariantAnalysisProcessor,
global_invariant_instrumentation::GlobalInvariantInstrumentationProcessor,
inconsistency_check::InconsistencyCheckInstrumenter,
livevar_analysis::LiveVarAnalysisProcessor,
loop_analysis::LoopAnalysisProcessor,
memory_instrumentation::MemoryInstrumentationProcessor,
mono_analysis::MonoAnalysisProcessor,
mut_ref_instrumentation::MutRefInstrumenter,
mutation_tester::MutationTester,
options::ProverOptions,
reaching_def_analysis::ReachingDefProcessor,
spec_instrumentation::SpecInstrumentationProcessor,
usage_analysis::UsageProcessor,
verification_analysis::VerificationAnalysisProcessor,
};
pub fn default_pipeline_with_options(options: &ProverOptions) -> FunctionTargetPipeline {
let mut processors: Vec<Box<dyn FunctionTargetProcessor>> = vec![
DebugInstrumenter::new(),
EliminateImmRefsProcessor::new(),
MutRefInstrumenter::new(),
ReachingDefProcessor::new(),
LiveVarAnalysisProcessor::new(),
BorrowAnalysisProcessor::new(),
MemoryInstrumentationProcessor::new(),
CleanAndOptimizeProcessor::new(),
UsageProcessor::new(),
VerificationAnalysisProcessor::new(),
LoopAnalysisProcessor::new(),
SpecInstrumentationProcessor::new(),
DataInvariantInstrumentationProcessor::new(),
GlobalInvariantAnalysisProcessor::new(),
GlobalInvariantInstrumentationProcessor::new(),
];
if options.mutation {
processors.push(MutationTester::new());
}
if !options.boogie_poly {
processors.push(MonoAnalysisProcessor::new());
}
if options.check_inconsistency {
processors.push(InconsistencyCheckInstrumenter::new());
}
let mut res = FunctionTargetPipeline::default();
for p in processors {
res.add_processor(p);
}
res
}
pub fn default_pipeline() -> FunctionTargetPipeline {
default_pipeline_with_options(&ProverOptions::default())
}
pub fn experimental_pipeline() -> FunctionTargetPipeline {
let processors: Vec<Box<dyn FunctionTargetProcessor>> = vec![
DebugInstrumenter::new(),
EliminateImmRefsProcessor::new(),
MutRefInstrumenter::new(),
ReachingDefProcessor::new(),
LiveVarAnalysisProcessor::new(),
BorrowAnalysisProcessor::new(),
MemoryInstrumentationProcessor::new(),
CleanAndOptimizeProcessor::new(),
UsageProcessor::new(),
VerificationAnalysisProcessor::new(),
LoopAnalysisProcessor::new(),
SpecInstrumentationProcessor::new(),
DataInvariantInstrumentationProcessor::new(),
GlobalInvariantAnalysisProcessor::new(),
GlobalInvariantInstrumentationProcessor::new(),
MonoAnalysisProcessor::new(),
];
let mut res = FunctionTargetPipeline::default();
for p in processors {
res.add_processor(p);
}
res
}