Skip to content

Data Models

All data models are frozen dataclasses. Fields are populated on successful decompilation; see DecompileResult for how None values are used on error.

Function Structure

flatline.FunctionInfo dataclass

FunctionInfo(name: str, entry_address: int, size: int, is_complete: bool, prototype: FunctionPrototype, local_variables: list[VariableInfo], call_sites: list[CallSiteInfo], jump_tables: list[JumpTableInfo], diagnostics: DiagnosticFlags, varnode_count: int)

Structured post-decompile data for one function.

Populated on successful decompilation. Access via DecompileResult.function_info.

Attributes:

Name Type Description
name str

Function name assigned by the decompiler.

entry_address int

Function entry point virtual address.

size int

Function body size in bytes.

is_complete bool

Whether decompilation completed fully.

prototype FunctionPrototype

Recovered function signature.

local_variables list[VariableInfo]

Local scope variables.

call_sites list[CallSiteInfo]

Call instructions within the function.

jump_tables list[JumpTableInfo]

Recovered jump tables.

diagnostics DiagnosticFlags

Aggregated diagnostic status flags.

varnode_count int

Total Varnode count (complexity metric).

flatline.FunctionPrototype dataclass

FunctionPrototype(calling_convention: str | None, parameters: list[ParameterInfo], return_type: TypeInfo, is_noreturn: bool, has_this_pointer: bool, has_input_errors: bool, has_output_errors: bool)

Recovered function signature.

Attributes:

Name Type Description
calling_convention str | None

Calling convention model name (e.g. "__cdecl"), or None if unknown.

parameters list[ParameterInfo]

Recovered function parameters.

return_type TypeInfo

Recovered return type.

is_noreturn bool

True if the function does not return.

has_this_pointer bool

True if the function has an implicit this parameter.

has_input_errors bool

True if parameter recovery was incomplete.

has_output_errors bool

True if return type recovery was incomplete.

flatline.DiagnosticFlags dataclass

DiagnosticFlags(is_complete: bool, has_unreachable_blocks: bool, has_unimplemented: bool, has_bad_data: bool, has_no_code: bool)

Aggregated boolean diagnostic flags from the decompiler.

Attributes:

Name Type Description
is_complete bool

Whether decompilation completed fully.

has_unreachable_blocks bool

Whether unreachable basic blocks were detected.

has_unimplemented bool

Whether unimplemented instructions were encountered.

has_bad_data bool

Whether the decompiler flagged bad data in the function body.

has_no_code bool

Whether the function entry contained no executable code.

Leaf Types

flatline.TypeInfo dataclass

TypeInfo(name: str, size: int, metatype: str)

Recovered type descriptor.

Attributes:

Name Type Description
name str

Type name (e.g. "int", "undefined8").

size int

Type size in bytes.

metatype str

Stable metatype classification string. One of VALID_METATYPES ("void", "int", "uint", "float", "pointer", "array", "struct", "union", "code", "enum", "bool", "unknown").

flatline.ParameterInfo dataclass

ParameterInfo(name: str, type: TypeInfo, index: int, storage: StorageInfo | None = None)

One function parameter.

Attributes:

Name Type Description
name str

Parameter name recovered by the decompiler.

type TypeInfo

Recovered type descriptor.

index int

Zero-based position in the function signature.

storage StorageInfo | None

Storage location, or None if not mapped.

flatline.VariableInfo dataclass

VariableInfo(name: str, type: TypeInfo, storage: StorageInfo | None = None)

One local variable.

Attributes:

Name Type Description
name str

Variable name recovered by the decompiler.

type TypeInfo

Recovered type descriptor.

storage StorageInfo | None

Storage location, or None if not mapped.

flatline.CallSiteInfo dataclass

CallSiteInfo(instruction_address: int, target_address: int | None = None)

One call instruction within the function.

Attributes:

Name Type Description
instruction_address int

Address of the CALL instruction.

target_address int | None

Resolved callee address, or None for indirect calls.

flatline.JumpTableInfo dataclass

JumpTableInfo(switch_address: int, target_count: int, target_addresses: list[int])

One recovered jump table.

Attributes:

Name Type Description
switch_address int

Address of the switch or indirect-branch instruction.

target_count int

Number of resolved target addresses.

target_addresses list[int]

Resolved target addresses.

flatline.StorageInfo dataclass

StorageInfo(space: str, offset: int, size: int)

Variable or parameter storage location.

Attributes:

Name Type Description
space str

Address space name (e.g. "register", "ram", "stack").

offset int

Byte offset within the address space.

size int

Size in bytes.