Workspace Directory Structure¶
The Lian analysis framework persists intermediate artifacts in the lian_workspace directory. Files are stored using Feather-based .bundle (data) and .indexing (index) formats to support efficient loading for large-scale codebases.
1. frontend (Compilation Frontend)¶
Stores information produced when source code is translated into the Generic Intermediate Representation (GIR), along with basic symbol-mapping data.
| File Name | Description |
|---|---|
gir.bundle* |
Complete GIR instructions, including operations, operands, statement IDs, and source line numbers |
module_symbols |
Module and file index table, recording the mapping from unit_id to physical path and language type |
unique_symbol_ids |
Maintains the allocation state for globally unique symbol IDs across the project |
2. semantic_p1 (Basic Structural Analysis)¶
Stores foundational data such as function control flow, scope trees, and symbol declarations.
| File Name | Description |
|---|---|
cfg.bundle* |
Function control-flow graph edge data, recording jump relationships and branch types between statements |
scope_hierarchy.bundle* |
Nested scope tree, recording parent-child scope relationships, scope types, and start/end stmt_ids |
scope_to_symbol_info.bundle* |
Records symbols directly defined in each scope, together with their IDs and declaration locations |
scope_to_available_scope_ids.bundle* |
Lexical lookup chains for symbol resolution from each scope upward |
stmt_id_to_scope_id |
Mapping table from instruction ID to its owning scope ID |
symbol_name_to_scope_ids.bundle* |
Set of all scope IDs in which each symbol name appears across the project |
symbol_name_to_decl_ids.bundle* |
Set of all declaration locations for each symbol name across the project |
unit_export_symbols.indexing |
Set of symbols exported by each module, used to resolve cross-file import relationships |
defined_symbols_p1.bundle* |
Variable-symbol sets defined by each instruction during the P1 stage |
used_symbols.bundle* |
Variable-symbol sets referenced by each instruction during the P1 stage |
defined_states_p1.bundle* |
Memory-state node sets defined by each instruction during the P1 stage |
stmt_status_p1.bundle* |
Statement-level analysis state, recording mappings of live-variable bit vectors at entry and exit |
s2space_p1.bundle* |
Symbol-state space, storing the mapping from symbols to initial memory-state nodes |
symbol_bit_vector_p1.bundle* |
Index for the symbol bit-vector manager, mapping definition points to bit-vector positions |
call_graph_p1 |
Initial call graph, recording function call relationships that can be determined lexically |
call_stmt_format |
Call-statement metadata, including callee name, argument count, and receiver information |
method_internal_callees |
List of all call-site stmt_ids contained in each function |
method_def_use_summary |
Function-level symbol summary, including symbol sets for parameters, local variables, and return values |
import_graph / import_graph_nodes |
Symbol-level import dependency graph describing cross-file origins of variables and functions |
import_deps |
File-level dependency graph used to plan the topological order of analysis tasks |
method_decl_format |
Function declaration metadata, including owning class, start location, parameter count, and more |
method_id_to_name |
Mapping from function ID to human-readable full name, including class-name prefixes |
method_to_stmt_id |
Mapping from function ID to all instruction IDs contained in its body |
method_to_parameter_id |
Mapping from function ID to its ordered parameter symbol IDs |
unit_to_stmt_id |
Mapping from file unit_id to all instruction IDs it contains |
unit_to_method_id |
Mapping from file unit_id to all functions defined in it |
unit_to_variable_id |
Global or module-level variable definition locations associated with a file unit_id |
type_graph |
Type hierarchy graph, recording object-oriented relationships such as class inheritance and interface implementation |
entry_points |
List of program-analysis entry points that determine the starting points of the P3 global analysis |
grouped_methods |
Function-grouping index organized by module or class to optimize batch-loading performance |
3. semantic_p2 (Local Semantic Analysis)¶
Stores bottom-up computed function summaries and local state-flow relationships.
| File Name | Description |
|---|---|
s2space_p2.indexing |
Symbol-state space refined by pointer analysis, including more accurate alias relationships |
state_flow_graph_p2.indexing |
Local state-flow graph describing propagation between memory states within a function |
space_summary_p2.indexing |
Function-behavior summary templates recording data-flow side effects between parameters and return values |
stmt_status_p2.indexing |
P2 instruction state snapshots carrying state-level live bit vectors |
callee_parameter_mapping_p2.indexing |
Records of state-propagation mappings from call-site arguments to callee parameters |
symbol_graph.indexing |
Symbol-level dependency graph describing direct data-flow evolution between symbols |
defined_symbols_p2 / defined_states_p2 |
Confirmed symbol and state definition sets after interprocedural propagation |
symbol_bit_vector_p2 / state_bit_vector_p2 |
Compressed bit-vector management indexes for symbols and states in the P2 stage |
class_to_method_id.indexing |
Mapping from class ID to all available method implementations, including inherited methods |
4. semantic_p3 (Global Semantic Analysis)¶
Stores global semantic data instantiated from entry points with full context information.
| File Name | Description |
|---|---|
state_flow_graph_p3.bundle* |
Global state-flow graph connecting nodes across function boundaries; the direct foundation for taint analysis |
s2space_p3.bundle* |
Globally context-sensitive symbol-state space reflecting instantiated memory layouts |
space_summary_p3.bundle* |
Instantiated function-behavior summaries for specific call chains |
stmt_status_p3.bundle* |
Final instruction states precise to context, including global data-flow bit vectors |
symbol_graph_p3.bundle* |
Global symbol dependency graph describing symbol dependencies across function boundaries |
defined_symbols_p3.bundle* |
Sets of symbol definition points determined from the global perspective |
callee_parameter_mapping_p3.bundle* |
Parameter-passing mapping records instantiated for specific contexts |
state_bit_vector_p3 / symbol_bit_vector_p3 |
Compressed bit-vector indexes corresponding to globally instantiated nodes |