Argus.Pipeline.Emit (Panoptes v0.13.0)

Copy Markdown View Source

Transforms normalized BEAM instructions into Layer 1 fact tuples.

Takes the output of Argus.Pipeline.Normalize (a list of {id, instruction} pairs) and produces fact tuples grouped by relation name. Each fact tuple is a list of values matching the field order defined in Argus.Schema.

Fact format

Facts are returned as a map from relation name (atom) to a list of rows, where each row is a list of strings (ready for TSV output).

Summary

Types

facts()

@type facts() :: %{required(atom()) => [[String.t()]]}

Functions

emit_module(module, exports, imports, attributes, functions, line_table \\ %{})

@spec emit_module(atom(), list(), list(), keyword(), list(), map()) :: facts()

Emits facts for a single module's disassembly data.

Takes the module name, the list of exports (for marking exported functions), the list of imports, the attributes, the function definitions, and the module's Line-chunk table (BeamSpy.Source.parse_line_table/1, used to resolve {:line, ref} markers to real source lines for line_info). Returns a map of relation name to list of fact rows.