MCPcopy Create free account
hub / github.com/argotorg/solidity / mergeVariables

Method mergeVariables

libsolidity/formal/SMTEncoder.cpp:2517–2532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2515}
2516
2517void SMTEncoder::mergeVariables(smtutil::Expression const& _condition, VariableIndices const& _indicesEndTrue, VariableIndices const& _indicesEndFalse)
2518{
2519 for (auto const& entry: _indicesEndTrue)
2520 {
2521 VariableDeclaration const* var = entry.first;
2522 auto trueIndex = entry.second;
2523 if (_indicesEndFalse.count(var) && _indicesEndFalse.at(var) != trueIndex)
2524 {
2525 m_context.addAssertion(m_context.newValue(*var) == smtutil::Expression::ite(
2526 _condition,
2527 valueAtIndex(*var, trueIndex),
2528 valueAtIndex(*var, _indicesEndFalse.at(var)))
2529 );
2530 }
2531 }
2532}
2533
2534smtutil::Expression SMTEncoder::currentValue(VariableDeclaration const& _decl) const
2535{

Callers

nothing calls this directly

Calls 4

atMethod · 0.80
newValueMethod · 0.80
countMethod · 0.45
addAssertionMethod · 0.45

Tested by

no test coverage detected