ProgramFacts.Facts (program_facts v0.2.1)

Copy Markdown View Source

Ground-truth facts expected from a generated program.

Summary

Functions

Normalizes compatible fact input into the core %ProgramFacts.Facts{} shape.

Projects core oracle facts into the typed manifest facts payload.

Types

branch()

@type branch() :: map()

call_edge()

@type call_edge() :: {function_id(), function_id()}

data_flow()

@type data_flow() :: map()

effect()

@type effect() :: {function_id(), atom()}

function_id()

@type function_id() :: {module(), atom(), non_neg_integer()}

location()

@type location() :: map()

t()

@type t() :: %ProgramFacts.Facts{
  architecture: map(),
  branches: [branch()],
  call_edges: [call_edge()],
  call_paths: [[function_id()]],
  data_flows: [data_flow()],
  effects: [effect()],
  features: MapSet.t(atom()),
  functions: [function_id()],
  locations: %{optional(atom()) => [location()]},
  modules: [module()]
}

Functions

normalize(facts)

Normalizes compatible fact input into the core %ProgramFacts.Facts{} shape.

to_manifest(facts)

Projects core oracle facts into the typed manifest facts payload.