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

Method config_expr_reduction

src/Reducer.cpp:1080–1097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1078}
1079
1080void
1081Reducer::config_expr_reduction(string cmd)
1082{
1083 if (cmd.find(":") == string::npos) {
1084 // the reducer treats func_1 as main
1085 if (cmd == "main") cmd = "func_1";
1086 const Function* f = find_function_by_name(cmd);
1087 assert(f);
1088 rewrite_calls_inside = f;
1089 }
1090 else {
1091 vector<string> strs;
1092 StringUtils::split_string(cmd, strs, ":");
1093 assert(strs.size() == 2 || strs.size() == 3);
1094 string assigns = strs.size()==3 ? strs[2] : "";
1095 reduce_call_with_assigns(strs[0], strs[1], assigns);
1096 }
1097}
1098
1099void
1100Reducer::config_binary_reduction(string cmd)

Callers

nothing calls this directly

Calls 2

find_function_by_nameFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected