Il giorno giovedì 20 settembre 2018 16:07:27 UTC+2, madiha shiekh ha scritto:
Hii
Hi Madiha
It requires dot installed - on Ubuntu, as easy as
$ sudo apt install graphviz
Then, after downloaded the repo above in ~/Downloads/prolog-snippets-master,
$ cd ~/Downloads/prolog-snippets-master/genealogy
$ swipl
elizabeth.plWelcome to SWI-Prolog (threaded, 64 bits, version 7.7.19-18-g8b798fb-DIRTY)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit
http://www.swi-prolog.orgFor built-in help, use ?- help(Topic). or ?- apropos(Word).
?- elizabeth.
true .
?- ^D
% halt
Now in ~/Downloads/prolog-snippets-master/genealogy/temp.svg you should see a graph of the database.
The layout engine is dot, of course, so you have a *lot* of options about the outcome, tweaking the code, of course.
Enjoy, Carlo