SWISH is a Prolog development environment built on top of the SWI-Prolog Pengines library. SWISH allows for prototyping and sharing query patterns. This readme provides documentation and utilities to access the query results from remote systems.
swish-ask.sh
is a simple Unix shell (bash) script that allows for
asking queries against one or more saved programs and return the result
as CSV. Run swish-ask.sh
to get basic help.
swish-ask.sh
requires curl
Prolog users can exploit the pengine API, in particular pengine_rpc/3. For example:
?- [library(pengines)].
?- pengine_rpc('http://swish.swi-prolog.org',
sin_table(X,Y),
[ src_text(':- include(sin_table).'),
application(swish)
]).
X = 0,
Y = 0.0 ;
X = 1,
Y = 0.01745240643728351 ;
X = 2
...
The Pengines infrastructure is designed to make JavaScript talk to Prolog servers. The file sin-table.html illustrates this.
There an NPM package
Check out JavaPengines
Check out RubyPengines
Check out erl_pengine
If you write or find another client, please make a pull request for this page!