0

I would like to see what patterns Z3 is using for some quantifiers in my formulas.

This comment suggests that it may be possible, but I couldn't find any more details.

How do I get Z3 to print this information?

James Wilcox
  • 5,307
  • 16
  • 25
  • 2
    Currently you can only print this information via debug traces in debug mode, there is no convenient way to display that information in a readable way. It's still on the todo-list and I've started adding some things toward this in a separate branch, but it will still take time to make that convenient to use. – Christoph Wintersteiger Aug 24 '17 at 16:45
  • @ChristophWintersteiger Can you tell me how to do it in debug mode (even if it's unreadable)? – James Wilcox Aug 24 '17 at 16:56
  • I found a way to do it using a debug build of Z3. I remain hopeful that this will be possible in normal builds someday. – James Wilcox Aug 24 '17 at 17:50

1 Answers1

1

Based on a helpful comment from Christoph, I found that building Z3 in debug mode (pass -d to mk_make.py during the build process) and then passing -v:10 on the command line to the resulting Z3 prints inferred patterns.

James Wilcox
  • 5,307
  • 16
  • 25
  • 1
    The printout of the inferred patterns was a recent addition and only for debugging. The way to enable that and the format of the output a very likely to change very soon, so don't depend on it. (Also, it prints only the inferred patterns, and possibly not all of them.) – Christoph Wintersteiger Aug 25 '17 at 10:59
  • Thanks for the warning. I plan to use this only for debugging, so these limitations aren't a huge deal. – James Wilcox Aug 25 '17 at 16:09