Feature-deliberations: coverage

Ilya Zakharevich <[email protected]> Tue, 9 Jul 2024 15:43:56 -0700
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
[ 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