Z3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Properties
Symbol Class Reference

Symbols are used to name several term and type constructors. More...

+ Inheritance diagram for Symbol:

Public Member Functions

bool IsIntSymbol ()
 Indicates whether the symbol is of Int kind More...
 
bool IsStringSymbol ()
 Indicates whether the symbol is of string kind. More...
 
override string ToString ()
 A string representation of the symbol. More...
 
- Public Member Functions inherited from Z3Object
void Dispose ()
 Disposes of the underlying native Z3 object. More...
 

Protected Member Functions

 Symbol (Context ctx, IntPtr obj)
 Symbol constructor More...
 

Properties

Z3_symbol_kind Kind [get]
 The kind of the symbol (int or string) More...
 

Detailed Description

Symbols are used to name several term and type constructors.

Definition at line 30 of file Symbol.cs.

Constructor & Destructor Documentation

Symbol ( Context  ctx,
IntPtr  obj 
)
inlineprotected

Symbol constructor

Definition at line 73 of file Symbol.cs.

73  : base(ctx, obj)
74  {
75  Contract.Requires(ctx != null);
76  }

Member Function Documentation

bool IsIntSymbol ( )
inline

Indicates whether the symbol is of Int kind

Definition at line 43 of file Symbol.cs.

44  {
45  return Kind == Z3_symbol_kind.Z3_INT_SYMBOL;
46  }
Z3_symbol_kind
The different kinds of symbol. In Z3, a symbol can be represented using integers and strings (See Z3_...
Definition: z3_api.h:150
Z3_symbol_kind Kind
The kind of the symbol (int or string)
Definition: Symbol.cs:36
bool IsStringSymbol ( )
inline

Indicates whether the symbol is of string kind.

Definition at line 51 of file Symbol.cs.

52  {
53  return Kind == Z3_symbol_kind.Z3_STRING_SYMBOL;
54  }
Z3_symbol_kind
The different kinds of symbol. In Z3, a symbol can be represented using integers and strings (See Z3_...
Definition: z3_api.h:150
Z3_symbol_kind Kind
The kind of the symbol (int or string)
Definition: Symbol.cs:36
override string ToString ( )
inline

A string representation of the symbol.

Definition at line 59 of file Symbol.cs.

60  {
61  if (IsIntSymbol())
62  return ((IntSymbol)this).Int.ToString();
63  else if (IsStringSymbol())
64  return ((StringSymbol)this).String;
65  else
66  throw new Z3Exception("Unknown symbol kind encountered");
67  }
bool IsIntSymbol()
Indicates whether the symbol is of Int kind
Definition: Symbol.cs:43
bool IsStringSymbol()
Indicates whether the symbol is of string kind.
Definition: Symbol.cs:51

Property Documentation

Z3_symbol_kind Kind
getprotected

The kind of the symbol (int or string)

Definition at line 36 of file Symbol.cs.