Skip to content

Commit e3b4262

Browse files
hyperpolymathclaude
andcommitted
refactor: rename FBQLdt to GQLdt across lithoglyph
Complete rename of the dependently-typed query layer from FBQLdt (FormDB Query Language) to GQLdt (Graph Query Language) reflecting Lithoglyph's pivot from FormDB to graph-native storage. Includes: Lean 4 sources, Idris2 ABI, Zig bridge, test vectors, ReScript clients, CI workflows, docs, and container configs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d0a0246 commit e3b4262

254 files changed

Lines changed: 3504 additions & 3584 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lithoglyph/.claude/CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Multi-language stack in dependency order:
99
2. **Zig** (core-zig/) — C ABI bridge with WAL, 19 functions, block allocator
1010
3. **Zig** (ffi/zig/) — Delegation layer that forwards to core-zig
1111
4. **Idris2** (src/Lith/) — Dependent-type ABI proofs, memory layout verification
12-
5. **Factor** (core-factor/) — FQL runtime: parser, planner, executor
12+
5. **Factor** (core-factor/) — GQL runtime: parser, planner, executor
1313
6. **Lean 4** (normalizer/) — Normalization proofs, FD discovery (52 proofs)
1414
7. **Lean 4** (gql-dt/) — Dependently-typed Glyph Query Language
1515
8. **Zig + Rust** (beam/) — BEAM NIFs for Elixir/Erlang integration
@@ -27,7 +27,7 @@ svalinn (TLS) → lith-http (Elixir :4000) → BEAM NIFs → core-zig (C ABI)
2727
Idris2 ABI proofs (src/Lith/) verify bridge contracts
2828
Lean 4 normalizer verifies schema correctness
2929
GQL-DT (Lean 4) verifies query correctness
30-
Factor FQL plans and executes queries
30+
Factor GQL plans and executes queries
3131
```
3232

3333
## Critical Invariants
@@ -61,7 +61,7 @@ svalinn (TLS) → lith-http (Elixir :4000) → BEAM NIFs → core-zig (C ABI)
6161
- **Zig** — Bridge, BEAM NIF, API layer
6262
- **Idris2** — ABI proofs (dependent types)
6363
- **Lean 4** — Normalization proofs, GQL-DT
64-
- **Factor**FQL runtime (concatenative)
64+
- **Factor**GQL runtime (concatenative)
6565
- **Elixir** — OTP control plane, HTTP API
6666
- **Rust** — BEAM NIF (Rustler), studio backend
6767
- **ReScript** — Client libraries (if needed)
@@ -128,7 +128,7 @@ just build-all # everything in dependency order
128128
| ffi/zig | PASS | PASS | Delegates to core-zig |
129129
| Idris2 ABI | PASS | N/A | 3 files type-check clean, 0 believe_me |
130130
| Lean 4 normalizer | PASS | 52 PASS | FD discovery proofs |
131-
| core-factor | PASS | N/A | FQL parser/planner/executor |
131+
| core-factor | PASS | N/A | GQL parser/planner/executor |
132132
| BEAM NIF (Zig) | PASS | N/A | Real FFI calls |
133133
| BEAM NIF (Rust) | PASS | N/A | Rustler 0.35, 0 warnings |
134134
| lith-http | PASS | PASS | M15 complete |

lithoglyph/.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
- name: Verify ABI exports
119119
working-directory: core-zig
120120
run: |
121-
nm -D zig-out/lib/liblith_bridge.so | grep -q 'fdb_db_open'
122-
nm -D zig-out/lib/liblith_bridge.so | grep -q 'fdb_apply'
123-
nm -D zig-out/lib/liblith_bridge.so | grep -q 'fdb_version'
124-
nm -D zig-out/lib/liblith_bridge.so | grep -q 'fdb_introspect_schema'
121+
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_db_open'
122+
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_apply'
123+
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_version'
124+
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_introspect_schema'

lithoglyph/.github/workflows/test-suite.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ jobs:
112112
working-directory: core-zig
113113
run: |
114114
echo "=== ABI Export Check ==="
115-
nm -D zig-out/lib/liblith_bridge.so | grep ' T fdb_' | sort
116-
nm -D zig-out/lib/liblith_bridge.so | grep -q 'fdb_db_open'
117-
nm -D zig-out/lib/liblith_bridge.so | grep -q 'fdb_apply'
118-
nm -D zig-out/lib/liblith_bridge.so | grep -q 'fdb_introspect_schema'
115+
nm -D zig-out/lib/liblith_bridge.so | grep ' T lith_' | sort
116+
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_db_open'
117+
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_apply'
118+
nm -D zig-out/lib/liblith_bridge.so | grep -q 'lith_introspect_schema'
119119
echo "All expected ABI exports present"
120120
121121
test-lean:

lithoglyph/.github/workflows/zig-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ jobs:
9999
100100
# Generate symbol list
101101
zig build-lib src/bridge.zig -O ReleaseFast
102-
nm -D libbridge.so | grep "fdb_" | head -20
102+
nm -D libbridge.so | grep "lith_" | head -20
103103
104104
# Verify key exports
105-
if nm -D libbridge.so | grep -q "fdb_db_open"; then
106-
echo "✅ fdb_db_open exported"
105+
if nm -D libbridge.so | grep -q "lith_db_open"; then
106+
echo "✅ lith_db_open exported"
107107
else
108-
echo "❌ fdb_db_open missing"
108+
echo "❌ lith_db_open missing"
109109
exit 1
110110
fi
111111
112-
if nm -D libbridge.so | grep -q "fdb_apply"; then
113-
echo "✅ fdb_apply exported"
112+
if nm -D libbridge.so | grep -q "lith_apply"; then
113+
echo "✅ lith_apply exported"
114114
else
115-
echo "❌ fdb_apply missing"
115+
echo "❌ lith_apply missing"
116116
exit 1
117117
fi
118118

lithoglyph/.machine_readable/AGENTIC.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
(role . "Autonomous normalization and functional dependency discovery")
3939
(capabilities
4040
"- Run Lean 4 normalization proofs on schema changes
41-
- Discover functional dependencies via Factor FQL runtime
41+
- Discover functional dependencies via Factor GQL runtime
4242
- Suggest schema improvements based on FD analysis
4343
- Verify normalization forms (1NF through BCNF)")
4444
(decision-making

lithoglyph/.machine_readable/ECOSYSTEM.scm

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323

2424
(related-projects
2525
;; Core ecosystem - Sibling projects
26-
(fbql-dt
26+
(gql-dt
2727
(relationship "sibling-language")
28-
(repo "github.com/hyperpolymath/fbql-dt")
28+
(repo "github.com/hyperpolymath/gql-dt")
2929
(status "implementation-in-progress")
3030
(completion 75)
31-
(description "FBQLdt: Dependently-Typed Lith Query Language. Lean 4 implementation
31+
(description "GQLdt: Dependently-Typed Lith Query Language. Lean 4 implementation
3232
with compile-time type checking, refinement types, and proof-carrying
33-
migrations. Two-tier design: FBQLdt (admin) and FBQL (user-friendly).")
33+
migrations. Two-tier design: GQLdt (admin) and GQL (user-friendly).")
3434
(tech-stack "Lean 4 + Idris2 ABI + Zig FFI + ReScript bindings")
3535
(integration-points
3636
(type-system "BoundedNat, BoundedInt, NonEmptyString, Confidence, PromptScores")
@@ -39,9 +39,9 @@
3939
(parser "Complete parser for INSERT/SELECT/UPDATE/DELETE with type inference")
4040
(permissions "Two-tier permission system with TypeWhitelist"))
4141
(alignment-status
42-
(fundep-types "Lith should adopt schema-bound FunDep S type from fbql-dt")
43-
(proofs "Waiting for fbql-dt M7 (Idris2 ABI) + M8 (Zig FFI)")
44-
(bindings "Waiting for fbql-dt M9 (ReScript bindings)")
42+
(fundep-types "Lith should adopt schema-bound FunDep S type from gql-dt")
43+
(proofs "Waiting for gql-dt M7 (Idris2 ABI) + M8 (Zig FFI)")
44+
(bindings "Waiting for gql-dt M9 (ReScript bindings)")
4545
(ffi "Compatible - both use CBOR-encoded proof blobs via Zig FFI")))
4646

4747
(formbase
@@ -61,20 +61,20 @@
6161
(repo "github.com/hyperpolymath/lithoglyph-studio")
6262
(status "planned")
6363
(description "Zero-friction admin GUI for Lith. Visual schema designer,
64-
FQL query builder, provenance explorer, journal viewer, and
64+
GQL query builder, provenance explorer, journal viewer, and
6565
normalization proof visualizer."))
6666

6767
(lithoglyph-debugger
6868
(relationship "sibling-tool")
6969
(repo "github.com/hyperpolymath/lithoglyph-debugger")
7070
(status "scaffolding-complete")
7171
(completion 35)
72-
(description "Proof-carrying debugger. Step through FQL queries, inspect
72+
(description "Proof-carrying debugger. Step through GQL queries, inspect
7373
constraint violations, visualize normalization proofs, and
7474
explore journal replay scenarios.")
7575
(alignment-status
7676
(journal-types "Need Migration/NormalizationStep entry types from Lith")
77-
(provenance "Need Confidence + ProofBlob types from fbql-dt")
77+
(provenance "Need Confidence + ProofBlob types from gql-dt")
7878
(proofs "LosslessProof stubs need real Lean 4 implementations")))
7979

8080
(lithoglyph-analytics
@@ -154,16 +154,16 @@
154154

155155
(what-this-is
156156
"A database engine that treats data history as sacred"
157-
"A query language (FBQL/FBQLdt) designed for provenance and narrative"
157+
"A query language (GQL/GQLdt) designed for provenance and narrative"
158158
"A storage format (blocks + journal) optimized for auditability"
159159
"A philosophy: databases should explain themselves"
160160
"An ecosystem of tools for narrative-first data management"
161161
"Layered architecture: Forth (storage) + Zig (FFI) + Factor (runtime) + Elixir (clustering)"
162-
"Integration with formal methods: Lean 4 via fbql-dt for proof-carrying migrations"
162+
"Integration with formal methods: Lean 4 via gql-dt for proof-carrying migrations"
163163
"Open source under PMPL-1.0-or-later (Palimpsest License)")
164164

165165
(what-this-is-not
166-
"Not a drop-in SQL replacement (FBQL is intentionally different)"
166+
"Not a drop-in SQL replacement (GQL is intentionally different)"
167167
"Not optimized for OLAP workloads (narrative overhead, use lithoglyph-analytics for that)"
168168
"Not a distributed database yet (single-node PoC complete, clustering in M14)"
169169
"Not a real-time streaming platform (use CDC integration for streaming)"

0 commit comments

Comments
 (0)