Implementation map
Complete src/ Module Reference
Every tracked Prolog source file in the current AsaDB repository.
This source-tree map is a technical reference. Each file name links to the authoritative implementation; the focused guides cover storage, Reservoir, and operations in more detail.
| Source file | Layer | Responsibility |
|---|---|---|
asa_portable.pl ↗ | Portable entry | Dispatches panel, web, CLI, REPL, and help modes; supports optional browser launch and free-port selection. |
asadb.pl ↗ | CLI | Runs SQL scripts or an interactive REPL against a selected database. |
asadb_core.pl ↗ | SQL core | Boot, catalog, lexer/parser, AST execution, analysis, transactions/permissions, recovery hooks, results, and simple planner counters. |
asadb_mysql55_compat.pl ↗ | Compatibility map | MySQL 5.5-oriented statement/type inventory: implemented, metadata stub, parsed stub, or planned. It is a roadmap/diagnostic manifest, not the live parser. |
asadb_config.pl ↗ | Configuration | Loads asadb.conf; validates buffer, import, result, cache, and Reservoir limits while preserving 4,096-byte pages. |
asadb_metadata.pl ↗ | Metadata | Manages .asa.meta identity, versions, timestamps, checkpoints, and atomic temporary/backup replacement. |
asadb_page_manager.pl ↗ | Page format | Defines fixed 4 KiB ASPG slotted pages, headers, slots, free space, sibling pointers, checksums, record changes, and validation. |
asadb_pager.pl ↗ | Disk pager | Fixed-offset read/write/allocate/scan operations, buffer-pool routing, invalidation, and dirty-page flushing. |
asadb_buffer_pool.pl ↗ | Cache | Bounded pages with pin/unpin, dirty state, flushing, hit/miss/eviction statistics, and Clock/LRU replacement. |
asadb_record_manager.pl ↗ | Records/recovery | Heap files, typed rows, RIDs, scans, append/update/delete/rewrite, index invalidation, snapshots, undo, backups, and recovery. |
asadb_btree.pl ↗ | Indexing | Compatibility tree and persistent B+Tree internal/leaf pages, linked leaves, equality/range lookup, ordered traversal, and external bulk build. |
asadb_web.pl ↗ | Local HTTP | Localhost-only AsAPanel host, security headers/token handling, catalog/query/import APIs, and Reservoir job/result/cancel/stats routes. |
asadb_release.pl ↗ | Build helper | Creates the SWI-Prolog saved-state CLI program for release packaging. |
bridge/reservoir.pl ↗ | Durable bridge | Bounded admission, durable spool, fingerprint/idempotency, one worker, snapshots, result pages, cancellation, TTL cleanup, and restart recovery. |
bridge/karyawan.pl ↗ | Queue adviser | Pure-Prolog ingress chunking, egress-page, pressure, health, and one-worker queue advice; not another executor and no R runtime. |
bridge/horsemen/…/yoru_the_wardevil.pl ↗ | Process Guardian | SHA-256 rolling mirrors, manifest/state JSON, bounded log, heartbeat audits, optional child supervision, Unix CONT nudges, and bounded exponential restart. |
The current inventory contains these 16 Prolog files. For tests, scripts, assets, packaging, and repository layout, consult the upstream README ↗ and architecture guide ↗.
