— book —

Neuro-Symbolic Programming in the VVL language

Principles
Language
Algebra
Planning
& Applications
VAILS · VVL 7.4.88
VVL
VAILS
— technical book —

Neuro-symbolic programming in VVL

From natural language to verified plans.
9
parts
40
chapters
+1
appendix
800
builtins
~95%
N-S fidelity

This book introduces VVL, a formal and executable language designed to bridge the understanding of natural language with the power of planners and solvers. It lays out a complete neuro-symbolic approach, from free-form text to verified plans — by way of Frege's logic, Edward Zalta's ontology, the Prolog bridge, native RAG and compilation down to CP-SAT.

Download the PDF (49 MB) Start reading Builtins appendix
I.

History and foundations

3 chapters (1–3) · 32 pages · from symbolic AI to neuro-symbolic
1Chapitre

History of AI paradigms

A reasoned chronology — symbolic, connectionist, statistical, deep learning

Retraces the great eras of artificial intelligence: the symbolic age (1960-80, MYCIN, Prolog), the connectionist era (1980-2000), the statistical reign (2000-2015), then the rise of Deep Learning and LLMs (2015 to today). Highlights the strengths and weaknesses of each paradigm and the emergence of the neuro-symbolic need as a necessary synthesis.

MYCINPrologConnexionnismeLLM
2Chapitre

Theoretical foundations of neuro-symbolic

Frege, Zalta and the oscillation pattern

Presents Frege's logic as the formalization bedrock, Edward Zalta's theory of abstract objects as the ontological framework, and the oscillation pattern between neural and symbolic layers. Lays down the technical requirements: first-class integration of both worlds, object sharing, traceability.

FregeZaltaOscillationPremière classe
3Chapitre

VAILS and VVL: a language designed for neuro-symbolic

The ecosystem, the Lisp-like syntax, homoiconicity

Introduces the ecosystem: the goal of a language where neural and symbolic cohabit as first-class citizens, the choice of a Lisp-like syntax (homoiconicity as keystone), a direct comparison with Python+LangChain — why ~99% LLM-valid syntax versus 80-90% for Python.

LispHomoiconicitévs LangChain
II.

The VVL language

3 chapters (4–6) · 32 pages · syntax, functional, unified OO
4Chapitre

Fundamental syntax and types

The grammar in a few pages

Prefix form [op args], infix operators, quasiquote/unquote, ${...} interpolation, primitive types, dotted accessors, assignment convention $var = expr. All of VVL fits in a compact yet expressive grammar.

PréfixeQuasiquoteInterpolationAccesseurs pointés
5Chapitre

Functional programming

Lambdas, higher-order, parallelism, lazy

Lambdas, map / filter / reduce, for, pmap for parallelism, lazy evaluation, tolerance operators ~> that turn any exception into an inspectable fallback value.

Lambdaspmap~>Lazy
6Chapitre

Object-oriented programming

Classes, mixins with MRO, protocols

A unified OO system around VVL_Instance: classes, inheritance, mixins (with method resolution order), protocols (interfaces), dynamic methods. Lays the groundwork for the ontology and reified-concept chapters that follow.

VVL_InstanceMixinsMROProtocoles
III.

LLM co-processor

4 chapters (7–10) · 47 pages · 20 semantic operators, generation, reification
7Chapitre

The semantic operators (twenty of them)

Neural algebra as first-class citizens

A complete tour of the twenty neuro-symbolic operators: /, %, ?, ~~, *, +, == and their cousins. Transparent semantic cache, order-insensitive memoization: the machine learns to recognize that two equivalent queries are equivalent.

20 opérateursCache sémantiqueMémoïsation
8Chapitre

Code generation by LLM: operator @

First level of programmable autonomy

One-shot generation of a lambda from an example plus a description, then repeated local execution without a new LLM call. The cost of AI is paid once; execution then follows the rigour of a compiled binary.

@LambdaLocal
9Chapitre

Concept reification [@ "..."]

From name to manipulable concept

Turning a concept name into a manipulable VVL_ConceptEntity object. Properties discovered lazily (lazy loading), three-level cache (memory / object / disk), lazy versus bootstrap modes to either preheat or discover on the fly.

