Skip to main content

Brolog - Prolog interpreter written in Python

Installation

pip install brolog

CLI usage

brolog input.pl
?- list([]).
true.

?- list([1,2]).
true.

?- append(X, Y, [1,2,3]).
X = [1,2],
Y = 3.

?- append([1], X, [4,5]).
false.

Using this file as input:

list([]).
list([_|T]) :- list(T).

append([], X, [X]).
append([H|T], X, [H|R]) :- append(T, X, R).

Supported builtins

  • Lists: [H|T], [1,2], ..
  • Cut: !
  • Arbitrary symbolic functions: f(), g(a, b), ..

TODO

  • (WIP) Use networkx to generate the SDL tree of a query
  • Add more commonly used builtins

Metadata

Release files for brolog 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brolog 0.1.0
File Size Uploaded Provenance Actions
brolog-0.1.0.tar.gz 11.0 kB Without provenance Details for brolog-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brolog 0.1.0
File Interpreter ABI Platform Actions
brolog-0.1.0-py3-none-any.whl Python 3 none any Details for brolog-0.1.0-py3-none-any.whl

Total release size: 21.6 kB

Release files / brolog-0.1.0.tar.gz

Download URL brolog-0.1.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
806505865282ac2fc53e1dbde23bd9a9f7b9d945f8d4a86afc88bd06e6907628
BLAKE2b-256 checksum
How to use checksums
05e689e7b51f60210a466630a1ec1b3c12b29c5d6ed975574656009852449e0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.2

Release files / brolog-0.1.0-py3-none-any.whl

Download URL brolog-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc71c66d1ef044ce417fe4c812b57e6fd4b0396bf483963a1ae7164dd3a69c62
BLAKE2b-256 checksum
How to use checksums
7e160f250d762180b34ed185efb01141b4d7f825d195a90f36bf86db82bfa17d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.2

Security for brolog 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page