# sneppx/sneppx-alg architecture

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

- Interactive diagram: https://gitdiagram.com/sneppx/sneppx-alg
- Repository: https://github.com/sneppx/sneppx-alg

## Overview

SneppX-ALG is an alpha AI/ML framework combining native C/C++ components with Python bindings. The intended user workflow is to prepare data, operate on tensors and differentiable/model components, then run inference or serve results; distributed execution and model-hub utilities are additional capabilities. The graph also preserves cognitive memory, neural-program execution, and security tooling. Some links are limited to README claims or SOURCE INDEX references; unsampled implementations and wiring are not assumed.

Main entry points: [`bindings/python/bindings.cpp`](https://github.com/sneppx/sneppx-alg/blob/main/bindings/python/bindings.cpp) (Python bindings), [`include/neural_core/kernel/polymorphic_memory_allocator.h`](https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/kernel/polymorphic_memory_allocator.h) (Memory allocator), [`security/obfuscation/pipeline.cpp`](https://github.com/sneppx/sneppx-alg/blob/main/security/obfuscation/pipeline.cpp) (Obfuscation pipeline), [`include/neural_core/architecture/differentiable_training_pipeline.h`](https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/architecture/differentiable_training_pipeline.h) (Training pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Tensor and learning core"]
  node_tensor["Tensor engine<br/>[tensor_engine.c]"]
  node_autodiff["Automatic differentiation<br/>[ops.c]"]
  node_training["Training pipeline"]
  node_memory["Cognitive memory"]
  node_allocator["Memory allocator"]
end

subgraph group_models["Models and runtime"]
  node_models_native["Neural architectures<br/>[transformer.c]"]
  node_attention["Multi-head attention"]
  node_inference["Inference and generation<br/>[inference_engine.c]"]
  node_npe["Neural program engine<br/>[program.c]"]
  node_jit["NPE JIT pipeline<br/>[jit_pipeline.c]"]
  node_zoo["Model zoo<br/>[model_factory.cpp]"]
end

subgraph group_platform["Data and platform"]
  node_python["Python bindings<br/>[bindings.cpp]"]
  node_data["Data pipeline<br/>[data_pipeline.c]"]
  node_serving["Serving engine<br/>[serving_engine.c]"]
  node_http["HTTP server interface<br/>[http_server.h]"]
  node_hub["Model hub client<br/>[hub_client.c]"]
  node_distributed["Distributed pipeline<br/>[pipeline.c]"]
end

subgraph group_security["Security tooling"]
  node_obfuscation["Obfuscation pipeline<br/>[pipeline.cpp]"]
  node_instruction["Instruction obfuscation"]
  node_controlflow["Control-flow obfuscation"]
  node_firewall["Firewall engine<br/>[firewall_engine.c]"]
end

node_user(("Python user"))

node_user -.->|"uses"| node_python
node_python -.->|"prepares data"| node_data
node_data -->|"creates tensors"| node_tensor
node_python -.->|"uses tensors"| node_tensor
node_python -.->|"trains models"| node_training
node_training -.->|"differentiates"| node_autodiff
node_models_native -.->|"uses attention"| node_attention
node_python -.->|"runs inference"| node_inference
node_inference -->|"uses attention"| node_attention
node_python -.->|"runs programs"| node_npe
node_npe -.->|"uses JIT"| node_jit
node_jit -->|"allocates memory"| node_allocator
node_python -.->|"uses models"| node_zoo
node_python -.->|"serves models"| node_serving
node_serving -->|"includes interface"| node_http
node_python -.->|"uses hub"| node_hub
node_python -.->|"uses distribution"| node_distributed
node_distributed -.->|"uses memory"| node_allocator
node_python -.->|"uses memory"| node_memory
node_memory -->|"allocates memory"| node_allocator
node_obfuscation -->|"uses engine"| node_instruction
node_obfuscation -->|"uses control flow"| node_controlflow
node_python -.->|"uses security"| node_firewall

click node_python "https://github.com/sneppx/sneppx-alg/blob/main/bindings/python/bindings.cpp"
click node_data "https://github.com/sneppx/sneppx-alg/blob/main/kernel/data/data_pipeline.c"
click node_tensor "https://github.com/sneppx/sneppx-alg/blob/main/kernel/tensor/tensor_engine.c"
click node_autodiff "https://github.com/sneppx/sneppx-alg/blob/main/kernel/autodiff/ops.c"
click node_training "https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/architecture/differentiable_training_pipeline.h"
click node_models_native "https://github.com/sneppx/sneppx-alg/blob/main/algorithms/transformer/core/transformer.c"
click node_attention "https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/kernel/multi_head_attention_module.h"
click node_inference "https://github.com/sneppx/sneppx-alg/blob/main/kernel/inference/inference_engine.c"
click node_npe "https://github.com/sneppx/sneppx-alg/blob/main/algorithms/npe/core/program.c"
click node_jit "https://github.com/sneppx/sneppx-alg/blob/main/algorithms/npe/core/jit_pipeline.c"
click node_zoo "https://github.com/sneppx/sneppx-alg/blob/main/algorithms/model_zoo/model_factory.cpp"
click node_serving "https://github.com/sneppx/sneppx-alg/blob/main/net/http/serving_engine.c"
click node_http "https://github.com/sneppx/sneppx-alg/blob/main/net/http/http_server.h"
click node_hub "https://github.com/sneppx/sneppx-alg/blob/main/model_hub/src/hub_client.c"
click node_distributed "https://github.com/sneppx/sneppx-alg/blob/main/kernel/distributed/pipeline.c"
click node_memory "https://github.com/sneppx/sneppx-alg/blob/main/kernel/memory/cognition/cognitive_manager.c"
click node_allocator "https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/kernel/polymorphic_memory_allocator.h"
click node_obfuscation "https://github.com/sneppx/sneppx-alg/blob/main/security/obfuscation/pipeline.cpp"
click node_instruction "https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/security/instruction_obfuscation_engine.h"
click node_controlflow "https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/security/control_flow_obfuscation.h"
click node_firewall "https://github.com/sneppx/sneppx-alg/blob/main/security/firewall/c/firewall_engine.c"

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_tensor,node_autodiff,node_training,node_memory,node_allocator,node_user toneBlue
class node_models_native,node_attention,node_inference,node_npe,node_jit,node_zoo toneAmber
class node_python,node_data,node_serving,node_http,node_hub,node_distributed toneMint
class node_obfuscation,node_instruction,node_controlflow,node_firewall toneRose
```

## Components

### Tensor and learning core

- [Tensor engine](https://github.com/sneppx/sneppx-alg/blob/main/kernel/tensor/tensor_engine.c): `kernel/tensor/tensor_engine.c`
- [Automatic differentiation](https://github.com/sneppx/sneppx-alg/blob/main/kernel/autodiff/ops.c): `kernel/autodiff/ops.c`
- [Training pipeline](https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/architecture/differentiable_training_pipeline.h): `include/neural_core/architecture/differentiable_training_pipeline.h`
- [Cognitive memory](https://github.com/sneppx/sneppx-alg/blob/main/kernel/memory/cognition/cognitive_manager.c): `kernel/memory/cognition/cognitive_manager.c`
- [Memory allocator](https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/kernel/polymorphic_memory_allocator.h): `include/neural_core/kernel/polymorphic_memory_allocator.h`

### Models and runtime

- [Neural architectures](https://github.com/sneppx/sneppx-alg/blob/main/algorithms/transformer/core/transformer.c): `algorithms/transformer/core/transformer.c`
- [Multi-head attention](https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/kernel/multi_head_attention_module.h): `include/neural_core/kernel/multi_head_attention_module.h`
- [Inference and generation](https://github.com/sneppx/sneppx-alg/blob/main/kernel/inference/inference_engine.c): `kernel/inference/inference_engine.c`
- [Neural program engine](https://github.com/sneppx/sneppx-alg/blob/main/algorithms/npe/core/program.c): `algorithms/npe/core/program.c`
- [NPE JIT pipeline](https://github.com/sneppx/sneppx-alg/blob/main/algorithms/npe/core/jit_pipeline.c): `algorithms/npe/core/jit_pipeline.c`
- [Model zoo](https://github.com/sneppx/sneppx-alg/blob/main/algorithms/model_zoo/model_factory.cpp): `algorithms/model_zoo/model_factory.cpp`

### Data and platform

- [Python bindings](https://github.com/sneppx/sneppx-alg/blob/main/bindings/python/bindings.cpp): `bindings/python/bindings.cpp`
- [Data pipeline](https://github.com/sneppx/sneppx-alg/blob/main/kernel/data/data_pipeline.c): `kernel/data/data_pipeline.c`
- [Serving engine](https://github.com/sneppx/sneppx-alg/blob/main/net/http/serving_engine.c): `net/http/serving_engine.c`
- [HTTP server interface](https://github.com/sneppx/sneppx-alg/blob/main/net/http/http_server.h): `net/http/http_server.h`
- [Model hub client](https://github.com/sneppx/sneppx-alg/blob/main/model_hub/src/hub_client.c): `model_hub/src/hub_client.c`
- [Distributed pipeline](https://github.com/sneppx/sneppx-alg/blob/main/kernel/distributed/pipeline.c): `kernel/distributed/pipeline.c`

### Security tooling

- [Obfuscation pipeline](https://github.com/sneppx/sneppx-alg/blob/main/security/obfuscation/pipeline.cpp): `security/obfuscation/pipeline.cpp`
- [Instruction obfuscation](https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/security/instruction_obfuscation_engine.h): `include/neural_core/security/instruction_obfuscation_engine.h`
- [Control-flow obfuscation](https://github.com/sneppx/sneppx-alg/blob/main/include/neural_core/security/control_flow_obfuscation.h): `include/neural_core/security/control_flow_obfuscation.h`
- [Firewall engine](https://github.com/sneppx/sneppx-alg/blob/main/security/firewall/c/firewall_engine.c): `security/firewall/c/firewall_engine.c`

### Other components

- **Python user**

## Connections

- Python user → Python bindings: uses
- Python bindings → Data pipeline: prepares data
- Data pipeline → Tensor engine: creates tensors (evidence: `kernel/data/data_pipeline.c`)
- Python bindings → Tensor engine: uses tensors
- Python bindings → Training pipeline: trains models
- Training pipeline → Automatic differentiation: differentiates
- Neural architectures → Multi-head attention: uses attention
- Python bindings → Inference and generation: runs inference
- Inference and generation → Multi-head attention: uses attention
- Python bindings → Neural program engine: runs programs
- Neural program engine → NPE JIT pipeline: uses JIT (evidence: `algorithms/npe/core/jit_pipeline.c`)
- NPE JIT pipeline → Memory allocator: allocates memory (evidence: `algorithms/npe/core/jit_pipeline.c`)
- Python bindings → Model zoo: uses models
- Python bindings → Serving engine: serves models
- Serving engine → HTTP server interface: includes interface
- Python bindings → Model hub client: uses hub
- Python bindings → Distributed pipeline: uses distribution
- Distributed pipeline → Memory allocator: uses memory
- Python bindings → Cognitive memory: uses memory
- Cognitive memory → Memory allocator: allocates memory (evidence: `kernel/memory/cognition/cognitive_manager.c`)
- Obfuscation pipeline → Instruction obfuscation: uses engine (evidence: `security/obfuscation/pipeline.cpp`)
- Obfuscation pipeline → Control-flow obfuscation: uses control flow (evidence: `security/obfuscation/pipeline.cpp`)
- Python bindings → Firewall engine: uses security
