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.

What Spock Is Good For

Core Concepts

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.

Documentation Sections

Architecture

Layered overview of the main modules: kernel, DSL engine, theory management, sessions, and APIs.

Foundational Theory

Why Spock works: hyperdimensional computing, geometric truth, VSA operations, semantic navigation, and explainability.

SpockDSL Syntax

Complete language reference: statements, macros, theories, verbs, sessions, and execution semantics.

Public APIs

API documentation for createSpockEngine, sessions, and high-level methods: learn, ask, prove, explain, plan, solve, summarise.

Quick Wiki

Compact glossary of terms and concepts with links to detailed documentation.

Specifications

Full traceability matrix: URS, FS, NFS, Design Specs, Test Specs, and Evaluation Suites.

Guides

Conceptual guides on geometric reasoning, theory layering, bias control, and explainability.

Quick Start Example

// 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

Specification Documents