mkVSU calls mkComponent which has a repeat apply Forall_cons. For whatever reason, when Coq applies Forall_cons it fully unfolds the filter_options fixpoint without reducing the inner match expression. Because there are two recursive call sites, this causes an exponential blow up in the the size of the (internal) goal.
To avoid that exponential blow up, I've refactored the filter_options implementation to have only one recursive call site.
I've tested this with a C program with 16 trivial functions f1 to f16 of the form
mkVSU
callsmkComponent
which has arepeat apply Forall_cons
. For whatever reason, when Coq appliesForall_cons
it fully unfolds thefilter_options
fixpoint without reducing the innermatch
expression. Because there are two recursive call sites, this causes an exponential blow up in the the size of the (internal) goal.To avoid that exponential blow up, I've refactored the
filter_options
implementation to have only one recursive call site.I've tested this with a C program with 16 trivial functions
f1
tof16
of the formalong with the following verification file
Prior to this change the timings on my machine were:
After applying this change my timings are