This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Implemented SMT generic API
ClosedPublic

Authored by mikhail.ramalho on Jul 18 2018, 9:34 AM.

Details

Summary

Created new SMT generic API.

Small changes to Z3ConstraintManager because of the new generic objects (SMTSort and SMTExpr) returned by SMTSolver.

Diff Detail

Repository
rL LLVM

Event Timeline

mikhail.ramalho edited the summary of this revision. (Show Details)
mikhail.ramalho added a reviewer: NoQ.

Removed the changes to SMTConstraintManager for now.

Update API to handle shared pointer to SMTExprs/SMTSorts objects instead of the actual objects.

mikhail.ramalho retitled this revision from [analyzer] [WIP] Implemented SMT generic API to [analyzer] Implemented SMT generic API.Jul 20 2018, 9:23 AM

LGTM provided the semantics of the method in question is explained in comments here.

lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp
802 ↗(On Diff #156498)

I'm quite confused about this method, is it only used in pure-z3-solving-mode?

This revision is now accepted and ready to land.Jul 20 2018, 10:30 AM

Moved conversion methods to SMTSolver.

Create new method:

virtual SMTExprRef newExprRef(const SMTExpr &E) const = 0;

that creates and returns a shared pointer containing the SMTExpr object. It'll be useful in the future.

This revision was automatically updated to reflect the committed changes.