Header menu logo B2R2

Expr Type

Represents a LowUIR expression. You must create Expr/Stmt through the AST module. NEVER directly construct Expr nor Stmt unless you know what you are doing.

Union cases

Union case Description

BinOp(BinOpType, RegType, Expr, Expr, HashConsingInfo)

Full Usage: BinOp(BinOpType, RegType, Expr, Expr, HashConsingInfo)

Parameters:

Binary operation such as add, sub, etc. The second argument is a result type after applying BinOp.

Item1 : BinOpType
Item2 : RegType
Item3 : Expr
Item4 : Expr
Item5 : HashConsingInfo

Cast(CastKind, RegType, Expr, HashConsingInfo)

Full Usage: Cast(CastKind, RegType, Expr, HashConsingInfo)

Parameters:

Type casting expression. The first argument is a casting type, and the second argument is a result type.

Item1 : CastKind
Item2 : RegType
Item3 : Expr
Item4 : HashConsingInfo

ExprList(Expr list, HashConsingInfo)

Full Usage: ExprList(Expr list, HashConsingInfo)

Parameters:

List of expressions. We use this to represent function arguments.

Item1 : Expr list
Item2 : HashConsingInfo

Extract(Expr, RegType, startPos, HashConsingInfo)

Full Usage: Extract(Expr, RegType, startPos, HashConsingInfo)

Parameters:

Extraction expression. The first argument is target expression, and the second argument is the number of bits for extraction, and the third is the start position.

Item1 : Expr
Item2 : RegType
startPos : int
Item4 : HashConsingInfo

FuncName(string, HashConsingInfo)

Full Usage: FuncName(string, HashConsingInfo)

Parameters:

Name of uninterpreted function.

Item1 : string
Item2 : HashConsingInfo

Ite(Expr, Expr, Expr, HashConsingInfo)

Full Usage: Ite(Expr, Expr, Expr, HashConsingInfo)

Parameters:

If-then-else expression. The first expression is a condition, and the second and the third are true and false expression respectively.

Item1 : Expr
Item2 : Expr
Item3 : Expr
Item4 : HashConsingInfo

JmpDest(Label, HashConsingInfo)

Full Usage: JmpDest(Label, HashConsingInfo)

Parameters:

Jump destination of a Jmp or CJmp statement.

Item1 : Label
Item2 : HashConsingInfo

Load(Endian, RegType, Expr, HashConsingInfo)

Full Usage: Load(Endian, RegType, Expr, HashConsingInfo)

Parameters:

Memory loading such as LE:[T_1:I32]

Item1 : Endian
Item2 : RegType
Item3 : Expr
Item4 : HashConsingInfo

Num(BitVector, HashConsingInfo)

Full Usage: Num(BitVector, HashConsingInfo)

Parameters:

A number. For example, (0x42:I32) is a 32-bit number 0x42

Item1 : BitVector
Item2 : HashConsingInfo

PCVar(RegType, string, HashConsingInfo)

Full Usage: PCVar(RegType, string, HashConsingInfo)

Parameters:

A variable that represents a Program Counter (PC) of a CPU.

Item1 : RegType
Item2 : string
Item3 : HashConsingInfo

RelOp(RelOpType, Expr, Expr, HashConsingInfo)

Full Usage: RelOp(RelOpType, Expr, Expr, HashConsingInfo)

Parameters:

Relative operation such as eq, lt, etc.

Item1 : RelOpType
Item2 : Expr
Item3 : Expr
Item4 : HashConsingInfo

TempVar(RegType, int, HashConsingInfo)

Full Usage: TempVar(RegType, int, HashConsingInfo)

Parameters:

A temporary variable represents an internal (imaginary) register. Names of temporary variables should always be affixed by an underscore (_) and a number. This is to make sure that any temporary variable is unique in a CFG. For example, a temporary variable T can be represented as (T_2:I32), where 2 is a unique number assigned to the variable.

Item1 : RegType
Item2 : int
Item3 : HashConsingInfo

UnOp(UnOpType, Expr, HashConsingInfo)

Full Usage: UnOp(UnOpType, Expr, HashConsingInfo)

Parameters:

Unary operation such as negation.

Item1 : UnOpType
Item2 : Expr
Item3 : HashConsingInfo

Undefined(RegType, string, HashConsingInfo)

Full Usage: Undefined(RegType, string, HashConsingInfo)

Parameters:

Undefined expression. This is rarely used, and it is a fatal error when we encounter this expression while evaluating a program. Some CPU manuals explicitly say that a register value is undefined after a certain operation. We model such cases with this expression.

Item1 : RegType
Item2 : string
Item3 : HashConsingInfo

Var(RegType, RegisterID, string, HashConsingInfo)

Full Usage: Var(RegType, RegisterID, string, HashConsingInfo)

Parameters:

A variable that represents a register of a CPU. Var (t, r, n) indicates a variable of type (t) that has RegisterID r and name (n). For example, (EAX:I32) represents the EAX register (of type I32). Note that name (n) is additional information that doesn't be used internally.

Item1 : RegType
Item2 : RegisterID
Item3 : string
Item4 : HashConsingInfo

Instance members

Instance member Description

this.IsBinOp

Full Usage: this.IsBinOp

Returns: bool
Returns: bool

this.IsCast

Full Usage: this.IsCast

Returns: bool
Returns: bool

this.IsExprList

Full Usage: this.IsExprList

Returns: bool
Returns: bool

this.IsExtract

Full Usage: this.IsExtract

Returns: bool
Returns: bool

this.IsFuncName

Full Usage: this.IsFuncName

Returns: bool
Returns: bool

this.IsIte

Full Usage: this.IsIte

Returns: bool
Returns: bool

this.IsJmpDest

Full Usage: this.IsJmpDest

Returns: bool
Returns: bool

this.IsLoad

Full Usage: this.IsLoad

Returns: bool
Returns: bool

this.IsNum

Full Usage: this.IsNum

Returns: bool
Returns: bool

this.IsPCVar

Full Usage: this.IsPCVar

Returns: bool
Returns: bool

this.IsRelOp

Full Usage: this.IsRelOp

Returns: bool
Returns: bool

this.IsTempVar

Full Usage: this.IsTempVar

Returns: bool
Returns: bool

this.IsUnOp

Full Usage: this.IsUnOp

Returns: bool
Returns: bool

this.IsUndefined

Full Usage: this.IsUndefined

Returns: bool
Returns: bool

this.IsVar

Full Usage: this.IsVar

Returns: bool
Returns: bool

Type something to start searching.