{"repo":"mat-mgm/kb-prolog","free":true,"listed":false,"github":"https://github.com/mat-mgm/kb-prolog","clone":"git clone https://github.com/mat-mgm/kb-prolog.git","description":"A hyper-relational knowledge base with content-addressable storage, built on Prolog, SQLite, and C.","language":"C","stars":152,"topics":["cas","content-addressable-storage","knowledge-base","knowledge-graph","prolog","raylib","reification","sqlite","trealla","trealla-prolog"],"license":"GPL-3.0","category":"productivity","readme_excerpt":"kb — Prolog Knowledge Base A local-first, hyper-relational knowledge base with content-addressable storage (CAS). Built as a Master's thesis prototype. What it is - Hyper-relational graph : Knowledge is stored as statement(Subject, Predicate, Object, Properties) . Subjects and objects can themselves be statements (reification), enabling claims about claims. - Content-addressable storage : Files are staged, SHA-256 hashed, and committed atomically alongside their graph metadata. Deduplication is automatic. - Time-travel : Updates create new statement versions linked via replaces id . pl history walks the version chain. - Prolog-first : Trealla Prolog is the main runtime. SQLite and Raylib are accessed via C shared libraries loaded through FFI. - Interactive GUI : A Raylib-based graph viewer with image previews, a query bar, and node search. Build Dependencies : Clang, X11 (Linux) or Xcode CLT (macOS). Trealla Prolog, Raylib, raygui, and SQLite are included as submodules. This builds libcas.so , libgui.so , and libsqlite3.so in the project root. Raylib is compiled from source during make . To build Trealla from source: Then ensure tpl is on your $PATH . Usage Architecture Data model Every piece of knowledge is a statement/4 term: Subject and Object are Prolog terms or integer IDs pointing to other rows in the statement table, enabling arbitrary nesting. The SQLite schema mirrors this with ANY -typed columns and a replaces id foreign key for versioning. Example: Context loading ","default_branch":null,"files":null,"tree":[],"storefront":"/r/mat-mgm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mat-mgm/kb-prolog/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}