a16z / halmos

A symbolic testing tool for EVM smart contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add coverage report

karmacoma-eth opened this issue · comments

Halmos systematically explores as many paths as possible, we should add some option to produce coverage reports.

Some unordered thoughts:

  • we operate at the bytecode level, should we print a report about bytecode-level coverage or try to report something about source level information? (lines, functions, branches, etc)
  • what about bytecode metadata, constructor arguments and other non-executable stuff?
  • how hard would it be to produce an lcov report for integration in CI? for instance the farcaster repo has a great coverage CI integration 👌
  • at a minimum, a summary like this would be neat:
 Summary coverage rate:
  lines......: 98.8% (238 of 241 lines)
  functions..: 98.5% (64 of 65 functions)
  branches...: 98.5% (128 of 130 branches)

Related:
http://ccadar.blogspot.com/2020/07/measuring-coverage-achieved-by-symbolic.html
https://blog.regehr.org/archives/386