VCL (VeriSim Consonance Language) is the query language for VeriSimDB, an eight-modality database. While VCL borrows familiar keywords from SQL (SELECT, FROM, WHERE, LIMIT, OFFSET), it serves a fundamentally different purpose.
VCL’s preferred write path is the Octad API (Rust core or Elixir orchestration layer), not the language. VeriSimDB treats writes as coordinated multi-modal operations that must maintain consistency across all eight modality stores (Graph, Vector, Tensor, Semantic, Document, Temporal, Provenance, Spatial), and a bare INSERT cannot by itself express the cross-modal invariants an octad write requires.
That said, VCL is not read-only. An earlier revision of this page said it was; the normative grammar and the implemented parser disagree, and VCL-SPEC.adoc lists the "read-only" description as a known inconsistency resolved in favour of the implementation. spec/grammar.ebnf v3.0 defines statement = query | mutation ; with INSERT HEXAD, UPDATE HEXAD … SET … and DELETE HEXAD …, each accepting an optional PROOF clause; src/vcl/VCLParser.affine implements all three and src/vcl/VCLBidir.affine type-checks them. These SQL-shaped mutation forms are retained for backward compatibility. For verified cross-modal writes, use the Octad API or attach a PROOF clause.
VCL is multimodal. Where SQL selects columns from relational tables, VCL selects modalities from octad stores or federations. A single VCL query can retrieve graph edges, vector embeddings, tensor slices, semantic annotations, document text, and temporal versions in one pass.
VCL is federation-aware. Queries can target a local STORE, a specific HEXAD entity, or a FEDERATION of distributed VeriSimDB instances, with configurable drift policies governing cross-instance consistency.
| Concept | VCL | SQL |
|---|---|---|
Column/Field Selection |
|
|
Data Source |
|
|
Filtering |
|
|
Joins |
No JOINs. Graph modality replaces relational joins entirely. Relationships are first-class: |
|
Mutations |
Legacy SQL-shaped forms exist ( |
|
Verification |
|
No equivalent. SQL has no mechanism for cryptographic or type-theoretic verification of query results. |
Pagination |
|
|
VCL is intentionally minimal. The table below records the actual status of each
SQL feature against spec/grammar.ebnf v3.0.
|
Note
|
Four rows in this table — GROUP BY, ORDER BY, aggregate functions and
HAVING — previously read "Not supported". They are supported: the grammar
defines group_by_clause, order_by_clause, having_clause and
aggregate_func = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX'. Those claims were
correct for VCL v1.0 and were left behind when v2.0 added them; the correction
closes item 1 of the known-inconsistencies list in VCL-SPEC.adoc.
The remaining rows are genuinely absent from the grammar.
|
| SQL Feature | VCL Status |
|---|---|
Supported ( |
Supported ( |
Supported (`aggregate_expr = count_all |
aggregate_field`; `aggregate_func = 'COUNT' |
'SUM' |
'AVG' |
'MIN' |
'MAX'`). |
Subqueries |
Not supported. Queries are flat. Compose results in application code or use the Elixir query router for multi-step workflows. |
|
Not supported. Octad entities are inherently unique (UUID-addressed), so deduplication is rarely needed. |
Supported ( |
|
Not supported. Use multiple queries and combine results application-side. |
|
Not supported. Schema is managed through the AffineScript registry ( |
Window functions ( |
Not supported. |
Stored procedures / triggers |
| VCL Feature | Description |
|---|---|
|
Requests a verifiable proof certificate alongside query results. Six proof types ( |
Multimodal |
Select specific modalities ( |
|
Target distributed VeriSimDB instances: |
Drift policies |
|
Octad entity addressing |
|
Graph traversal syntax |
Cypher-inspired patterns directly in |
Vector similarity |
|
Full-text predicates |
|
SQL:
SELECT *
FROM entities
WHERE id = '550e8400-e29b-81d4-a716-446655440000';VCL (Slipstream):
SELECT *
FROM HEXAD 550e8400-e29b-81d4-a716-446655440000The VCL version returns all eight modalities for that octad. The SQL version returns only the columns in the entities table.
SQL (requires JOIN):
SELECT e2.*
FROM entities e1
JOIN relationships r ON e1.id = r.source_id
JOIN entities e2 ON r.target_id = e2.id
WHERE e1.id = '550e8400-e29b-81d4-a716-446655440000'
AND r.type = 'CITES';VCL (graph traversal):
SELECT GRAPH
FROM HEXAD 550e8400-e29b-81d4-a716-446655440000
WHERE (h)-[:CITES]->(target)VCL eliminates the triple-table JOIN pattern entirely. Graph relationships are native.
SQL (PostgreSQL example):
SELECT *
FROM documents
WHERE to_tsvector('english', content) @@ to_tsquery('quantum & computing');VCL:
SELECT DOCUMENT
FROM STORE research_papers
WHERE CONTAINS(h.content, "quantum computing")
LIMIT 20SQL (requires pgvector extension):
SELECT *, embedding <-> '[0.1, 0.2, 0.3, 0.4]' AS distance
FROM entities
ORDER BY embedding <-> '[0.1, 0.2, 0.3, 0.4]'
LIMIT 10;VCL:
SELECT VECTOR
FROM STORE research_papers
WHERE h.embedding SIMILAR TO [0.1, 0.2, 0.3, 0.4]
LIMIT 10| Capability | SQL | VCL |
|---|---|---|
Relational queries |
Yes |
No |
Multimodal queries |
No |
Yes |
Mutations (INSERT/UPDATE/DELETE) |
Yes |
Legacy forms; Octad API preferred |
JOINs |
Yes |
No (graph modality) |
Aggregation (GROUP BY, COUNT, SUM) |
Yes |
Yes |
Subqueries |
Yes |
No |
PROOF verification |
No |
Yes |
Federation with drift policies |
No |
Yes |
Graph traversal |
No (or extensions) |
Yes (native) |
Vector similarity |
No (or extensions) |
Yes (native) |
Full-text search |
Extensions |
Yes (native) |
Ordering (ORDER BY) |
Yes |
Yes |
Pagination (LIMIT/OFFSET) |
Yes |
Yes |
VCL is not a replacement for SQL. It is a purpose-built query language for a multimodal database that treats entities as eight simultaneous modal representations (an octad) rather than rows in flat tables. Use SQL when you need relational algebra. Use VCL when you need to query across modalities with optional formal verification.