12 #ifndef CPROVER_GOTO_INSTRUMENT_COVER_FILTER_H
13 #define CPROVER_GOTO_INSTRUMENT_COVER_FILTER_H
68 void add(std::unique_ptr<function_filter_baset> filter)
70 filters.push_back(std::move(filter));
80 for(
const auto &filter :
filters)
81 if(!(*filter)(identifier, goto_function))
91 for(
const auto &filter :
filters)
92 filter->report_anomalies();
96 std::vector<std::unique_ptr<function_filter_baset>>
filters;
105 void add(std::unique_ptr<goal_filter_baset> filter)
107 filters.push_back(std::move(filter));
114 for(
const auto &filter :
filters)
115 if(!(*filter)(source_location))
125 for(
const auto &filter :
filters)
126 filter->report_anomalies();
130 std::vector<std::unique_ptr<goal_filter_baset>>
filters;
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
file_filtert(const irep_idt &file_id)
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.
virtual void report_anomalies() const
Can be called after final filter application to report on unexpected situations encountered.
virtual ~function_filter_baset()
virtual bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const =0
Returns true if the function passes the filter criteria.
A collection of function filters to be applied in conjunction.
void add(std::unique_ptr< function_filter_baset > filter)
Adds a function filter.
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const
Applies the filters to the given function.
void report_anomalies() const
Can be called after final filter application to report on unexpected situations encountered.
std::vector< std::unique_ptr< function_filter_baset > > filters
Base class for filtering goals.
virtual bool operator()(const source_locationt &) const =0
Returns true if the goal passes the filter criteria.
virtual void report_anomalies() const
Can be called after final filter application to report on unexpected situations encountered.
virtual ~goal_filter_baset()
A collection of goal filters to be applied in conjunction.
void add(std::unique_ptr< goal_filter_baset > filter)
Adds a function filter.
std::vector< std::unique_ptr< goal_filter_baset > > filters
void report_anomalies() const
Can be called after final filter application to report on unexpected situations encountered.
bool operator()(const source_locationt &source_location) const
Applies the filters to the given source location.
::goto_functiont goto_functiont
Filters functions that match the provided pattern.
include_pattern_filtert(const std::string &cover_include_pattern)
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const override
Filter functions whose name matches the regex.
Filters out CPROVER internal functions.
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.
Filters out goals with source locations considered internal.
bool operator()(const source_locationt &) const override
Filter goals at source locations considered internal.
single_function_filtert(const irep_idt &function_id)
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.
Filters out trivial functions.
bool operator()(const symbolt &identifier, const goto_functionst::goto_functiont &goto_function) const override
Call a goto_program non-trivial if it has:
Goto Programs with Functions.