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

Function equal_variable_sets

src/Variable.cpp:153–165  ·  view source on GitHub ↗

return true if two sets contains same variables

Source from the content-addressed store, hash-verified

151
152// return true if two sets contains same variables
153bool equal_variable_sets(const vector<const Variable*>& set1, const vector<const Variable*>& set2)
154{
155 size_t i;
156 if (set1.size() == set2.size()) {
157 for (i=0; i<set1.size(); i++) {
158 if (!is_variable_in_set(set2, set1[i])) {
159 return false;
160 }
161 }
162 return true;
163 }
164 return false;
165}
166
167// return true if set1 is subset of set2, or equal
168bool sub_variable_sets(const vector<const Variable*>& set1, const vector<const Variable*>& set2)

Callers 1

equalMethod · 0.85

Calls 2

is_variable_in_setFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected