Metadata-Version: 2.4
Name: uc-prolog
Version: 1.0.1
Summary: Production-grade Prolog interpreter with WAM solver, ISO compliance, and expert system support
Project-URL: Homepage, https://github.com/cuber-it/uc-prolog
Project-URL: Repository, https://github.com/cuber-it/uc-prolog
Author: Ulrich Cuber
License: Apache-2.0
Keywords: ai-agent,inference,interpreter,knowledge-base,logic,mcp,prolog
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Interpreters
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Provides-Extra: mcp
Requires-Dist: mcp>=1.0; extra == 'mcp'
Description-Content-Type: text/markdown

# uc-prolog — Python

Production-grade Prolog interpreter. Zero external dependencies. Embeddable. Available on [PyPI](https://pypi.org/project/uc-prolog/).

Part of [uc-prolog](https://github.com/cuber-it/uc-prolog).

## Install

```bash
pip install uc-prolog
```

## Run

```bash
python3 -m uc_prolog --repl
python3 -m uc_prolog --port 4002
```

## Use as library

```python
from uc_prolog import Engine

engine = Engine()
engine.eval("parent(tom, bob).")
engine.eval("parent(bob, ann).")
result = engine.eval("?- parent(tom, X).")
# result: "X = bob."
```

## Features

- ISO Prolog compliant
- WAM-based solver
- Modules
- Stream I/O
- Rational arithmetic
- DCG (Definite Clause Grammars)
- Embeddable Python library + standalone CLI + HTTP server

## Tests

```bash
python3 -m pytest tests/ -v
```

## Note

The Python implementation is a port of the Go reference implementation. Both pass the same 444-test ISO compliance suite.
