The VVL language
A homoiconic Lisp syntax. 879 builtins. Twenty semantic operators. Neural and symbolic cohabit as first-class citizens.
Everything is a bracketed command
A single syntax rule — [command args…] — applies everywhere: a calculation, a class, a network call, an LLM query. Code is data: a list evaluates, or is quoted with the backtick to be handled as a syntax tree.
# Prefix form [command args…] — eager evaluation, innermost first [print [+ 1 2 3]] # → 6 # Variables ($), assignment (=), sugared infix arithmetic (…) $prix = 100 $ttc = ($prix * 1.20) # → 120.0 # Quasiquote (backtick) = literal data; unquote (,) injects a value $n = 5 `[1 ,$n ,[+ 1 2]] # → [1 5 3] # String interpolation: ${ VVL expression } $msg = "n*n = ${[* $n $n]}" # → "n*n = 25" # Dotted accessors, chainable $s = " 42 " $s.trim.int # → 42 # Lambda (params → $__name) + map / pmap (parallel) $double = [lambda [x] [* $__x 2]] [map $double `[1 2 3 4]] # → [2 4 6 8] [pmap $extract $documents] # N LLM calls in parallel
Four roles, zero pipeline
The LLM is not an external service: it is an operator of the language. The semantic operand [§ "..."] (type VVL_Semantic) flips the same dispatcher from arithmetic mode to neuro-symbolic mode: [§ "cat"] == [§ "feline"] returns 1. Four families, plus @.
Operator [§ "…"]
The semantic operand flips the same dispatcher from arithmetic to neuro-symbolic mode. Typed return: boolean, string or concept.
[§ "chat"] == [§ "félin"] # → 1 [§ "voiture"] + [§ "électrique"] # → electric car (concept)
Generator @
A description yields a VVL lambda validated by the parser and run in a sandbox (builtin whitelist). The LLM thinks once, the code runs N times.
$fn = ($orders @ [§ "total_amount > 1000"]) [filter $fn $orders] # local lambda, 0 LLM
Object [@ "name"]
A concept name materialises into a formal object (Zalta). A core of properties at bootstrap, lazy discovery afterwards, three-level cache → decreasing cost.
$soleil = [@ "Soleil"] $soleil.masse_kg # → 1.989e30 ($soleil ~~ "Étoile") # → ~0.95
Compiler §§ / generic
§§ compiles a plain-language question into a VVL program, runs it and returns the result. generic industrialises it into a named, tested, persisted keyword — reusable on other concepts.
[§§ "consommation BMW Série 3 diesel 2024 ?"] # → ~5.1 [generic "masse de @{Saturne} ?"] [get-mass-kg-of-concept "Jupiter"] # reusable
One language model, four distinct roles, zero integration pipeline. That is what makes VVL a neuro-symbolic language — not an API wrapper.
The twenty semantic operators
Activated by the [§ "…"] operand, these are the same operators as on numbers — the operand type makes them switch. Four families, plus @.
| Family | Operators | Output | Example → result |
|---|---|---|---|
1 · Fuzzy comparisons — boolean return, usable in if/filter |
== != < > <= >= | BOOLEAN | [§ "cat"] == [§ "feline"] → 1 |
| 2 · Conceptual algebra — arithmetic applied to concepts (semantic / string return) | + − * / % | SEMANTIC / STRING / APPROX | [§ "Paris"] % [§ "country"] → France |
| 3 · Semantic logic — composed conceptual expressions | && || ^^ ~ ? | SEMANTIC / STRING | $bio ? [§ "year of birth?"] → 1912 |
| 4 · Membership & inclusion — the IS-A relation as a first-class citizen (boolean return) | in <| |> | BOOLEAN | [§ "electric car"] <| [§ "vehicle"] → 1 |
| + · Code generation — the homoiconic culmination (detailed below) | @ | LAMBDA | $data @ [§ "filter by age"] → lambda |
Fine distinction: projection / extracts a dimension already contained in the description; property % queries the LLM general knowledge. Semantic results compose like arithmetic. Projected on a scale ([§ ["low" "mid" "high"]]), / returns a score: a calibrated position with its confidence.
Decide fast, reason when needed
With [semanticMode "jev"], typed decisions go first to Jev (TypeSafe AI): a model that does not write but decides — yes/no, choice, position on a scale — with a calibrated confidence, in ~0.4 s. When it hesitates (confidence below the threshold, 0.8 by default), the LLM takes over. Same syntax, same cache; every decision is traced in semantic.log (Semantic tab of :log).
[semanticMode "jev"] [§ "a trumpet"] == [§ "a refrigerator"] # → 0 (Jev, 0.4 s) [match [§ $ticket] [§ "Payments, refunds"] "billing" [§ "Bugs, outages"] "technical" "escalade"] # branch chosen by meaning ([§ $review] / [§ ["calm" "annoyed" "angry"]]) # → <approx: 1.99 [high]> [fuzzy:degree [§ $mail] "spam"] # → 0.98
Operators & match
Boolean operators always return 1/0. A [match] over [§ …] picks its branch by meaning; with tuples it becomes a decision table: one question per column, a single call.
Score & fuzzy degrees
Projected on a scale, / returns a calibrated position (Approximation). [fuzzy:degrees] measures several degrees in one call, ready for ~& and fuzzy:very.
Ontologies & Zalta
Jev picks the subclass of an extracted object and maps closed-list values; the ~~ similarity of rules decides all pairs in one call.
Router, agent, architect
The [§§] router classifies a question in ~0.4 s; the [agent] judge says “yes” without an LLM call; [architect] validates its steps with a degree instead of an agent loop.
AI cost pays once
How does a probabilistic system become as reliable as a native operator? Through four guarantees built into the engine — not left to the developer: (1) automatic output typing (you never parse a string), (2) a deterministic cache persisted to disk — same expression, same result across all sessions, API cost → 0 and reproducible tests, (3) validated retry until success, (4) few-shot XML specifications. Without typing you would parse; without the cache latency would be prohibitive; without retry the slightest model drift would break the program. It is the whole set that sets VVL apart from a mere wrapper.
From neural to guaranteed reasoning
The same language ships the symbolic side: guaranteed deductive reasoning, typed schemas and proven optimisation. Reified concepts become the operands of this algebra — this is the neuro-symbolic bridge.
Prolog base
An integrated deductive knowledge base. Objects are injected into it (obj-assert); inferences are guaranteed, not approximated.
Ontology system
Typed schemas, cascading business rules, and possible worlds (ontology fork) to reason under hypotheses. In jev mode, the subclass of an extracted object and its closed-list values are decided by Jev.
Zalta operators
Eight operators (4 operations × 2 symbolic/hybrid modes): a true algebra over concepts, free once the properties are loaded. The ~~ similarity on non-trivial values goes through Jev: all pairs in one call.
Relational miniKanren
Relations, not functions: a single definition resolves in every direction. Complete interleaved search, constraints (distinct, symbolic CLP) and a ProbLog-style probabilistic mode.
Proofs & contracts
A kernel settles propositions and answers proved, refuted or unknown — never a plausible yes. A function under contract has require ⇒ ensure checked statically, without running it.
Bayesian diagnosis
Every clause carries a Beta belief, not a boolean. When an observation contradicts the base, the engine computes the minimal conflicts and ranks the suspects by revocation cost.
CP-SAT solver
VVL exposes CP-SAT with a conceptual syntax (typed decisions, hard and soft constraints). A plain-language intent becomes a model with proven optimality.
A state that proves itself and replays
A [keyword] whose [contract] names a ledger becomes a smart contract: every call is a transaction, written in a chained, signed block. The conditions of the contract are proved before execution, checked at every call, and the whole history replays — all in the language, with no external blockchain.
[keyword transfer [contract [args from to [amount :type Integer :min 1]] [ledger bank] [state [src "account:{from}" :required] [dst "account:{to}" :required]] [require "amount <= src"] [ensure "src + dst = old(src) + old(dst)"]] [do [state:put src ([state:get src] - @3)] [state:put dst ([state:get dst] + @3)]]] [contract:verify transfer].status # → "proved" (for every state) [transfer "alice" "bob" 30] # → one signed block [transfer "alice" "bob" 500] # → refused, nothing written [ledger:verify bank].ok # → 1 (chain, signatures, full replay)
State & conditions
[state] declares the slots of the contract; [require] bears on the state before, [ensure] on the state after, old(x) links the two. A failing condition cancels the transaction: all or nothing.
Prove, then replay
[contract:verify] proves the contract for every state, by symbolic execution. [ledger:verify] re-executes each transaction with its original code; [ledger:proof] proves a value without the server.
Classes & oracles
A class bound by [ledger name :key …]: the object is the state, a method is a transaction. [oracle] writes the answer of an LLM in the block; it becomes binding and is never called again on replay.
Binding & distributed
The head is anchored at a third party (RFC 3161 time-stamping, Bitcoin). Cluster replicas re-execute every block, attest what they verified ([ledger:finality]) and detect a rewritten history.
Interpreted, compiled, then distributed
The same code moves from the interpreter to a native virtual machine, then across several machines — without being rewritten. What decides is not a setting but a verifiable property of the code: its purity.
Native VM
Code compiles to a Rust VM and stays inspectable: intermediate representation, bytecode, and above all coverage — what runs natively and what falls back to the host.
Hot compilation
A lambda that turns hot is compiled automatically after N calls. The threshold is read and set in one command; the vectorising tier of map toggles without a restart.
Compute cluster
A closed, pure function is addressed by its SHA-256, then executed as persistent shards across several instances. What does not compile does not ship: determinism is a condition, not a hope.
VVL vs Python + LangChain
| Criterion | Python + LangChain | VVL |
|---|---|---|
| The LLM as a language operator | API calls to parse | Native (20 operators) |
| Pipeline extraction → enrichment → decision | ~500 lines | ~40 lines |
| LLM-generated code, validated and executable | Validate it yourself | @: parser + sandbox + retry |
| NL → constraint-solver compilation | Not native | CP-SAT, proven optimality |
| Persistent semantic cache (cost → 0) | To be implemented | Built-in |
| LLM ↔ Prolog ↔ object bridge | Triple integration | First-class |
| Possible worlds (ontology fork) | Manual | ontology:* |
A single AI server, driven by a language whose paradigm is built for it. That is the difference between integrating AI and programming with it.