clang  7.0.0
Public Member Functions | Protected Member Functions | Friends | List of all members
clang::ento::SMTSort Class Referenceabstract

Generic base class for SMT sorts. More...

#include "clang/StaticAnalyzer/Core/PathSensitive/SMTSort.h"

Public Member Functions

 SMTSort ()=default
 
virtual ~SMTSort ()=default
 
virtual bool isBitvectorSort () const
 Returns true if the sort is a bitvector, calls isBitvectorSortImpl(). More...
 
virtual bool isFloatSort () const
 Returns true if the sort is a floating-point, calls isFloatSortImpl(). More...
 
virtual bool isBooleanSort () const
 Returns true if the sort is a boolean, calls isBooleanSortImpl(). More...
 
virtual unsigned getBitvectorSortSize () const
 Returns the bitvector size, fails if the sort is not a bitvector Calls getBitvectorSortSizeImpl(). More...
 
virtual unsigned getFloatSortSize () const
 Returns the floating-point size, fails if the sort is not a floating-point Calls getFloatSortSizeImpl(). More...
 
virtual void print (raw_ostream &OS) const =0
 
LLVM_DUMP_METHOD void dump () const
 

Protected Member Functions

virtual bool equal_to (SMTSort const &other) const =0
 Query the SMT solver and returns true if two sorts are equal (same kind and bit width). More...
 
virtual bool isBitvectorSortImpl () const =0
 Query the SMT solver and checks if a sort is bitvector. More...
 
virtual bool isFloatSortImpl () const =0
 Query the SMT solver and checks if a sort is floating-point. More...
 
virtual bool isBooleanSortImpl () const =0
 Query the SMT solver and checks if a sort is boolean. More...
 
virtual unsigned getBitvectorSortSizeImpl () const =0
 Query the SMT solver and returns the sort bit width. More...
 
virtual unsigned getFloatSortSizeImpl () const =0
 Query the SMT solver and returns the sort bit width. More...
 

Friends

bool operator== (SMTSort const &LHS, SMTSort const &RHS)
 

Detailed Description

Generic base class for SMT sorts.

Definition at line 24 of file SMTSort.h.

Constructor & Destructor Documentation

◆ SMTSort()

clang::ento::SMTSort::SMTSort ( )
default

◆ ~SMTSort()

virtual clang::ento::SMTSort::~SMTSort ( )
virtualdefault

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void clang::ento::SMTSort::dump ( ) const
inline

◆ equal_to()

virtual bool clang::ento::SMTSort::equal_to ( SMTSort const &  other) const
protectedpure virtual

Query the SMT solver and returns true if two sorts are equal (same kind and bit width).

This does not check if the two sorts are the same objects.

Referenced by dump().

◆ getBitvectorSortSize()

virtual unsigned clang::ento::SMTSort::getBitvectorSortSize ( ) const
inlinevirtual

Returns the bitvector size, fails if the sort is not a bitvector Calls getBitvectorSortSizeImpl().

Definition at line 40 of file SMTSort.h.

References getBitvectorSortSizeImpl(), and isBitvectorSort().

◆ getBitvectorSortSizeImpl()

virtual unsigned clang::ento::SMTSort::getBitvectorSortSizeImpl ( ) const
protectedpure virtual

Query the SMT solver and returns the sort bit width.

Referenced by dump(), and getBitvectorSortSize().

◆ getFloatSortSize()

virtual unsigned clang::ento::SMTSort::getFloatSortSize ( ) const
inlinevirtual

Returns the floating-point size, fails if the sort is not a floating-point Calls getFloatSortSizeImpl().

Definition at line 49 of file SMTSort.h.

References getFloatSortSizeImpl(), and isFloatSort().

◆ getFloatSortSizeImpl()

virtual unsigned clang::ento::SMTSort::getFloatSortSizeImpl ( ) const
protectedpure virtual

Query the SMT solver and returns the sort bit width.

Referenced by dump(), and getFloatSortSize().

◆ isBitvectorSort()

virtual bool clang::ento::SMTSort::isBitvectorSort ( ) const
inlinevirtual

Returns true if the sort is a bitvector, calls isBitvectorSortImpl().

Definition at line 30 of file SMTSort.h.

References isBitvectorSortImpl().

Referenced by getBitvectorSortSize().

◆ isBitvectorSortImpl()

virtual bool clang::ento::SMTSort::isBitvectorSortImpl ( ) const
protectedpure virtual

Query the SMT solver and checks if a sort is bitvector.

Referenced by dump(), and isBitvectorSort().

◆ isBooleanSort()

virtual bool clang::ento::SMTSort::isBooleanSort ( ) const
inlinevirtual

Returns true if the sort is a boolean, calls isBooleanSortImpl().

Definition at line 36 of file SMTSort.h.

References isBooleanSortImpl().

◆ isBooleanSortImpl()

virtual bool clang::ento::SMTSort::isBooleanSortImpl ( ) const
protectedpure virtual

Query the SMT solver and checks if a sort is boolean.

Referenced by dump(), and isBooleanSort().

◆ isFloatSort()

virtual bool clang::ento::SMTSort::isFloatSort ( ) const
inlinevirtual

Returns true if the sort is a floating-point, calls isFloatSortImpl().

Definition at line 33 of file SMTSort.h.

References isFloatSortImpl().

Referenced by getFloatSortSize().

◆ isFloatSortImpl()

virtual bool clang::ento::SMTSort::isFloatSortImpl ( ) const
protectedpure virtual

Query the SMT solver and checks if a sort is floating-point.

Referenced by dump(), and isFloatSort().

◆ print()

virtual void clang::ento::SMTSort::print ( raw_ostream &  OS) const
pure virtual

Referenced by dump().

Friends And Related Function Documentation

◆ operator==

bool operator== ( SMTSort const &  LHS,
SMTSort const &  RHS 
)
friend

Definition at line 56 of file SMTSort.h.


The documentation for this class was generated from the following file: