Metadata-Version: 2.1
Name: brolog
Version: 0.1.0
Summary: Prolog interpreter written in Python
Author: Tomas R.
License: MIT License
        
        Copyright (c) 2024 Tomas R
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/tomasr8/brolog
Project-URL: Github, https://github.com/tomasr8/brolog
Keywords: QR,QR code,Image processing,Augmented reality,Computer vision,opencv
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Interpreters
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Provides-Extra: dev
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-snapshot ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: ruff ; extra == 'dev'

## Brolog - Prolog interpreter written in Python

### Installation

```bash
pip install brolog
```

### CLI usage

```bash
brolog input.pl
```

```prolog
?- 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:

```prolog
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
