The OpenCog AtomSpace is a hypergraph-based knowledge representation system serving as the core component for Artificial General Intelligence (AGI) research. It provides an in-memory database for storing immutable, uniquely-typed atoms (nodes and links) with mutable key-value stores attached for dynamic data. The system supports executable graphs through the Atomese language, features a sophisticated pattern matching and query engine, includes type inheritance and intersection capabilities, and offers multi-language bindings (Scheme, Python). Architecture-wise, it follows a modular design with clear separation between atom management, value systems, execution frameworks, and query processing. The codebase demonstrates strong engineering practices with factory patterns, handle-based memory management, and thread-safe frame stacks for evaluation contexts.
Scallop is a differentiable probabilistic Datalog engine implemented in Rust with Python bindings (scallopy). It compiles Scallop programs (a Datalog variant with provenance annotations) through a three-stage compiler (front AST → back normalized Datalog → RAM relational algebra) to a runtime that executes with configurable provenance semirings (unit, boolean, tropical, probabilistic, differentiable, etc.). The system supports neuro-symbolic AI by integrating with PyTorch for gradient-based learning, and provides plugins for LLMs (GPT, Gemini) and vision models (CLIP, OWL-ViT, SAM). The architecture is a monolithic Rust library (core) with multiple sub-crates for CLI tools (scli, sclc, sclrepl), Python bindings via PyO3, and a plugin system for extending with foreign functions, predicates, and attributes. Key data flows: user-provided Scallop source or facts are parsed, analyzed (type inference, boundness), transformed, and compiled into a relational algebra plan that is executed with provenance-aware dataflow operators, producing output collections. The codebase is well-structured with clear separation between compiler, runtime, and provenance layers, and includes several reusable components such as copy-on-write containers, galloping search, dual numbers for AD, batch streaming abstractions, and a self-contained SDD library for weighted model counting. While the code demonstrates strong engineering and research-grade sophistication, there is some code duplication across provenance variants and experimental/legacy directories that lower the overall quality score. The repository is actively maintained with recent commits, CI workflows, and a growing plugin ecosystem.
This repository is a personal knowledge base and learning collection focused on SWI-Prolog and logic programming. It contains extensive notes, tutorials, code snippets, and reusable utility modules covering a wide range of Prolog topics: language internals (data types, operators, dicts, exceptions), programming patterns (DCGs, difference lists, delimited continuations, foldl/r), puzzles, exercises, and integration with Java via JPL. The code is well-documented and includes unit tests (plunit) for many components. While not a cohesive application, the repository offers several self-contained, reusable Prolog predicates and patterns that demonstrate good Prolog craftsmanship. The primary value is as a reference and source of reusable utility code for SWI-Prolog developers.