Programming against SWISH
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.
Extracting result using the (Unix) shell
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
Extracting result using Prolog
Prolog users can exploit the pengine API, in particular pengine_rpc/3. For example:
?- [library(pengines)]. ?- pengine_rpc('http://cplint.lamping.unife.it', sin_table(X,Y), [ src_text(':- include(sin_table).'), application(swish) ]). X = 0, Y = 0.0 ; X = 1, Y = 0.01745240643728351 ; X = 2 ...
There an NPM package
Extracting results using Java
Check out JavaPengines
Extracting results using Ruby
Check out RubyPengines
Extracting results using Erlang
Check out erl_pengine
If you write or find another client, please make a pull request for this page!