MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / inc

Method inc

ir/state.cpp:115–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void State::ValueAnalysis::FnCallRanges::inc(const string &name,
116 const SMTMemoryAccess &access) {
117 bool canwrite = !access.canWriteSomething().isFalse();
118
119 auto [I, inserted] = try_emplace(name);
120 if (inserted) {
121 I->second.first.emplace(1, canwrite);
122 I->second.second = access;
123 } else {
124 set<pair<unsigned, bool>> new_set;
125 for (auto [n, writes0] : I->second.first) {
126 new_set.emplace(n+1, writes0 | canwrite);
127 }
128 I->second.first = std::move(new_set);
129 I->second.second |= access;
130 }
131}
132
133bool
134State::ValueAnalysis::FnCallRanges::overlaps(const string &callee,

Callers 1

addFnCallMethod · 0.80

Calls 2

isFalseMethod · 0.80
canWriteSomethingMethod · 0.45

Tested by

no test coverage detected