geographdb-core
3D spatial indexing and graph-storage primitives for CFG and graph analysis.
This crate provides octree indexing, Morton ordering, sectioned storage, CFG block storage, and graph algorithms for tools that model control-flow and graph structure geometrically.
Features
- Octree spatial indexing for 3D points and bounding boxes
- Morton code ordering for cache-friendly spatial locality
- Sectioned storage for graph, symbol, and CFG records
- CFG-oriented storage and query helpers
- Graph algorithms including A*, SCC, dominance, loops, slicing, and topological ordering
Code-Intelligence Use Case
Magellan stores control-flow blocks in 3D space:
- X = structural or dominance depth
- Y = loop nesting level
- Z = function or path grouping dimension
Tools can then query control-flow structure using geometric locality.
use ;
use NodePoint;
use Vec3;
let bounds = new;
let mut octree = new;
octree.insert;
octree.insert;
octree.insert;
let nearby = octree.query_sphere;
assert_eq!;
Installation
[]
= "0.1"
For local development with Magellan:
= { = "../geographdb-core" }
Scope
This crate contains the Rust core used for spatial CFG and graph storage. Language bindings and larger application crates are separate packages.
Public API Areas
spatial:Octree,BoundingBox, Morton encoding, and SIMD distance filtering.storage: sectioned.geostorage, sidecar path helpers, graph/CFG/symbol section adapters, and WAL records.cfg_store: high-level CFG block storage backed by spatial indexing.algorithms: graph algorithms for CFG analysis and path reasoning.
Feature Flags
telemetry: enables tracing and dashmap-backed instrumentation helpers.debug-prints: enables debug instrumentation points used during local investigation.
Documentation
- API.md describes the public modules and common types.
- MANUAL.md covers local development, verification, and publishing.
- CHANGELOG.md records release changes.
Verification
License
GPL-3.0-only. See LICENSE.