Squl – the declarative programming language

What is Squl?

Squl is a declarative programming language. It is a language that has been designed to assist with research into artificial intelligence. The goal for Squl is that it is, or becomes, a computer-processable language that is "expressively complete", i.e. that any human thought can be encoded in Squl. Squl is not related to SQL.

Squl has been influenced by Prolog and Smalltalk. The syntax for Squl is trivial. A Squl application consists of many statements. Each statement states some logical thought about the world. Statements look like this:

father:arnold of:bob.

father:bob of:charles.

then:( grandfather:X of:Z )
	if:( father:X of:Y )
	if:( father:Y of:Z ).

Here, we declare three bits of information. Firstly, arnold is the father of bob. Secondly, bob is the father of charles. Thirdly, somebody's father's father is their grandfather.

There is currently only one implementation of Squl called "Faish". Faish is free software, written using VisualWorks Smalltalk. Faish can be downloaded from the link above.

Faish could be considered to be an interpreter, although it is currently very slow. The design goals of Faish are centered around experimentation with AI techniques rather than execution speed.

Running Faish

Faish is software that implements the Squl programming language.

Download the file "Faish_0.2.zip" and extract the contents to a suitable location.

Unzip the zip file to, for example, "C:\Faish\", and double-click on "Faish.exe".
Unzip the zip file somewhere, for example, "~/faish/" and double-click on "Faish.sh", or in a console window, run "faish faish.im".
Download Cincom VisualWorks Smalltalk from http://www.cincomsmalltalk.com/ for your platform, locate the bin/visual executable for your platform and follow Cincom's documentation to run the faish.im image. Alternatively, check out the source code and see the instructions in readme.txt

Using Faish

When started, you should get a "Your Modules" window. Click on "New", choose a nice name, then double-click on the resulting module to open a module editing window.

In the "module editing window", you will see three panes. The left pane shows your statements. The right pane shows your queries. The bottom pane is where you edit whatever you just clicked on.

Type "CTRL+n" to create a new statement. Enter the text "father:alfred of:bob." (remember the full-stop at the end!) and press CTRL-Enter.

Now enter the text "father:X of:Y?" (remember the question-mark!) and press CTRL-Enter.

To save your work, either export your module to a file or repository, or "Commit" the image (which will save all modules and windows in faish.im). Beware: Faish 0.2 does not warn you to save your work if you accidentally close all windows. This is one of the many known bugs.

Now go read the documentation.


Faish is released under the MIT license. If you do anything cool with it, let me know on the mailing list! If you make bucketloads of money with it, feel free to send some my way.