SWI-Prolog

ii  swi-prolog     6.2.6-7   amd64    ISO/Edinburgh-style Prolog interpreter
Prolog 入門

神戸大学 Prolog ホームページ


use_module(library(http/http_json)).
use_module(library(http/json)).
use_module(library(http/json_convert)).

Arch Linux
# pacman -S swi-prolog

Example

$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 7.6.4)
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.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- 10 == 10.
true.

?- 20 == 0.
false.

?- 20 == 20.
true.

?- halt.
$
Compile

swipl -o couch_read -g couch_read -c couch_read.pl

$ swipl
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 7.2.3)
Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).

?- X is div(12,3).
X = 4.

?- X is mod(10,3).
X = 1.

?- X is abs(3 - 8).
X = 5.

?- halt.
$
result_aa

outarea_aa
outarea_bb
outarea_cc
outarea_dd
outarea_ee
outarea_ff
outarea_gg
outarea_hh

Return

May/09/2023 AM 08:15