Header menu logo B2R2

Expr Type

Represents the SSA IR (Static Single Assignment IR) expressions, which are mostly similar to LowUIR expressions.

Union cases

Union case Description

BinOp(BinOpType, RegType, Expr, Expr)

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

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

Cast(CastKind, RegType, Expr)

Full Usage: Cast(CastKind, RegType, Expr)

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

ExprList Expr list

Full Usage: ExprList Expr list

Parameters:

List of expressions.

Item : Expr list

Extract(Expr, RegType, startPos)

Full Usage: Extract(Expr, RegType, startPos)

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

FuncName string

Full Usage: FuncName string

Parameters:
    Item : string

Name of uninterpreted function.

Item : string

Ite(Expr, RegType, Expr, Expr)

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

Parameters:

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

Item1 : Expr
Item2 : RegType
Item3 : Expr
Item4 : Expr

Load(Variable, RegType, Expr)

Full Usage: Load(Variable, RegType, Expr)

Parameters:

Memory lookup such as [T_1]:I32

Item1 : Variable
Item2 : RegType
Item3 : Expr

Num BitVector

Full Usage: Num BitVector

Parameters:

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

Item : BitVector

RelOp(RelOpType, RegType, Expr, Expr)

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

Parameters:

Relative operation such as eq, lt, etc. The second argument is a result type.

Item1 : RelOpType
Item2 : RegType
Item3 : Expr
Item4 : Expr

Store(Variable, RegType, Expr, Expr)

Full Usage: Store(Variable, RegType, Expr, Expr)

Parameters:

Memory update such as [T_1] <- T_2. The second argument is a type of stored value.

Item1 : Variable
Item2 : RegType
Item3 : Expr
Item4 : Expr

UnOp(UnOpType, RegType, Expr)

Full Usage: UnOp(UnOpType, RegType, Expr)

Parameters:

Unary operation such as negation. The second argument is a result type.

Item1 : UnOpType
Item2 : RegType
Item3 : Expr

Undefined(RegType, string)

Full Usage: Undefined(RegType, string)

Parameters:

Undefined expression. It is a fatal error when we encounter this expression while evaluating a program. This expression is useful when we encode a label that should not really jump to (e.g., divide-by-zero case).

Item1 : RegType
Item2 : string

Var Variable

Full Usage: Var Variable

Parameters:

A variable.

Item : Variable

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.IsLoad

Full Usage: this.IsLoad

Returns: bool
Returns: bool

this.IsNum

Full Usage: this.IsNum

Returns: bool
Returns: bool

this.IsRelOp

Full Usage: this.IsRelOp

Returns: bool
Returns: bool

this.IsStore

Full Usage: this.IsStore

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

Static members

Static member Description

Expr.TypeOf(expr)

Full Usage: Expr.TypeOf(expr)

Parameters:
Returns: RegType

Returns the type of an SSA expression.

expr : Expr
Returns: RegType

Type something to start searching.