Home

Software

Hardware

Downloads

about the author
contact

colophon

Software /
setlX

setlX

Computers make very fast, very accurate mistakes.

In General

Overview

most recent version:

0.7.5 (change log)

release date:

2012-05-16

dependent on:

Java JRE 6 (1.6) or higher

development state:

active

setlX is an interpreter for the SetlX (set language extended) programming-language.

The SetlX language was mostly designed by Prof. Dr. Karl Stroetmann and is an evolution of Setl by Jack Schwartz. It was specifically conceived to make the unique features of Setl more accessible to today’s students of set theories.

The setlX interpreter is currently the SetlX reference implementation. You may send bug-reports and/or questions about setlX via e-mail to setlx@randoom.org.

Installing setlX on a Unix-like OS (Linux, MacOS X, etc.)

  1. Make sure that a Java runtime, which is compatible to Java version 1.6 (aka version 6) or higher, is installed and working.
    You can verify this by executing:

       java -version

    inside a terminal (-emulator).
  2. Download the setlX zip file.
  3. Unzip the downloaded file into a directory of your choosing.
  4. Copy the ‘setlX.jar’-file into some folder, which is accessible by all users, who should be able to execute setlX (e.g. ‘/usr/local/setlX/’).
    You may also copy it into the home directory of some user, when he is the only setlX-user on the system (e.g. ‘/home/<user>/programs/setlX/’).
  5. Open the ‘setlX’-script in your favorite editor (either ‘vi’ or ‘emacs’ of course).
  6. Change the contents of the ‘setlXJarLocation’-variable to the full path of the jar-file, including the filename itself, e.g.

       setlXJarLocation="/usr/local/setlX/setlX.jar"

  7. Save and close the file.
  8. Copy the modified ‘setlX’-script into some folder, which is in the search path of all users which should be able to execute setlX (e.g. ‘/usr/local/bin’).
    When only used by one user, you may copy it into the ‘bin’ directory in his home instead (e.g. ‘/home/<user>/bin’).
  9. Make the script executable, e.g.

       chmod +x /usr/local/bin/setlX

Installing setlX on Microsoft Windows

  1. Make sure that a Java runtime, which is compatible to Java version 1.6 (aka version 6) or higher, is installed and working.
    You can verify this by executing:

       java -version

    inside a ‘Command Prompt’.
  2. Download the setlX zip file.
  3. Unzip the downloaded file into a directory of your choosing.
  4. Copy the ‘setlX.jar’ and ‘setlX.cmd’-files into some folder, which is accessible by all users, who should be able to execute setlX (e.g. ‘C:\Progam Files\setlX\’).
  5. Open the ‘setlX.cmd’-script in your favorite editor.
  6. Change the contents of the ‘setlXJarLocation’-variable to the full path of the jar-file, including the filename itself, e.g.

       set setlXJarLocation=C:\Progam Files\setlX\setlX.jar

  7. Save and close the file.
  8. Add the folder you placed both files into to the search-path (requires Administrator privileges):
    1. Press [Win]+[Pause] key combination to open system preferences.
    2. On Windows Vista or newer:
      Click on ‘Advanced system settings’ on the left pane, which opens a new window.

      On Windows XP or older:
      Click the ‘Advanced’ tab in the current window.
    3. Click on ‘Environment Variables’ on the bottom, which opens another window.
    4. Select the ‘Path’ variable in the ‘System variables’ section and click on ‘Edit...’, which opens jet another window.
    5. Add a semicolon (‘;’) followed by the full path to the folder where you installed setlX to the very end of the string in the ‘Variable value’ field. The new value should look like:

         <previous value>;C:\Progam Files\setlX

    6. Accept all changes by clicking ‘OK’ in all windows you opened before.
    7. End you current session and login into Windows again.

Getting started with setlX

  1. Now you can start the interpreter by executing:

       setlX

    inside a terminal (-emulator).
  2. The interpreter will launch and present you with a prompt, where you may start typing SetlX code. Note that input will be executed after entering an additional newline.
    One example code-fragment would be:

       for (l in [83,101,116,108,88]) {char(l);}

  3. After you are done, you can leave the interpreter by typing:

       exit;

    into the interpreters prompt.

Executing Files

To execute a file, start the interpreter with the path to the SetlX source file as an argument:

   setlX <path>/<name>.stlx

Various SetlX code files are available, which demonstrate some features of the language.

Screenshot

screenshot of version 0.7.2

(click the image to show a higher quality version)

Bugs / Limitations

  • Parsing errors are subpar, which make root cause of syntax errors sometimes hard to detect in a slew of messages.
  • Prompt in interactive mode does not handle control sequences correctly on UNIX systems (Java Limitation).

Disclaimer

You may distribute setlX, to anyone and for any purpose, and make changes to it,
even without permission from the author or notice to the author, as long as you do not
remove any copyright information, and also comply with the antlr license.

This program uses the antlr parser generator in version 3.4. As per its license antlr is not
guaranteed to work and might even destroy all life on this planet. The full text of antlr's
license is included in the download.

Change Log

The full change log can be viewed here.

---v0.7.5--- 2012/05/16

 + added \ operator for integer division, e.g. a \ b == floor(a/b)
 + round() works for unlimited precision values

---v0.7.4--- 2012/05/12

 + implemented matching for sets
 + implemented splitting lists and sets in match
 + added permutations() function
 + added sleep() function
 + updated development manual
 # fixed bug when reading from stdin
 * renamed examples folder

---v0.7.3--- 2012/04/26

 + added assert function and option to disable assertions
 + updated aStar hanoi examples

Download