ilang  1.0.0
ILAng: A Modeling and Verification Platform for SoCs
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
ilang::Sort Class Referenceabstract

The class for sort (type for expr, and the range/domain of functions). More...

#include <sort.h>

Inheritance diagram for ilang::Sort:
ilang::Ast ilang::Object ilang::SortBool ilang::SortBv ilang::SortMem

Public Types

typedef std::shared_ptr< SortSortPtr
 Pointer type for storing/passing Sort.
 
- Public Types inherited from ilang::Ast
typedef std::shared_ptr< InstrLvlAbsInstrLvlAbsPtr
 Type for forward declaration of ILA.
 
- Public Types inherited from ilang::Object
typedef std::shared_ptr< ObjectObjPtr
 Pointer type for normal use of Object.
 

Public Member Functions

 Sort ()
 Default constructor.
 
virtual ~Sort ()
 Virtual default destructor.
 
virtual bool is_bool () const
 Return true if have Boolean sort.
 
virtual bool is_bv (const int &width=0) const
 Return true if have bit-vector sort.
 
virtual bool is_mem () const
 Return true if have memory (array) sort.
 
virtual int bit_width () const
 Return the bit-width of bit-vector sort.
 
virtual int addr_width () const
 Return the bit-width of the address (index).
 
virtual int data_width () const
 Return the bit-width of the data (value).
 
virtual z3::sort GetZ3Sort (z3::context &ctx) const =0
 Return z3::sort of the Sort.
 
virtual z3::expr GetZ3Expr (z3::context &ctx, const std::string &name) const =0
 Return a z3 variable of the Sort.
 
virtual bool Equal (const SortPtr rhs) const =0
 Compare two Sorts.
 
virtual std::ostream & Print (std::ostream &out) const =0
 Print out to output stream.
 
- Public Member Functions inherited from ilang::Ast
 Ast ()
 Default constructor.
 
 Ast (const std::string &name)
 Constructor with name.
 
virtual ~Ast ()
 Default destructor.
 
bool is_ast () const
 Is type Ast.
 
virtual bool is_expr () const
 Is type Ast::Expr.
 
virtual bool is_func () const
 Is type Ast::Func.
 
InstrLvlAbsPtr host () const
 Return the hosting ILA.
 
void set_host (InstrLvlAbsPtr host)
 Set the hosting ILA.
 
- Public Member Functions inherited from ilang::Object
 Object ()
 Default constructor.
 
 Object (const std::string &name)
 Constructor with string name.
 
virtual ~Object ()
 Default destructor.
 
const Symbolname () const
 Get the symbol (name).
 
virtual bool is_instr_lvl_abs () const
 Is type InstrLvlAbs.
 
virtual bool is_instr () const
 Is type Instr.
 

Static Public Member Functions

static SortPtr MakeBoolSort ()
 Create a Boolean Sort.
 
static SortPtr MakeBvSort (const int &bit_width)
 Create a bit-vector Sort.
 
static SortPtr MakeMemSort (const int &addr_width, const int &data_width)
 Create a memory (array) Sort.
 

Friends

bool operator== (const SortPtr lhs, const SortPtr rhs)
 Overlaod comparison.
 
std::ostream & operator<< (std::ostream &out, const SortPtr s)
 Overload output stream operator.
 

Detailed Description

The class for sort (type for expr, and the range/domain of functions).


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