Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. prolog

prolog

MITGov1.2.2

An embeddable ISO Prolog interpreter for Go with a database/sql-like API.

GitHubGitHub
725 stars37 forks0 contributors

What is prolog?

ichiban/prolog is an embeddable ISO Prolog interpreter written in Go that allows developers to integrate logic programming capabilities directly into their Go applications. It solves the problem of adding declarative, rule-based reasoning to Go programs through a standards-compliant Prolog engine.

Target Audience

Go developers who need to embed logic programming capabilities, implement rule engines, or add declarative reasoning to their applications.

Value Proposition

Developers choose ichiban/prolog for its strict ISO Prolog compliance combined with a Go-friendly API that mimics database/sql, making it uniquely approachable for Go programmers compared to other scripting engines.

Overview

The only reasonable scripting engine for Go.

Use Cases

Best For

  • Embedding logic programming engines in Go applications
  • Building rule-based systems in Go
  • Adding declarative reasoning to Go backends
  • Educational tools for teaching Prolog within Go environments
  • Creating domain-specific languages with Prolog semantics
  • Implementing sandboxed scripting environments in Go

Not Ideal For

  • Applications requiring extensive GUI or web development libraries
  • Teams already using Lua or JavaScript with established scripting ecosystems
  • High-performance systems where interpreter overhead is unacceptable
  • Simple tasks that could be solved with basic Go concurrency or data structures

Pros & Cons

Pros

Strict ISO Compliance

Implements ISO/IEC 13211-1:1995, Prologue for Prolog, and DCG standards, ensuring reliable execution of standard Prolog code as highlighted in the README.

Go-Native API Design

Uses a database/sql-like interface, making it intuitive for Go developers to embed and query Prolog programs seamlessly, similar to working with databases.

Flexible Customization Options

Supports sandboxing, custom predicates written in Go, and custom term types, allowing tailored logic environments as demonstrated in the examples.

Declarative Programming Support

Enables logic programming paradigms within Go, providing a unique approach for rule-based systems and reasoning compared to imperative scripting engines.

Cons

Sparse Extension Ecosystem

With only a few community extensions like predicates and kagomelog, it lacks the extensive library support of more popular scripting languages such as Lua or JavaScript.

Interpreter Performance Overhead

As an embedded interpreter, it incurs runtime overhead compared to native Go code, making it less suitable for latency-sensitive or high-throughput applications.

Niche Programming Paradigm

Logic programming requires a mindset shift from imperative programming, which can be a barrier for teams unfamiliar with Prolog, limiting broader adoption.

Frequently Asked Questions

Quick Stats

Stars725
Forks37
Contributors0
Open Issues21
Last commit1 day ago
CreatedSince 2020

Tags

#declarative-programming#interpreter#prolog#go-library#sandboxing#golang#go#logic-programming#iso-standards

Built With

G
Go

Included in

Go169.1k
Auto-fetched 3 hours ago

Related Projects

FrankenPHPFrankenPHP

🧟 The modern PHP app server

Stars11,165
Forks461
Last commit1 day ago
exprexpr

Expression language and expression evaluation for Go

Stars7,917
Forks504
Last commit21 days ago
gojagoja

ECMAScript/JavaScript engine in pure Go

Stars6,964
Forks456
Last commit7 days ago
gopher-luagopher-lua

GopherLua: VM and compiler for Lua in Go

Stars6,938
Forks700
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub