Reach.OTP.GenServer (Reach v2.7.1)

Copy Markdown View Source

Extracts GenServer state access patterns, callbacks, and reply semantics from module IR.

Summary

Functions

Adds GenServer-specific edges (state flow, state pass, call reply) to a graph.

Classifies a function definition as a GenServer callback type.

Extracts the return value expression from a GenServer callback.

Extracts the state parameter node from a GenServer callback.

Functions

add_edges(graph, all_nodes)

Adds GenServer-specific edges (state flow, state pass, call reply) to a graph.

classify_callback(arg1)

@spec classify_callback(Reach.IR.Node.t()) :: atom() | nil

Classifies a function definition as a GenServer callback type.

extract_return_info(func_def)

@spec extract_return_info(Reach.IR.Node.t()) ::
  {atom(), Reach.IR.Node.t() | nil, Reach.IR.Node.t() | nil} | nil

Extracts the return value expression from a GenServer callback.

extract_state_param(func_def)

@spec extract_state_param(Reach.IR.Node.t()) :: Reach.IR.Node.t() | nil

Extracts the state parameter node from a GenServer callback.