@@ -89,7 +89,7 @@ void CHC::analyze(SourceUnit const& _source)
89
89
" If you wish to use Eldarica, please enable Eldarica only."
90
90
);
91
91
92
- if (!shouldAnalyze (_source))
92
+ if (!shouldAnalyzeVerificationTargetsFor (_source))
93
93
return ;
94
94
95
95
resetSourceAnalysis ();
@@ -131,7 +131,7 @@ std::vector<std::string> CHC::unhandledQueries() const
131
131
132
132
bool CHC::visit (ContractDefinition const & _contract)
133
133
{
134
- if (!shouldAnalyze (_contract))
134
+ if (!shouldEncode (_contract))
135
135
return false ;
136
136
137
137
// Raises UnimplementedFeatureError in the presence of transient storage variables
@@ -152,7 +152,7 @@ bool CHC::visit(ContractDefinition const& _contract)
152
152
153
153
void CHC::endVisit (ContractDefinition const & _contract)
154
154
{
155
- if (!shouldAnalyze (_contract))
155
+ if (!shouldEncode (_contract))
156
156
return ;
157
157
158
158
for (auto base: _contract.annotation ().linearizedBaseContracts )
@@ -239,15 +239,14 @@ void CHC::endVisit(ContractDefinition const& _contract)
239
239
setCurrentBlock (*m_constructorSummaries.at (&_contract));
240
240
241
241
solAssert (&_contract == m_currentContract, " " );
242
- if (shouldAnalyze (_contract))
243
- {
244
- auto constructor = _contract.constructor ();
245
- auto txConstraints = state ().txTypeConstraints ();
246
- if (!constructor || !constructor->isPayable ())
247
- txConstraints = txConstraints && state ().txNonPayableConstraint ();
242
+ smtAssert (shouldEncode (_contract));
243
+ auto constructor = _contract.constructor ();
244
+ auto txConstraints = state ().txTypeConstraints ();
245
+ if (!constructor || !constructor->isPayable ())
246
+ txConstraints = txConstraints && state ().txNonPayableConstraint ();
247
+ connectBlocks (m_currentBlock, interface (), txConstraints && errorFlag ().currentValue () == 0 );
248
+ if (shouldAnalyzeVerificationTargetsFor (_contract))
248
249
m_queryPlaceholders[&_contract].push_back ({txConstraints, errorFlag ().currentValue (), m_currentBlock});
249
- connectBlocks (m_currentBlock, interface (), txConstraints && errorFlag ().currentValue () == 0 );
250
- }
251
250
252
251
solAssert (m_scopes.back () == &_contract, " " );
253
252
m_scopes.pop_back ();
@@ -338,7 +337,7 @@ void CHC::endVisit(FunctionDefinition const& _function)
338
337
!_function.isConstructor () &&
339
338
_function.isPublic () &&
340
339
contractFunctions (*m_currentContract).count (&_function) &&
341
- shouldAnalyze (*m_currentContract)
340
+ shouldEncode (*m_currentContract)
342
341
)
343
342
{
344
343
defineExternalFunctionInterface (_function, *m_currentContract);
@@ -349,8 +348,9 @@ void CHC::endVisit(FunctionDefinition const& _function)
349
348
auto ifacePre = smt::interfacePre (*m_interfaces.at (m_currentContract), *m_currentContract, m_context);
350
349
auto sum = externalSummary (_function);
351
350
352
- m_queryPlaceholders[&_function].push_back ({sum, errorFlag ().currentValue (), ifacePre});
353
351
connectBlocks (ifacePre, interface (), sum && errorFlag ().currentValue () == 0 );
352
+ if (shouldAnalyzeVerificationTargetsFor (*m_currentContract))
353
+ m_queryPlaceholders[&_function].push_back ({sum, errorFlag ().currentValue (), ifacePre});
354
354
}
355
355
356
356
m_currentFunction = nullptr ;
0 commit comments