Skip to content

Add namespace analysis tool for ThemisDB codebase - #168

Merged
makr-code merged 4 commits into
mainfrom
copilot/namespace-analysis-themis-db
Dec 27, 2025
Merged

makr-code merged 4 commits into
mainfrom
copilot/namespace-analysis-themis-db

Conversation

Copilot AI commented Dec 27, 2025 •

Copy link
Copy Markdown
Contributor

Implements Python-based static analysis tool to map ThemisDB's namespace structure, entities, and temporal evolution via git metadata.

Implementation

Core analyzer (tools/namespace_analyzer.py, 1000+ LOC)

  • Parses C++ headers to extract namespaces, classes, functions, variables
  • Regex-based parsing with support for templates, inheritance, modifiers
  • Optional git blame integration for entity introduction/modification timestamps
  • Multi-format output: JSON (structured data), Markdown (human-readable), CSV (tabular)

Analysis results (ThemisDB v1.3.3)

  • 93 namespaces with hierarchical relationships
  • 1,880 classes/structs/enums (template parameters, base classes)
  • 4,720 functions (complete signatures, modifiers)
  • 7,770 variables/constants (type info, qualifiers)

Usage

# Basic analysis (all formats)
python3 tools/namespace_analyzer.py

# Include temporal data (when entities introduced/modified)
python3 tools/namespace_analyzer.py --include-git

# Specific format
python3 tools/namespace_analyzer.py --format markdown

Output

Generates reports in namespace_analysis/:

  • namespace_analysis.json - Full structured data for automation
  • namespace_analysis.md - Hierarchical report with statistics
  • namespaces.csv, classes.csv, functions.csv - Tabular exports

Top namespaces by entity count:

  • themis: 2,369 entities
  • themis::query::functions: 1,986 entities
  • themis::llm: 1,247 entities

Documentation

  • tools/NAMESPACE_ANALYZER_README.md - Complete usage guide
  • tools/NAMESPACE_ANALYSIS_RESULTS.md - Analysis insights
  • tools/example_namespace_analysis.sh - Usage examples
Original prompt

wir brauchen eine namespace analyse der themis db. Welche Klassen, Funktionen, Variablen innerhalb der Themis existieren und wann.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Dec 27, 2025
Copilot AI changed the title [WIP] Analyze namespaces, classes, functions, and variables in Themis DB Add namespace analysis tool for ThemisDB codebase Dec 27, 2025
Copilot AI requested a review from makr-code December 27, 2025 11:14
@makr-code
makr-code marked this pull request as ready for review December 27, 2025 12:33
@makr-code
makr-code merged commit 3acce15 into main Dec 27, 2025
@makr-code makr-code added this to the v1.0.2 milestone Mar 11, 2026
Copilot AI added a commit that referenced this pull request May 6, 2026
- Add FlareRetrieval (include/rag/flare_retrieval.h + src/rag/flare_retrieval.cpp):
  per-token log-probability gating, sliding-window token history, uncertain-token
  masking in buildQuery(), FlareStats, max_retrieval_steps cap, cooldown
- Add GgmlTensorBridge implementation (src/storage/ggml_tensor_bridge.cpp):
  gated by THEMIS_ENABLE_GGML_BRIDGE; map()/mapAdapter()/prefetch()/releaseAll()/
  stats() wired; FakeTensor proxy + registerGgmlTypeTT() placeholder (stub #169)
- Add FR-01..FR-10 tests to tests/test_tensor_phase3.cpp
- Add THEMIS_ENABLE_GGML_BRIDGE CMake option; add flare_retrieval.cpp to core sources
- Mark FLARE as resolved in src/tensor/ROADMAP.md Phase 3 checklist
- Register STUB #168 (FlareRetrieval::buildQuery string mode) and
  STUB #169 (GgmlTensorBridge FakeTensor proxy) in src/STUB_INVENTORY.md

Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/72dcfd1e-ec61-4f70-9ab8-c48b1c848288

Co-authored-by: makr-code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants