# fatematabassum/code_rename_anonymize architecture

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

- Interactive diagram: https://gitdiagram.com/fatematabassum/code_rename_anonymize
- Repository: https://github.com/fatematabassum/code_rename_anonymize

## Overview

This repository is a research toolkit for preparing and analyzing Juliet C/C++ vulnerability test cases. Its clearest workflow is to group related source files and gate each group for completeness and consistency; the tree also shows separate labeling, renaming, and control-flow feature-extraction capabilities. The sampled gate explicitly consumes groups produced by grouping, while wiring for the other branches is not established by the excerpts. The root README was empty, so unsampled subsystem details are represented conservatively.

Main entry points: [`others/juliet-labeling/process_juliet.py`](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/process_juliet.py) (Label processing), [`others/CFGAVE/src/cfgave.py`](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/cfgave.py) (CFG vectors), [`prompt_pipeline/src/step_1_grouping.py`](https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/src/step_1_grouping.py) (Group cases), [`others/juliet-labeling/cwe121.py`](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/cwe121.py) (CWE-121 labels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Case preparation"]
  node_grouping["Group cases<br/>[step_1_grouping.py]"]
  node_gate["Validate groups<br/>[step_2_gate.py]"]
  node_rename["Rename symbols"]
  node_group_tools["Group utilities<br/>[groups.py]"]
end

subgraph group_labels["Vulnerability labels"]
  node_label_process["Label processing<br/>[process_juliet.py]"]
  node_label_preprocess["Label preprocessing<br/>[preprocess.py]"]
  node_cwe121["CWE-121 labels<br/>[cwe121.py]"]
  node_cwe122["CWE-122 labels<br/>[cwe122.py]"]
  node_label_output["Label utilities<br/>[util.py]"]
end

subgraph group_analysis["Program analysis"]
  node_cfgave["CFG vectors<br/>[cfgave.py]"]
  node_cfg_recovery["CFG recovery<br/>[recovery.py]"]
  node_cfg_nodes["Basic-block model<br/>[BB_node.py]"]
  node_cfg_util["CFG utilities<br/>[util.py]"]
end

subgraph group_support["Case support"]
  node_support_headers["Juliet support headers<br/>[std_testcase.h]"]
  node_testcase_declarations["Test-case declarations<br/>[testcases.h]"]
end

node_juliet["Juliet cases"]

node_juliet -->|"groups sources"| node_grouping
node_grouping -->|"checks groups"| node_gate
node_juliet -->|"labels cases"| node_label_process
node_label_process -->|"processes labels"| node_label_preprocess
node_label_process -->|"uses CWE rules"| node_cwe121
node_label_process -->|"uses CWE rules"| node_cwe122
node_cwe121 -->|"writes labels"| node_label_output
node_cwe122 -->|"writes labels"| node_label_output
node_juliet -->|"renames declarations"| node_rename
node_juliet -->|"extracts features"| node_cfgave
node_cfgave -->|"recovers CFGs"| node_cfg_recovery
node_cfgave -->|"creates nodes"| node_cfg_nodes
node_cfgave -->|"uses utilities"| node_cfg_util
node_support_headers -.->|"supports compilation"| node_grouping
node_testcase_declarations -.->|"provides declarations"| node_grouping

click node_grouping "https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/src/step_1_grouping.py"
click node_gate "https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/src/step_2_gate.py"
click node_rename "https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/src/prototype_cg_rename.py"
click node_group_tools "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/code_juliet/groups.py"
click node_label_process "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/process_juliet.py"
click node_label_preprocess "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/preprocess.py"
click node_cwe121 "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/cwe121.py"
click node_cwe122 "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/cwe122.py"
click node_label_output "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/util.py"
click node_cfgave "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/cfgave.py"
click node_cfg_recovery "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/recovery.py"
click node_cfg_nodes "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/BB_node.py"
click node_cfg_util "https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/util.py"
click node_support_headers "https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/juliet_support/std_testcase.h"
click node_testcase_declarations "https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/juliet_support/testcases.h"

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_grouping,node_gate,node_rename,node_group_tools toneBlue
class node_label_process,node_label_preprocess,node_cwe121,node_cwe122,node_label_output toneAmber
class node_cfgave,node_cfg_recovery,node_cfg_nodes,node_cfg_util toneMint
class node_support_headers,node_testcase_declarations toneRose
class node_juliet toneIndigo
```

## Components

### Case preparation

- [Group cases](https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/src/step_1_grouping.py): `prompt_pipeline/src/step_1_grouping.py`
- [Validate groups](https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/src/step_2_gate.py): `prompt_pipeline/src/step_2_gate.py`
- [Rename symbols](https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/src/prototype_cg_rename.py): `prompt_pipeline/src/prototype_cg_rename.py`
- [Group utilities](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/code_juliet/groups.py): `others/code_juliet/groups.py`

### Vulnerability labels

- [Label processing](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/process_juliet.py): `others/juliet-labeling/process_juliet.py`
- [Label preprocessing](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/preprocess.py): `others/juliet-labeling/preprocess.py`
- [CWE-121 labels](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/cwe121.py): `others/juliet-labeling/cwe121.py`
- [CWE-122 labels](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/cwe122.py): `others/juliet-labeling/cwe122.py`
- [Label utilities](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/juliet-labeling/util.py): `others/juliet-labeling/util.py`

### Program analysis

- [CFG vectors](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/cfgave.py): `others/CFGAVE/src/cfgave.py`
- [CFG recovery](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/recovery.py): `others/CFGAVE/src/recovery.py`
- [Basic-block model](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/BB_node.py): `others/CFGAVE/src/BB_node.py`
- [CFG utilities](https://github.com/fatematabassum/code_rename_anonymize/blob/master/others/CFGAVE/src/util.py): `others/CFGAVE/src/util.py`

### Case support

- [Juliet support headers](https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/juliet_support/std_testcase.h): `prompt_pipeline/juliet_support/std_testcase.h`
- [Test-case declarations](https://github.com/fatematabassum/code_rename_anonymize/blob/master/prompt_pipeline/juliet_support/testcases.h): `prompt_pipeline/juliet_support/testcases.h`

### Other components

- **Juliet cases**

## Connections

- Juliet cases → Group cases: groups sources
- Group cases → Validate groups: checks groups
- Juliet cases → Label processing: labels cases
- Label processing → Label preprocessing: processes labels
- Label processing → CWE-121 labels: uses CWE rules
- Label processing → CWE-122 labels: uses CWE rules
- CWE-121 labels → Label utilities: writes labels
- CWE-122 labels → Label utilities: writes labels
- Juliet cases → Rename symbols: renames declarations
- Juliet cases → CFG vectors: extracts features
- CFG vectors → CFG recovery: recovers CFGs
- CFG vectors → Basic-block model: creates nodes
- CFG vectors → CFG utilities: uses utilities
- Juliet support headers → Group cases: supports compilation
- Test-case declarations → Group cases: provides declarations
