Ilya Zakharevich on Wed, 10 Jul 2024 00:44:01 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Feature-deliberations: coverage


[ Background: I’m working on (very trivial and standard) routines in
  low-dim linear programming.  They are very simple, but take A LOT of
  branching.  Absolutely unclear how to debug… ]

Suppose we have a new default “storecoverage”.  The code compiled with
this default enabled reserves storage for collecting the info on which
branches of if()s, &&'s, ||'s (and possibly while()/until()'s) were
not yet taken.

  This seems to be very low-cost and easy/(trivial?) to implement.

Then I may imagine
     reportcoverage(foo)
to list non-fully covered branches (each in the same format as if an
error happened at this place.  And then maybe also
     used_named_subroutines(foo)
to be able to do this recursively (maybe anonymous too?).

This seems to be handable — but maybe there are easier ways to do the
same/similar things?!

Thanks,
Ilya