]> granicus.if.org Git - clang/commit
[analyzer] Improvements to the SMT API
authorMikhail R. Gadelha <mikhail.ramalho@gmail.com>
Tue, 2 Oct 2018 12:55:48 +0000 (12:55 +0000)
committerMikhail R. Gadelha <mikhail.ramalho@gmail.com>
Tue, 2 Oct 2018 12:55:48 +0000 (12:55 +0000)
commit06d46908046862bd04eab4de8ae344b5d31dce07
tree5a770e5a75a0ff2fd221bc67a24c14ad890277c0
parentad62da215c9cb15e530cecdd95d43e4f4e366782
[analyzer] Improvements to the SMT API

Summary:
Several improvements in preparation for the new backends.

Refactoring:

- Removed duplicated methods `fromBoolean`, `fromAPSInt`, `fromInt` and `fromAPFloat`. The methods `mkBoolean`, `mkBitvector` and `mkFloat` are now used instead.
- The names of the functions that convert BVs to FPs were swapped (`mkSBVtoFP`, `mkUBVtoFP`, `mkFPtoSBV`, `mkFPtoUBV`).
- Added a couple of comments in function calls.

Crosscheck encoding:

- Changed how constraints are encoded in the refutation manager so it doesn't start with (false OR ...). This change introduces one duplicated line (see file `BugReporterVisitors.cpp`, the `SMTConv::getRangeExpr is called twice, so I can remove this change if the duplication is a problem.

Reviewers: george.karpenkov, NoQ

Reviewed By: george.karpenkov

Subscribers: xazax.hun, szepet, a.sidorin, Szelethus

Differential Revision: https://reviews.llvm.org/D52365

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343581 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h
include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
include/clang/StaticAnalyzer/Core/PathSensitive/SMTSolver.h
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp