Skip to main content

Incomplete Prolog interpreter in Python

Project description

VProlog

An implementation of a subset of the Prolog programming language made for fun. The language is parsed using Lark.

Installation

pip install vprolog

Usage

To run vprolog, use

vprolog [<input_file>]

where the argument is an optional input file containing facts and rules.

Example input files can be found in examples.

Example

To run the examples, just clone the repository first:

git clone https://github.com/Vekteur/vprolog.git
cd vprolog/examples/
$ vprolog example1.pl
?- cousin(bernard, X).
X = pierre
X = veronique
$ vprolog example5.pl
?- inverse([1, 2, 3], L).
L = [3, 2, 1]
$ vprolog example7.pl
?- gcd2(8, 12, X).
X = 4

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vprolog-0.1.0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

vprolog-0.1.0-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page