1#ifndef CPROVER_GOTO_SYMEX_SLICE_H
2#define CPROVER_GOTO_SYMEX_SLICE_H
9#include <boost/range/adaptor/reversed.hpp>
59 log_error(
"All the claims start from 1 (use --show-claims)");
103 !options.get_bool_option(
"generate-testcase") &&
104 !options.get_bool_option(
"generate-ctest-testcase"))
130 for (
auto &step : boost::adaptors::reverse(eq))
138 "Slicing time: {}s (removed {} assignments)",
162 std::unordered_map<std::string, std::unordered_set<size_t>>
index_reads;
bool claim_after_invariant_havoc
Whether a –loop-invariant-check havoc step precedes the kept claim on this trace, so the claim is che...
Definition slice.h:82
std::string claim_cstr
Definition slice.h:67
std::string claim_msg
Definition slice.h:65
size_t claim_to_keep
Definition slice.h:64
const goto_programt::instructiont * claim_instruction
The instruction the kept claim was raised at.
Definition slice.h:72
property_locationt claim_ploc
Definition slice.h:73
locationt claim_location
Definition slice.h:78
bool is_goto_cov
Definition slice.h:84
bool run(symex_target_equationt::SSA_stepst &) override
Executes the algorithm over a T object.
Definition slice.cpp:379
std::string claim_loc
Definition slice.h:66
std::string claim_comment
The kept claim's description and source position, for the property report.
Definition slice.h:77
bool show_slice_info
Definition slice.h:83
namespacet ns
Definition slice.h:85
claim_slicer(const size_t claim_to_keep, bool show_slice_info, bool is_goto_cov, namespacet &ns)
Definition slice.h:47
std::string claim_key
The kept claim's key in the verdict table and skip set, and its row.
Definition slice.h:70
std::string claim_property
Definition slice.h:74
Container for an instruction of the goto-program.
Definition goto_program.h:95
Definition namespace.h:10
bool run(symex_target_equationt::SSA_stepst &) override
Naive slicer: slice every step after the last assertion.
Definition slice.cpp:347
slicer()
Definition slice.h:16
BigInt sliced
tracks how many steps were sliced
Definition slice.h:26
BigInt ignored() const override
How many steps were ignored after this algorithm.
Definition slice.h:19
ssa_step_algorithm(bool sideffect)
Definition ssa_step_algorithm.h:12
void run_on_step(symex_target_equationt::SSA_stept &)
Definition ssa_step_algorithm.cpp:4
bool run(symex_target_equationt::SSA_stepst &eq) override
Iterate over all steps of the \eq in REVERSE order, getting symbol dependencies.
Definition slice.h:116
void scan_array_uses(const expr2tc &expr)
Record the array-element reads in \expr into index_reads, and disqualify (array_disqualified) any arr...
Definition slice.cpp:82
std::unordered_set< std::string > depends
Holds the symbols the current equation depends on.
Definition slice.h:147
void run_on_assert(symex_target_equationt::SSA_stept &SSA_step) override
Asserts are never sliced: collect the step's guard/cond symbols into depends and record their array r...
Definition slice.cpp:170
std::unordered_set< std::string > array_disqualified
Array versions whose element reads cannot be reasoned about per-index (whole-array use,...
Definition slice.h:167
bool depends_on_tracked(const expr2tc &expr)
Read-only: does \expr reference a tracked dependency (a symbol in depends or a no_slice symbol)?
Definition slice.cpp:149
void run_on_renumber(symex_target_equationt::SSA_stept &SSA_step) override
Remove unneeded renumbers from the formula.
Definition slice.cpp:324
static expr2tc get_nondet_symbol(const expr2tc &expr)
Definition slice.cpp:443
std::unordered_set< const expr2t * > collected_cache
BLACK set (two-color DFS in collect_dependencies): nodes already fully collected into depends.
Definition slice.h:153
void run_on_assignment(symex_target_equationt::SSA_stept &SSA_step) override
Remove unneeded assignments from the formula.
Definition slice.cpp:212
symex_slicet(const optionst &options)
Definition slice.h:100
void collect_dependencies(const expr2tc &expr)
Collect every symbol of \expr into depends (mutating "reverse-taint" accumulation).
Definition slice.cpp:10
std::unordered_set< const expr2t * > scanned_cache
BLACK set for the scan_array_uses two-color DFS — independent of collected_cache.
Definition slice.h:173
void run_on_assume(symex_target_equationt::SSA_stept &SSA_step) override
Remove unneeded assumes from the formula.
Definition slice.cpp:178
std::unordered_map< std::string, std::unordered_set< size_t > > index_reads
Per-array-version read map: versioned array-symbol name -> set of constant indices that are actually ...
Definition slice.h:162
const bool slice_nondet
Whether we should slice nondet symbols.
Definition slice.h:181
const bool slice_assumes
whether assumes should be sliced
Definition slice.h:179
Definition symex_target_equation.h:107
std::list< SSA_stept > SSA_stepst
Definition symex_target_equation.h:273
irep_container< expr2t > expr2tc
Definition irep2.h:431
#define log_status(fmt,...)
Definition message.h:101
#define log_error(fmt,...)
Definition message.h:83
#define true
Definition stdbool.h:11
void abort(void)
Definition stdlib.c:77
Where a property lives, kept apart from the table key so the report can sort by source position and p...
Definition property_verdict.h:35
fine_timet current_time()
Definition time_stopping.cpp:33
std::string time2string(const fine_timet &fine_time)
Definition time_stopping.cpp:49
unsigned long long fine_timet
Definition time_stopping.h:4