🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

brolog

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brolog

Prolog interpreter written in Python

0.1.0
PyPI
Maintainers
1

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

Keywords

QR

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts