Skip to content

Commit c193331

Browse files
Update properties from goto model
With symex-driven-lazy-loading we know the full set of properties only after goto-symex has finished.
1 parent 39d25d7 commit c193331

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/goto-checker/properties.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,17 @@ property_infot::property_infot(
6363
{
6464
}
6565

66-
/// Return the properties in the goto model and initialize them to NOT_CHECKED
6766
propertiest initialize_properties(const abstract_goto_modelt &goto_model)
6867
{
6968
propertiest properties;
69+
update_properties_from_goto_model(properties, goto_model);
70+
return properties;
71+
}
72+
73+
void update_properties_from_goto_model(
74+
propertiest &properties,
75+
const abstract_goto_modelt &goto_model)
76+
{
7077
const auto &goto_functions = goto_model.get_goto_functions();
7178
for(const auto &function_pair : goto_functions.function_map)
7279
{
@@ -86,7 +93,6 @@ propertiest initialize_properties(const abstract_goto_modelt &goto_model)
8693
property_infot{i_it, description, property_statust::NOT_CHECKED});
8794
}
8895
}
89-
return properties;
9096
}
9197

9298
std::string

src/goto-checker/properties.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ typedef std::unordered_map<irep_idt, property_infot> propertiest;
7777
/// Returns the properties in the goto model
7878
propertiest initialize_properties(const abstract_goto_modelt &);
7979

80+
/// Updates \p properties with the assertions in \p goto_model
81+
void update_properties_from_goto_model(
82+
propertiest &properties,
83+
const abstract_goto_modelt &goto_model);
84+
8085
std::string
8186
as_string(const irep_idt &property_id, const property_infot &property_info);
8287

0 commit comments

Comments
 (0)