VVL_ConceptEntityLazyCache 3 niveaux
10Chapitre

The §§ operator: NL compilation + [generic]

From French to executable VVL

NL→VVL→execution resolution, memorization in a persistent keyword catalogue, validation by tests. A command expressed in natural language becomes a reusable function, indexed and tested.

§§NL→VVLCatalogue
IV.

Symbolic bridge

3 chapters (11–13) · 30 pages · Prolog, ontologies, Zalta operators
11Chapitre

The Prolog knowledge base

Prolog as a first-class citizen

The VVL triangle: LLM ↔ OO ↔ Prolog. Facts, rules, queries, six query modes, the obj-assert bridge that projects any VVL instance into Prolog facts. The logic engine talks directly to objects and LLMs.

Triangle VVLobj-assert6 modes
12Chapitre

The ontology system

Schemas, rules, possible worlds

ontology:define with annotations (required, default, min, max, type, enum), fromText and fromImage for automatic extraction, ontology:rule with priorities, infer versus infer-fixpoint (cascading to a fixed point), ephemeral worlds ontology:in-world with fork and auto-restore.

ontology:defineinfer-fixpointMondesPriorités
13Chapitre

The algebra of Zalta operators

Eight operators in four pairs

Four symbolic/hybrid pairs (==/~~, */**, +/++, / / //), implemented as the ZaltaOperators mixin, dispatched via MRO. ~~ with four matching levels, holistic IS-A mode with a single LLM call per concept pair.

8 opérateursZaltaOperatorsIS-A holistique
V.

Neural bridge

4 chapters (14–17) · 43 pages · RAG, extraction, Gherkin, induction
14Chapitre

RAG and semantic search

A full three-phase pipeline

Indexing, retrieval, generation. Twenty-four RAG builtins, four query modes: free ragSearchContext, ragAskSimple, hybrid ragAsk, ragExtractJson. The genius façade to query the VVL documentation itself.

24 builtins4 modesgenius
15Chapitre

Structured extraction by LLM

40 lines instead of 500

Three semantic extraction operators: / list, % object, ? question/answer. Pattern [JSON [STRING source / [§ "..."]]], AI vision via pdfToImages, the distinction between free extraction and typed ontology:fromText. A seven-step e-commerce pipeline in forty lines vs. five hundred in Python.

/ % ?pdfToImages40 lignes
16Chapitre

Gherkin and dynamic ontology

From written schema to inferred schema

A paradigm inversion: you no longer describe the schema, you let it be inferred. Gherkin format (Background + Scenarios), ontology:loadGherkin (transpilation), ontology:context (inference from samples). A five-phase neuro-symbolic pipeline, continuous self-learning.

GherkinSchéma déduit5 phases
17Chapitre

Inductive learning of rules

Conjecture vs. proof

Deduction (Prolog, proves) versus induction (LLM, conjectures). Three quality axes of a dataset: variation, complexity, length. Free vs. targeted induction with target_feature, 70/30 cross-validation, conflict management with manual rules via priorities, continuous induction pattern.

Inductiontarget_feature70/30
VI.

Pipelines in practice

4 chapters (18–21) · 41 pages · oscillation, medical, construction, fraud
18Chapitre

The formalized neuro-symbolic oscillation

Four authentic properties, four canonical patterns

Regular alternation, object sharing, traceability, complementarity. An elementary four-phase cycle (Define-Extract-Infer-Synthesize), four canonical patterns. Cost/latency/fidelity metrics: monolithic LLM 70-85%, RAG 85-90%, full neuro-symbolic ≥95%.

DEIS4 patterns≥95%
19Chapitre

Medical differential diagnosis

A hundred lines for five syndromes

A complete hundred-line system based on the Zalta-medical tutorial. Mapping syndrome=abstract / patient=concrete / diagnosis=satisfies. A Patient schema (16 categorical attributes) + 5 archetypes (Flu, COVID-19, Pneumonia, Allergy, Embolism), a 5×5 scoring matrix, priority rules (SpO2Alert, AgeRisk, CriticalRisk), therapeutic simulation through possible worlds.

Zalta-médical5 archétypesMondes possibles
20Chapitre

End-to-end construction estimating system

54 historical PDFs, 100% accuracy

A four-file architecture (config / learn / generate / batch_classify), three lazy-mode Zalta archetypes (TERRACE, REPAIR, COOLROOF). Initial learning over 54 historical PDFs, on-demand generation with two LLM calls, a priced quote “25 m² → €18,000 ex-VAT / €19,800 incl-VAT”. Observed distribution 38/10/6 (100% accuracy), four Zalta levels of understanding.

54 PDF3 archétypes100% précision
21Chapitre

Transactional fraud detection

Real time, <100ms, PSD2

Real-time constraints (latency <100ms, thousands of transactions/second, PSD2 compliance). A Transaction ontology with extracted versus inferred attributes. A three-rule cascade with HIGH→MEDIUM protection, performance via semantic cache + pmap concurrency (factor 1000 sequential→parallel+cache), resilience through a ~> circuit-breaker with regex fallback and try/catch isolation.

<100msDSP2×1000Circuit-breaker
VII.

Autonomy & advanced systems

6 chapters (22–27) · 84 pages · agents, atoms, fuzzy expert, constraints, genetic, ILP
22Chapitre

Autonomous agents: [agent] and [architect]

Three levels of programmable autonomy

@ = a lambda. [agent] = a ReAct loop. [architect] = multi-agent orchestration. A detailed Reason-Act-Observe-Feedback loop, four agent + VVL composition patterns. A contract-analysis case study (architect orchestrates extraction + parallel evaluations + synthesis). Homoiconicity as the keystone (~99% valid syntax vs 80-90% Python).

[agent][architect]ReAct~99%
23Chapitre

The atom protocol

Gating, policies and audit — a unified introspection layer

Every VVL object becomes an “atom” that is classable, hashable, traceable and policy-gateable: atom:trace, policy:check. An introspection layer that gives computable content to neuro-symbolic discourse and lets you gate generated candidates. Experimental status (branch experimental-grounded-protocol) — to be checked in the stable registry depending on the server version.

atom:tracepolicy:checkgatingexpérimental
24Chapitre

Expert system and fuzzy logic

T-norms, hedges, one-shot NL bootstrap

Four infix fuzzy operators (~&, ~|, ~!, ≈>), three T-norm families (Zadeh idempotent default, probabilistic for independent evidence, Łukasiewicz for strict logic). Linguistic hedges (very x², extremely x⁴, somewhat √x, slightly x^(1/3)), aggregators (wmean, most, few). The [fuzzy:ontology] / [fuzzy:rule] / [expert] commands compile NL → ontology + rules + operational keyword. Persistence via expert:save/load/list, a multi-decision ticket-triage case study.

~& ~| ~!T-normesHedges[expert]
25Chapitre

Constraint optimization

Compiling VVL to CP-SAT — and operational planning

A layered architecture: conceptual VVL → compiler → CP-SAT/OR-Tools. Four principles: exposed backend, semantic resolution at compile-time, inspectable artifacts, layered NL→VVL. Twelve body forms (decision, assert, soft, maximize, intent, lexicographic, all-different, cumulative, circuit, instance, for, scale), three decision types (Integer, Enum, Fuzzy), why-infeasible diagnosis. Extended by the planning:* DSL (tasks, resources, horizon, geography geo:*) which desugars into optimize:* and reifies assignments.

CP-SATOR-Tools12 formesplanning:*why-infeasible
26Chapitre

Genetic algorithms

Black-box optimisation of discrete structures — population, fitness, evolution

Evolution of discrete structures: genetic:population, genetic:evolve, genetic:best, genetic:lineage. Counter-store and human corrections (genetic:add-counter, genetic:fit-with-counter), a genetic:pareto front, traced atoms and policy gating. The system becomes self-improving.

genetic:evolvecounter-storePareto
27Chapitre

ILP: inductive logic programming

Sound & complete rule induction (Learning From Failures)

Learning multi-clause logic programs from positive/negative examples: Learning From Failures (LFF), search bias, θ-subsumption, greedy set-cover, ilp:learn. LLM bootstrap (ilp:propose-bias, ilp:seed-hypotheses), counter-examples and a genetic bridge (ilp:learn-with-counter, ilp:refine-with-ga). A third rule-learning mode, sound & complete, complementary to LLM induction (ch. 17) and genetic (ch. 26).

ilp:learnLFFθ-subsomptionsound & complete
VIII.

The language in depth

7 chapters (28–34) · 133 pages · the infrastructure that makes VVL a platform
28Chapitre

Metaprogramming, homoiconicity & REBOL helpers

Code as data

The reflexive kernel: quote, load, evaluate, execute, dump, type-of, inspectWord. The metaprogramming triangle (deferred storage then substitution-evaluation) and the REBOL helpers: collect/keep, attempt (error-as-data), object. Without this layer, code generated by an agent would stay inert.

quoteevaluatecollect/keepattempt
29Chapitre

Dialects: declarative parsing and embedded DSLs

Parsing business DSLs

dialect:parse: defining and invoking grammars to parse business DSLs. The dialect extends the language's named data (inspectable), complementary to match/load. This is what makes NL → expert-system compilation transparent.

dialect:parseDSLvalidation au parse
30Chapitre

Modules: namespaces and reusable packages

Organizing and exporting native VVL code

module:def, [export …], isolated scope and qualified access Module:command. The extension triptych: the dialect extends data, the module extends commands in native VVL, the plugin extends commands in signed external code.

module:defexportscope isolé
31Chapitre

Typed scalar values

Validation at construction

EMAIL, URL, DATE, UUID, MONEY, DURATION, DATETIME: validation at construction, mold/form, round-trip and normalization. The division of labour: typed value vs ontological concept vs dialect.

EMAIL · URL · DATEmold/formround-trip
32Chapitre

Integrated tests & formal auditability

The non-throwing test framework

test:assert, test:equals, test:suite, test:summary: non-throwing suites to audit induced rules (ch. 17, 26, 27). When the classic assertion remains appropriate: production invariants via error. Distinguishing test:* / try / attempt / error.

test:suitenon-throwingaudit des règles
33Chapitre

Ed25519-signed plugins

The chain of trust for external code

An author / administrator / workspace trust flow, a key store, double anti-TOCTOU guarding. The Ed25519 cryptographic model: offline signing, canonical digest, graceful degradation. The .vvlplugin bundle (manifest, entry, signature) and the SDK.

Ed25519anti-TOCTOU.vvlplugin
34Chapitre

Platform synthesis

Three rule-writing paradigms, seven layers

A final overview: the three rule-writing paradigms (Prolog deduction, LLM/ILP induction, constraints) and the seven layers of the platform. VVL moves from the status of a complete language to that of a composable, organizable, auditable and extensible platform.

3 paradigmes7 couchesplateforme
IX.

Runtime extensions

6 chapters (35–40) · 88 pages · Bayesian, symbolic computation, proof, relational, VM, cluster
35Chapitre

Bayesian stochastic annotation

The fourth path of learning — from scalar weight to Beta belief

A clause no longer carries a weight but a belief: a Beta distribution with its concentration. The chapter covers the five sources of priors, the generative model, learning by Gibbs sampling, exact negation, and prediction with uncertainty propagation — then places this fourth paradigm alongside the language's three other learning paths.

Croyance BetaGibbsPriorsIncertitude
36Chapitre

Symbolic computation as a first-class citizen

√2 stays √2 — the VVL_Sym type and exact arithmetic

The gap closed: no more silent rounding. The VVL_Sym type becomes a first-class citizen, with its syntactic sugar, lazy binding and transparent native arithmetic. The chapter catalogues the builtins (elementary computation, linear algebra, ODEs), describes the bridge to approximation — the "exact" confidence level — and the safety of the AST sandbox.

VVL_SymSymPyExactSandbox AST
37Chapitre

Native formal proof

The de Bruijn criterion: finding is not verifying

The LLM proposes, the kernel disposes. The chapter builds the stack layer by layer: the proposition as data, the fragment router, the trust kernel, then the loop where the model proposes a proof term that the kernel checks. It closes on function contracts, class invariants and graded provenance — leaving all-or-nothing behind.

de BruijnNoyau LCFContratsProvenance
38Chapitre

Embedded miniKanren

Relational logic as a citizen of the language

Goals are inert, the solver solves. Unification, completeness by interleaving, recursive and reversible relations, committed choice — the cut without the impurity. Then the constraint store (disequality, order, types, domains), CLP through SymPy, the bridges to the Prolog KB, to OO and to CSV, the ProbLog-style probabilistic version, and relational eval: program synthesis and quines.

UnificationRéversibleContraintesProbLog
39Chapitre

The Rust VM: computation goes native

One language, an explicit operator, a measured coverage

The coverage diagnosis, then the parity campaign and its catalogue of divergences — including two host bugs revealed by a native SLD Prolog engine. Exact arithmetic (bignum, promotion, demotion), native metaprogramming, native objects and CSV, compiled recursive functions. The chapter owns the host boundary and explains the double versioning.

CouvertureParitéBignumSLD natif
40Chapitre

The compute cluster

Distributing VVL without giving up determinism

First the economic gate: measure before you build. Then the master/worker architecture with content-addressed code, the distributable surface of a function, submission as shards with parallelism and reducers. Fourteen builtins, four capabilities, TLS deployment and secret rotation, operations (metrics, audit, drain, backup) — and the failures to expect.

Master/workerSHA-256ShardsDéterminisme
A.

Appendix: builtins reference

879 builtins by family · VScript · signed plugins
A.1Part 1

Conventions, operators and kernel

The foundation of the language

Language conventions (assignment $var = expr, booleans 1/0, quasiquote/unquote, interpolation, dotted accessors), operators (arithmetic, comparison, logic, fuzzy), RAW control flow, higher-order (map, pmap, filter, reduce, for), lists, strings, conversion/math, JSON/XML (literals <{}> <[]> <<>>), jail-protected filesystem, OO (class/mixin/protocol), fibers, concurrency (promise, channel, semaphore, mutex), administration, logs, object persistence (SQLite + Prolog).

Filesystem jailConcurrenceobj-* + PrologRAW builtins
A.2Part 2

Fuzzy logic, AI, RAG, Prolog, ecosystem

The server's higher layers

AI commands and semantic operators, RAG, Prolog, the ontology system (ontology:*, 37), concept reification, NL→VVL resolution and the generics catalogue (generic:*, 11), computable approximation (approximation:*, 10), fuzzy & expert logic (fuzzy:*, 14), optimization (optimize:*) & planning (planning:*, 27), geo (geo:*/route:*), genetic (genetic:*, 10), ILP (ilp:*, 10), atoms & policies, dialects & modules, tests (test:*), CSV/BATCH, SQL databases, and the connectors (Office 29, PDF 11, image 10, http/web, Selenium, email, Google, MCP, hypervisor, plugins 23, ProSuite/Tekitisy/VDOM clients).

37 ontology27 planningilp · genetic29 office23 plugins
A.3Annex B

Signed plugin system

File architecture & chain of trust

The SDK and the chain of trust: vvl_plugin_sdk.py, vvl-plugin-sign.py, vvl_config.py, engine integration; the .vvlplugin bundle (manifest, entry, Ed25519 signature). Secrets and connector profiles (plugin-secret-*, plugin-login, plugin-audit), key trust (plugin-trust-add, standard/high tiers).

.vvlpluginEd25519plugin-trustsecrets
A.4Annex C

VScript, the embedded language

Modernized, sandboxed, signable VBScript

An embedded language derived from VBScript and modernized (Tier 1 additions in VAILS 5.18, Tier 3 in 5.19, all additive). Syntax, operators and precedence, control flow, procedures, OO; modernizations: […]/{…} literals, interpolated strings $"…", ?? (coalescing) and ?. (optional chaining), IIf, Return, conditional short-circuit. Callable from VVL via [vscript "…"], libraries [use …], the ws host object (ws.vvl, ws.csv, ws.mem…), OO interop through live proxies.

[vscript "…"]?? · ?.ws hôteTier 1/3
❦ ❦ ❦