Skip to content

Instantly share code, notes, and snippets.

@Koura
Koura / relations.pl
Created February 2, 2021 10:09
Visualizing relations with Prolog
/*
Prerequite: graphviz, prolog
Install (ubuntu): apt install graphviz swi-prolog
Usage:
- launch `prolog` from the terminal in the same folder as this file
- consult(relations).
- tell('./relations.gv'), graph(relation),told.
- halt.
- dot -Tjpg relations.gv | display