Spock is a Geometric Operating System (GOS) for neuro-symbolic reasoning. It represents concepts, facts, relations and theories as points or regions in a high-dimensional conceptual space (hypervectors) and executes reasoning, planning and explanation through a formally defined DSL based on Subject–Verb–Object triplets.
| Hypervectors | High-dimensional vectors (512+ dimensions) that represent concepts, facts, and states in a continuous geometric space. |
| SpockDSL | A minimal, uniform DSL where every statement has the form @varName subject verb object. |
| Theories | Named collections of facts and verb definitions that can be persisted, versioned, and overlaid. |
| Sessions | Temporary working contexts that overlay theories and host local facts for reasoning. |
| Verbs | Binary relations implemented as geometric transformations: kernel verbs (Add, Bind), logical verbs (Implies, And), and domain verbs. |
Layered overview of the main modules: kernel, DSL engine, theory management, sessions, and APIs.
Why Spock works: hyperdimensional computing, geometric truth, VSA operations, semantic navigation, and explainability.
Complete language reference: statements, macros, theories, verbs, sessions, and execution semantics.
API documentation for createSpockEngine, sessions, and high-level methods: learn, ask, prove, explain, plan, solve, summarise.
Compact glossary of terms and concepts with links to detailed documentation.
Full traceability matrix: URS, FS, NFS, Design Specs, Test Specs, and Evaluation Suites.
Conceptual guides on geometric reasoning, theory layering, bias control, and explainability.
// Create engine
const engine = createSpockEngine({ dimensions: 512 });
const session = engine.createSession();
const api = createSessionApi(session);
// Learn some facts
api.learn(`
@f1 Socrates Is Human
@f2 Humans Are Mortal
`);
// Ask a question
const result = api.ask(`
@query Socrates Is Mortal
@eval query Evaluate Truth
`);
console.log(result.scores.truth); // ~1.0
console.log(result.dslOutput); // Replayable DSL trace