MCPcopy Create free account
hub / github.com/csmith-project/csmith / output_write_var_values

Method output_write_var_values

src/ReducerOutputMgr.cpp:879–905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

877}
878
879void
880ReducerOutputMgr::output_write_var_values(string title, const Statement* stm, std::ostream &out, FactMgr* fm, int indent, bool cover_block_writes)
881{
882 output_print_str(out, title, "", indent);
883 outputln(out);
884 size_t i;
885 const Statement* s = stm;
886 if (cover_block_writes) {
887 s = stm->parent;
888 assert(s);
889 }
890 const vector<const Variable *>& write_vars = fm->map_stm_effect[s].get_write_vars();
891 for (i=0; i<write_vars.size(); i++) {
892 const Variable* wvar = write_vars[i];
893 if (wvar->is_visible(stm->parent) && reducer->is_var_used(wvar)) {
894 // output printf statements to record the type of the variable
895 ostringstream oss;
896 //wvar->OutputDecl(oss);
897 string dimen = StringUtils::int2str(wvar->get_dimension());
898 oss << "<" << wvar->get_actual_name() << "(" << dimen << ")" << " = ";
899 wvar->output_runtime_value(out, oss.str(), ">\\n", indent);
900 outputln(out);
901 }
902 }
903 output_print_str(out, "end of values\\n", "", indent);
904 outputln(out);
905}
906
907void
908ReducerOutputMgr::output_memory_addrs(const Statement* stm, std::ostream& out, int indent)

Callers

nothing calls this directly

Calls 8

output_print_strFunction · 0.85
outputlnFunction · 0.85
sizeMethod · 0.80
is_visibleMethod · 0.80
is_var_usedMethod · 0.80
get_actual_nameMethod · 0.80
output_runtime_valueMethod · 0.80
get_dimensionMethod · 0.45

Tested by

no test coverage detected