Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
sin-table.html
swish-ask.sh

README.md

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://trill.ml.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
...

Extracting results using JavaScript

The Pengines infrastructure is designed to make JavaScript talk to Prolog servers. The file sin-table.html illustrates this.

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!