# aaronxyliu/recall-exp architecture

> Architecture diagram of the GitHub repository aaronxyliu/recall-exp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aaronxyliu/recall-exp
- Repository: https://github.com/aaronxyliu/recall-exp

## Overview

This repository is the experiment and paper companion for ReCall, a tool for recovering function identities in bundled JavaScript; reusable tool code lives in a sibling repository. Its main workflow captures library JavaScript, source maps, and function records, prepares evaluation inputs, runs recovery experiments, and scores results. Separate studies examine bundler behavior, graph-based recovery, and validation. The README documents these research capabilities; some implementation links below rely on those statements or the source index, since many drivers and subsystems were not sampled.

Main entry points: [`scripts/rq1-fixed/prepare.mjs`](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-fixed/prepare.mjs) (Input Preparation), [`scripts/real-app/bundling-dataset/inventory/inventory.mjs`](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/inventory/inventory.mjs) (Bundle Inventory), [`scripts/jquery/inventory.mjs`](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/inventory.mjs) (Function Inventory), [`scripts/function-ground-truth/collect.mjs`](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/function-ground-truth/collect.mjs) (Ground Truth Collection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ground_truth["Ground Truth"]
  node_ground_truth_collection["Ground Truth Collection<br/>[collect.mjs]"]
  node_function_inventory["Function Inventory"]
  node_source_relations["Source Relations<br/>[relations.mjs]"]
end

subgraph group_rq1["Recovery Experiments"]
  node_rq1_prepare["Input Preparation<br/>[prepare.mjs]"]
  node_ast_runtime["AST-First Runtime<br/>[runtime.mjs]"]
  node_ast_evaluation["AST-First Scoring<br/>[evaluate.mjs]"]
  node_graph_runtime["Graph Runtime<br/>[runtime.mjs]"]
  node_graph_evaluation["Graph Scoring<br/>[evaluate.mjs]"]
  node_rq1_runner["RQ1 Runner<br/>[run-one.mjs]"]
  node_simulation["Recovery Simulation<br/>[run.mjs]"]
  node_simulation_validator["Simulation Validator<br/>[validator.mjs]"]
end

subgraph group_bundlers["Bundler Studies"]
  node_bundler_parse["Bundle Parser<br/>[parse.mjs]"]
  node_bundler_inventory["Bundle Inventory<br/>[inventory.mjs]"]
  node_bundler_analysis["Inventory Analysis<br/>[analysis.mjs]"]
  node_bundler_measure["Inventory Metrics<br/>[measure.mjs]"]
  node_bundle_recognition["Bundle Recognition<br/>[recognize.mjs]"]
  node_bundle_context["Bundle Context<br/>[context.mjs]"]
  node_bundler_experiments["Bundler Experiments"]
end

subgraph group_research["Research Analysis"]
  node_jquery_analysis["Function Analysis<br/>[analysis.mjs]"]
  node_jquery_inventory["Function Inventory<br/>[inventory.mjs]"]
  node_jquery_common["Shared Analysis<br/>[common.mjs]"]
  node_jquery_measure["Function Metrics<br/>[measure.mjs]"]
  node_manuscript["Paper and Results<br/>[main.tex]"]
end

node_researcher(("Researcher"))
node_production_libraries["Production Libraries"]

node_researcher -->|"collects from"| node_ground_truth_collection
node_production_libraries -->|"provides inputs"| node_ground_truth_collection
node_ground_truth_collection -.->|"builds records"| node_function_inventory
node_source_relations -->|"uses inventory"| node_function_inventory
node_researcher -->|"prepares inputs"| node_rq1_prepare
node_rq1_prepare -.->|"prepares artifacts"| node_ast_runtime
node_rq1_prepare -->|"prepares artifacts"| node_graph_runtime
node_ast_runtime -->|"supplies recovery"| node_ast_evaluation
node_graph_runtime -->|"supplies recovery"| node_graph_evaluation
node_rq1_runner -.->|"prepares inputs"| node_rq1_prepare
node_researcher -->|"runs experiments"| node_rq1_runner
node_simulation -->|"uses validator"| node_simulation_validator
node_bundler_inventory -.->|"parses bundles"| node_bundler_parse
node_bundler_inventory -.->|"uses analysis"| node_bundler_analysis
node_bundler_inventory -.->|"uses metrics"| node_bundler_measure
node_bundle_context -->|"parses modules"| node_bundler_parse
node_bundle_context -->|"uses recognition"| node_bundle_recognition
node_researcher -->|"evaluates bundlers"| node_bundler_experiments
node_jquery_inventory -->|"uses analysis"| node_jquery_analysis
node_jquery_inventory -->|"uses metrics"| node_jquery_measure
node_jquery_inventory -->|"uses utilities"| node_jquery_common
node_researcher -->|"reports findings"| node_manuscript

click node_ground_truth_collection "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/function-ground-truth/collect.mjs"
click node_function_inventory "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/function-ground-truth/function-inventory.mjs"
click node_source_relations "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/function-ground-truth/relations.mjs"
click node_rq1_prepare "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-fixed/prepare.mjs"
click node_ast_runtime "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-ast-before/runtime.mjs"
click node_ast_evaluation "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-ast-before/evaluate.mjs"
click node_graph_runtime "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-graph-syntax/runtime.mjs"
click node_graph_evaluation "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-graph-syntax/evaluate.mjs"
click node_rq1_runner "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1/run-one.mjs"
click node_simulation "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/simulation/run.mjs"
click node_simulation_validator "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/simulation/validator.mjs"
click node_jquery_analysis "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/analysis.mjs"
click node_jquery_inventory "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/inventory.mjs"
click node_jquery_common "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/common.mjs"
click node_jquery_measure "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/measure.mjs"
click node_bundler_parse "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/parse.mjs"
click node_bundler_inventory "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/inventory/inventory.mjs"
click node_bundler_analysis "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/inventory/analysis.mjs"
click node_bundler_measure "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/inventory/measure.mjs"
click node_bundle_recognition "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundle-graph-v2/recognize.mjs"
click node_bundle_context "https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundle-graph-v2/context.mjs"
click node_bundler_experiments "https://github.com/aaronxyliu/recall-exp/tree/main/scripts/real-app/multi-bundler"
click node_manuscript "https://github.com/aaronxyliu/recall-exp/blob/main/manuscript/main.tex"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ground_truth_collection,node_function_inventory,node_source_relations toneBlue
class node_rq1_prepare,node_ast_runtime,node_ast_evaluation,node_graph_runtime,node_graph_evaluation,node_rq1_runner,node_simulation,node_simulation_validator toneAmber
class node_bundler_parse,node_bundler_inventory,node_bundler_analysis,node_bundler_measure,node_bundle_recognition,node_bundle_context,node_bundler_experiments toneMint
class node_jquery_analysis,node_jquery_inventory,node_jquery_common,node_jquery_measure,node_manuscript toneRose
class node_researcher,node_production_libraries toneIndigo
```

## Components

### Ground Truth

- [Ground Truth Collection](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/function-ground-truth/collect.mjs): `scripts/function-ground-truth/collect.mjs`
- [Function Inventory](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/function-ground-truth/function-inventory.mjs): `scripts/function-ground-truth/function-inventory.mjs`
- [Source Relations](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/function-ground-truth/relations.mjs): `scripts/function-ground-truth/relations.mjs`

### Recovery Experiments

- [Input Preparation](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-fixed/prepare.mjs): `scripts/rq1-fixed/prepare.mjs`
- [AST-First Runtime](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-ast-before/runtime.mjs): `scripts/rq1-ast-before/runtime.mjs`
- [AST-First Scoring](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-ast-before/evaluate.mjs): `scripts/rq1-ast-before/evaluate.mjs`
- [Graph Runtime](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-graph-syntax/runtime.mjs): `scripts/rq1-graph-syntax/runtime.mjs`
- [Graph Scoring](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1-graph-syntax/evaluate.mjs): `scripts/rq1-graph-syntax/evaluate.mjs`
- [RQ1 Runner](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/rq1/run-one.mjs): `scripts/rq1/run-one.mjs`
- [Recovery Simulation](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/simulation/run.mjs): `scripts/simulation/run.mjs`
- [Simulation Validator](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/simulation/validator.mjs): `scripts/simulation/validator.mjs`

### Bundler Studies

- [Bundle Parser](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/parse.mjs): `scripts/real-app/bundling-dataset/parse.mjs`
- [Bundle Inventory](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/inventory/inventory.mjs): `scripts/real-app/bundling-dataset/inventory/inventory.mjs`
- [Inventory Analysis](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/inventory/analysis.mjs): `scripts/real-app/bundling-dataset/inventory/analysis.mjs`
- [Inventory Metrics](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundling-dataset/inventory/measure.mjs): `scripts/real-app/bundling-dataset/inventory/measure.mjs`
- [Bundle Recognition](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundle-graph-v2/recognize.mjs): `scripts/real-app/bundle-graph-v2/recognize.mjs`
- [Bundle Context](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/real-app/bundle-graph-v2/context.mjs): `scripts/real-app/bundle-graph-v2/context.mjs`
- [Bundler Experiments](https://github.com/aaronxyliu/recall-exp/tree/main/scripts/real-app/multi-bundler): `scripts/real-app/multi-bundler`

### Research Analysis

- [Function Analysis](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/analysis.mjs): `scripts/jquery/analysis.mjs`
- [Function Inventory](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/inventory.mjs): `scripts/jquery/inventory.mjs`
- [Shared Analysis](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/common.mjs): `scripts/jquery/common.mjs`
- [Function Metrics](https://github.com/aaronxyliu/recall-exp/blob/main/scripts/jquery/measure.mjs): `scripts/jquery/measure.mjs`
- [Paper and Results](https://github.com/aaronxyliu/recall-exp/blob/main/manuscript/main.tex): `manuscript/main.tex`

### Other components

- **Researcher**
- **Production Libraries**

## Connections

- Researcher → Ground Truth Collection: collects from (evidence: `README.md`)
- Production Libraries → Ground Truth Collection: provides inputs (evidence: `README.md`)
- Ground Truth Collection → Function Inventory: builds records
- Source Relations → Function Inventory: uses inventory (evidence: `scripts/function-ground-truth/relations.mjs`)
- Researcher → Input Preparation: prepares inputs (evidence: `README.md`)
- Input Preparation → AST-First Runtime: prepares artifacts
- Input Preparation → Graph Runtime: prepares artifacts (evidence: `scripts/rq1-graph-syntax/continue-one.mjs`)
- AST-First Runtime → AST-First Scoring: supplies recovery (evidence: `scripts/rq1-ast-before/evaluate.mjs`)
- Graph Runtime → Graph Scoring: supplies recovery (evidence: `scripts/rq1-graph-syntax/evaluate.mjs`)
- RQ1 Runner → Input Preparation: prepares inputs
- Researcher → RQ1 Runner: runs experiments (evidence: `README.md`)
- Recovery Simulation → Simulation Validator: uses validator (evidence: `scripts/simulation/run.mjs`)
- Bundle Inventory → Bundle Parser: parses bundles
- Bundle Inventory → Inventory Analysis: uses analysis (evidence: `scripts/real-app/bundling-dataset/inventory/inventory.mjs`)
- Bundle Inventory → Inventory Metrics: uses metrics (evidence: `scripts/real-app/bundling-dataset/inventory/inventory.mjs`)
- Bundle Context → Bundle Parser: parses modules (evidence: `scripts/real-app/bundle-graph-v2/context.mjs`)
- Bundle Context → Bundle Recognition: uses recognition (evidence: `scripts/real-app/bundle-graph-v2/context.mjs`)
- Researcher → Bundler Experiments: evaluates bundlers (evidence: `README.md`)
- Function Inventory → Function Analysis: uses analysis (evidence: `scripts/jquery/inventory.mjs`)
- Function Inventory → Function Metrics: uses metrics (evidence: `scripts/jquery/inventory.mjs`)
- Function Inventory → Shared Analysis: uses utilities (evidence: `scripts/jquery/inventory.mjs`)
- Researcher → Paper and Results: reports findings (evidence: `README.md`)
