B2R2


RegisterSet Type

RegisterSet is an efficient set data structure using arrays for managing a set of registers.

Constructors

Constructor Description

RegisterSet()

Full Usage: RegisterSet()

Returns: RegisterSet
Returns: RegisterSet

Instance members

Instance member Description

this.Add(arg1)

Full Usage: this.Add(arg1)

Parameters:
Returns: RegisterSet
Modifiers: abstract

Add a register to the set.

arg0 : RegisterID
Returns: RegisterSet

this.ArrSize

Full Usage: this.ArrSize

Returns: int
Modifiers: abstract

Size of the internal array.

Returns: int

this.AuxSet

Full Usage: this.AuxSet

Returns: Set<RegisterID>
Modifiers: abstract

A backup storage for unknown variables, which does not have a RegisterID. For example, when writing a symbolic executor, we may encounter unknown variables, i.e., fresh symbolic variables. We store them in this set.

Returns: Set<RegisterID>

this.BitArray

Full Usage: this.BitArray

Returns: uint64[]
Modifiers: abstract

An internal array storing the register set.

Returns: uint64[]

this.Exists(arg1)

Full Usage: this.Exists(arg1)

Parameters:
Returns: bool
Modifiers: abstract

Check if a register exists in the set.

arg0 : RegisterID
Returns: bool

this.IndexToRegID(arg1)

Full Usage: this.IndexToRegID(arg1)

Parameters:
    arg0 : int

Returns: RegisterID
Modifiers: abstract

Obtain a RegisterID from a given index.

arg0 : int
Returns: RegisterID

this.Intersect(arg1)

Full Usage: this.Intersect(arg1)

Parameters:
Returns: RegisterSet
Modifiers: abstract

Intersection of two register sets.

arg0 : RegisterSet
Returns: RegisterSet

this.IsEmpty()

Full Usage: this.IsEmpty()

Returns: bool
Modifiers: abstract

Check if the set is empty.

Returns: bool

this.New(arg1) (arg2)

Full Usage: this.New(arg1) (arg2)

Parameters:
Returns: RegisterSet
Modifiers: abstract

Create a new RegisterSet from a given array and a set. This method should be overridden by ISA-specific RegisterSet implementation.

arg0 : uint64[]
arg1 : Set<RegisterID>
Returns: RegisterSet

this.RegIDToIndex(arg1)

Full Usage: this.RegIDToIndex(arg1)

Parameters:
Returns: int
Modifiers: abstract

Obtain a unique index to the internal array from a given RegisterID.

arg0 : RegisterID
Returns: int

this.Remove(arg1)

Full Usage: this.Remove(arg1)

Parameters:
Returns: RegisterSet
Modifiers: abstract

Remove a register from the set.

arg0 : RegisterID
Returns: RegisterSet

this.Tag

Full Usage: this.Tag

Returns: RegisterSetTag
Modifiers: abstract

Tag identifies ISA.

Returns: RegisterSetTag

this.ToSet()

Full Usage: this.ToSet()

Returns: Set<RegisterID>
Modifiers: abstract

Return the set of register indices.

Returns: Set<RegisterID>

this.Union(arg1)

Full Usage: this.Union(arg1)

Parameters:
Returns: RegisterSet
Modifiers: abstract

Union of two register sets.

arg0 : RegisterSet
Returns: RegisterSet

Static members

Static member Description

RegisterSet.GetBucketAndOffset(idx)

Full Usage: RegisterSet.GetBucketAndOffset(idx)

Parameters:
    idx : int

Returns: int * int

Get the bucket and the offset from the given index.

idx : int
Returns: int * int

RegisterSet.GetIndex(bucketId) (offset)

Full Usage: RegisterSet.GetIndex(bucketId) (offset)

Parameters:
    bucketId : int
    offset : int

Returns: int

Get the register index from the given bucket id and the offset.

bucketId : int
offset : int
Returns: int

RegisterSet.IsBitSet(nth) (v)

Full Usage: RegisterSet.IsBitSet(nth) (v)

Parameters:
    nth : int32
    v : uint64

Returns: bool

Check if the nth bit is set on the value v.

nth : int32
v : uint64
Returns: bool

RegisterSet.MakeInternalBitArray(size)

Full Usage: RegisterSet.MakeInternalBitArray(size)

Parameters:
    size : int

Returns: 'a[]

Create an internal bit array of size.

size : int
Returns: 'a[]