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

Function constructor

libsolidity/formal/PredicateInstance.cpp:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61smtutil::Expression constructor(Predicate const& _pred, EncodingContext& _context)
62{
63 auto const& contract = dynamic_cast<ContractDefinition const&>(*_pred.programNode());
64 if (auto const* constructor = contract.constructor())
65 return _pred(currentFunctionVariablesForDefinition(*constructor, &contract, _context));
66
67 auto& state = _context.state();
68 std::vector<smtutil::Expression> stateExprs = getStateExpressionsForConstructor(state);
69 return _pred(stateExprs + initialStateVariables(contract, _context) + currentStateVariables(contract, _context));
70}
71
72smtutil::Expression constructorCall(Predicate const& _pred, EncodingContext& _context, bool _internal)
73{

Callers 7

predicateMethod · 0.85
functionMethod · 0.85
generateMethod · 0.85
generateConstructorsMethod · 0.85
TypeSystemClass · 0.85
functionMethod · 0.85

Calls 7

initialStateVariablesFunction · 0.85
currentStateVariablesFunction · 0.85
programNodeMethod · 0.80
constructorMethod · 0.45
stateMethod · 0.45

Tested by

no test coverage detected