# OpenHeart
### Succinct Compositional Program Graph (SCPG) Engine & Universal UML 2.5 Studio
[](https://www.rust-lang.org/)
[](LICENSE)
[](https://ahmadhassan-bted.github.io/OpenHeart/)
[](https://github.com/AhmadHassan-BTed/OpenHeart/actions)
[](SECURITY.md)
[-blueviolet.svg?style=flat-square)](https://github.com/AhmadHassan-BTed)
A high-performance static program analysis compiler and bidirectional UML 2.5 projection platform built on succinct bitstring trees, memory-mapped binary layouts, and formal graph semantics.
---
## System Overview & Human Intent
Software codebases are living artifacts of human intellect designed to express domain logic, structural design, and operational intent. Traditional static analysis frameworks—such as pointer-heavy Code Property Graphs or lowered compiler IRs—strip away this high-level context, introducing massive memory inflation and pointer-chasing latency that isolate static analysis from real-time developer workflows.
Designed, created, and maintained solely by **Ahmad Hassan (B-Ted)**, **OpenHeart** introduces the **Succinct Compositional Program Graph (SCPG)**—a formal 7-tuple graph representation:
$$\mathcal{G} = (V, E, \nu, \varepsilon, \tau, \rho, \Sigma_\Phi)$$
By combining Succinct Balanced Parentheses (BP) trees, Compressed Sparse Row (CSR) control flow graphs, Static Single-Assignment (SSA) data flow representations, and Reduced Ordered Binary Decision Diagram (ROBDD) path summaries, OpenHeart achieves up to **128× memory compression** while maintaining **$O(1)$ bidirectional source-to-diagram traceability**.
---
## Key Technical Features
- **128× Memory Compression**: Replaces pointer-heavy AST nodes with Succinct Balanced Parentheses (BP) bitstrings and $O(1)$ Jacobson Rank/Select indexes.
- **$O(1)$ Universal Traceability**: Monotonic 32-bit `token_id` anchors link raw source positions directly to IR graph nodes and derived UML elements.
- **19 Universal Diagram Projections**: Generates all 14 standard OMG UML 2.5 diagrams + 5 deep compiler pipeline IRs directly from binary graph layers.
- **Zero-Backend In-Browser GitHub Ingestion**: 100% free-forever client-side cloning and AST parsing running directly on GitHub Pages.
- **Declarative Manifest Architecture**: Centralized `manifest.json` controlling categories, diagrams, 16 relationship terminologies, and 24 classifier node schemas with zero hardcoding.
- **Zero-Copy Memory Mapping**: All 10 compilation pipeline phases serialize into CRC-64 verified binary artifacts mapped directly into OS page memory.
- **Multi-Repo Convergence**: Validated with $F_1 = 1.0000$ precision across Java, Kotlin, Python, Rust, TypeScript, and C++ codebases.
---
## 📊 Complete 19-Diagram Suite Specification
OpenHeart deterministically derives 19 specialized graph projections organized into 3 distinct categories:
### 1. UML 2.5 Structural Projections (7 Diagrams)
1. **01 · Class Diagram** (`package_tree` engine): Complete class taxonomy, inheritance hierarchies, interfaces, fields, methods, and member visibility.
2. **02 · Package Diagram** (`hierarchical` engine): Multi-tier domain namespaces, package containment hierarchy, and inter-package dependencies.
3. **03 · Component Diagram** (`hierarchical` engine): Modular subsystems, provided/required interfaces, and runtime service wiring.
4. **04 · Composite Structure Diagram** (`hierarchical` engine): Internal parts, ports, and assembly connectors within composite classifiers.
5. **05 · Object Diagram** (`hierarchical` engine): Runtime heap instances, object identities, and reference linkages.
6. **06 · Deployment Diagram** (`hierarchical` engine): Execution environment nodes, devices, and artifact distribution topologies.
7. **07 · Profile Diagram** (`hierarchical` engine): Metamodels, stereotypes, tagged values, and `<