This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Add method to the generic SMT API to dump the SMT formula
ClosedPublic

Authored by mikhail.ramalho on Jun 15 2018, 8:56 AM.

Details

Summary

New method dump the SMT formula and the Z3 implementation.

There is no test because I only used it for debugging.

However, if requested, I can add an option to the static analyzer to dump the formula (whole program? per path?), maybe something like the trimmed graph but for SMT formulas.

Diff Detail

Repository
rL LLVM

Event Timeline

george.karpenkov accepted this revision.Jun 15 2018, 9:29 AM

Can we just call it dump? Otherwise, LGTM.

This revision is now accepted and ready to land.Jun 15 2018, 9:29 AM

Rename dumpSMTFormula() to dump().

I initially had a dumpModel, that's why this method was called dumpSMTFormula, however, the dumpModel didn't check if a model actually existed before trying to print it, which led to z3 crashing when there was no model, so I removed it.

This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.