Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes Silicon recognize and log Z3's quantifier instantiation reports instead of crashing.
When
smt.qi.profile
istrue
, Z3 periodically reports to stdout a summary of the instantiations of each quantifier. The report is printed at least eachsmt.qi.profile_freq=<n>
instantiations and its format is described here. It's not as precise and detailed as the axiom profiler, but it's much quicker to obtain and easier to interpret.How to report quantifier instantiations
Run Silicon with
./silicon.sh --numberOfParallelVerifiers 1 --z3Args '"smt.qi.profile=true smt.qi.profile_freq=10000"' prog.vpr
. The output will look like the following:From the reported quantifier instantiations we can see that the quantifier at line 736 has been instantiated 5906 times, reaching the maximum instantiation depth 9 and cost 10. So, it's a pretty good suspect when looking for matching loops.
Indeed, the quantifier on line 736 had a clear matching loop. After fixing it:
Additionally, running Silicon multiple times with
--z3RandomizeSeeds
gives an idea of how stable the quantifier instantiations are.