mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Support Why3 in StandardCompiler
This commit is contained in:
parent
b513db74a0
commit
aa0776d5e8
@ -337,6 +337,30 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
|
|||||||
}
|
}
|
||||||
output["contracts"] = contractsOutput;
|
output["contracts"] = contractsOutput;
|
||||||
|
|
||||||
|
{
|
||||||
|
ErrorList formalErrors;
|
||||||
|
if (m_compilerStack.prepareFormalAnalysis(&formalErrors))
|
||||||
|
output["why3"] = m_compilerStack.formalTranslation();
|
||||||
|
|
||||||
|
for (auto const& error: formalErrors)
|
||||||
|
{
|
||||||
|
auto err = dynamic_pointer_cast<Error const>(error);
|
||||||
|
|
||||||
|
errors.append(formatErrorWithException(
|
||||||
|
*error,
|
||||||
|
err->type() == Error::Type::Warning,
|
||||||
|
err->typeName(),
|
||||||
|
"general",
|
||||||
|
"",
|
||||||
|
scannerFromSourceName
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME!!
|
||||||
|
if (!formalErrors.empty())
|
||||||
|
output["errors"] = errors;
|
||||||
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user