Go to the documentation of this file.
12 #ifndef CPROVER_GOTO_INSTRUMENT_COVER_FILTER_H
13 #define CPROVER_GOTO_INSTRUMENT_COVER_FILTER_H
66 void add(std::unique_ptr<function_filter_baset> filter)
68 filters.push_back(std::move(filter));
78 for(
const auto &filter :
filters)
79 if(!(*filter)(identifier, goto_function))
89 for(
const auto &filter :
filters)
90 filter->report_anomalies();
94 std::vector<std::unique_ptr<function_filter_baset>>
filters;
103 void add(std::unique_ptr<goal_filter_baset> filter)
105 filters.push_back(std::move(filter));
112 for(
const auto &filter :
filters)
113 if(!(*filter)(source_location))
123 for(
const auto &filter :
filters)
124 filter->report_anomalies();
128 std::vector<std::unique_ptr<goal_filter_baset>>
filters;
204 #endif // CPROVER_GOTO_INSTRUMENT_COVER_FILTER_H
virtual bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const =0
Returns true if the function passes the filter criteria.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
bool operator()(const source_locationt &source_location) const
Applies the filters to the given source location.
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const override
Filter out all functions except for one particular function given in the constructor.
void report_anomalies() const
Can be called after final filter application to report on unexpected situations encountered.
std::vector< std::unique_ptr< goal_filter_baset > > filters
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const
Applies the filters to the given function.
void add(std::unique_ptr< goal_filter_baset > filter)
Adds a function filter.
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const override
Call a goto_program non-trivial if it has:
single_function_filtert(const irep_idt &function_id)
virtual ~function_filter_baset()
virtual void report_anomalies() const
Can be called after final filter application to report on unexpected situations encountered.
void report_anomalies() const
Can be called after final filter application to report on unexpected situations encountered.
Filters out goals with source locations considered internal.
virtual bool operator()(const source_locationt &) const =0
Returns true if the goal passes the filter criteria.
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const override
Filter out all functions except those defined in the file that is given in the constructor.
Base class for filtering functions.
Base class for filtering goals.
A collection of goal filters to be applied in conjunction.
Filters out CPROVER internal functions.
Filters functions that match the provided pattern.
::goto_functiont goto_functiont
Filters out trivial functions.
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const override
Filter functions whose name matches the regex.
std::vector< std::unique_ptr< function_filter_baset > > filters
virtual ~goal_filter_baset()
bool operator()(const source_locationt &) const override
Filter goals at source locations considered internal.
file_filtert(const irep_idt &file_id)
A collection of function filters to be applied in conjunction.
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const override
Filter out functions that are not considered provided by the user.
void add(std::unique_ptr< function_filter_baset > filter)
Adds a function filter.
virtual void report_anomalies() const
Can be called after final filter application to report on unexpected situations encountered.
include_pattern_filtert(const std::string &cover_include_pattern)