Schemik is a high-level lexically-scoped implicitly-parallel dialect of Scheme and Common LISP, this means the parallel execution of programs is done independently of the programmer and each program written in Schemik always produces the same results no matter which parts of the program are executed simultaneously.
Features
- implicitly parallel evaluation (including side effects, mutations and continuations)
- first-class macros and continuations
- support for software transactional memory (STM)
- (experimental) support for just-in-time compilation (JIT)
- REPL with history and completion
Quick start
Download
You can get the latest version of Schemik from the SourceForge.
To compile and run Schemik you need the following libraries and tools:
- The Boehm-Demers-Weiser conservative garbage collector
- GLib 2.0 or higher
- Readline library (optional)
- Scons
Installation
The most preferable way to build Schemik is to use Scons. In order to build it, just run the scons command without any argument.
Installation command:
scons install
(optionally, you may use: scons install prefix=/foo/bar
).
Uninstallation command:
scons -c install
.
Optionally, you can build Schemik using the traditional make
command, but it may be necessary to adjust the configuration settings in config.h
.
Running Schemik
./schemik -t 0
-- starts Schemik in a sequential mode, i.e., using only one CPU core
./schemik -t 5
-- starts Schemik running in 5 threads
./schemik -t 10 -s scm/fib30.scm
-- computes 30th fibonacci number using 10 threads and quits
./schemik -t 10 -c "(define (fib x) (if (< x 3) 1 (+ (fib (- x 1)) (fib (- x 2))))) (display (fib 33))"
-- computes 33th fibonacci number using 10 threads and quits
License
Schemik is distributed under the terms of GNU General Public License Version 3 or (at your option) any later version.
Users in academia are kindly asked to cite the following resources if the software is used to pursue any research activities which may result in publications:
- [1] Petr Krajca, Vilem Vychodil. Data Parallel Dialect of Scheme. In Proc. 24th Annual ACM Symposium on Applied Computing (ACM SAC '09), pp. 1938--1940. [ACM Press, DOI 10.1145/1529282.1529713, ISBN 978-1-60558-166-8/09/03]
- [2] Petr Krajca, Vilem Vychodil. Software transactional memory for implicitly parallel functional language. In Proc. 25th Annual ACM Symposium on Applied Computing (ACM SAC '10), pp. 2123-2130. [ACM Press, DOI 10.1145/1774088.1774536, ISBN 978-1-60558-638-0/10/03]
Despite the fact that Schemik is available under the terms of open source license, its development is closed. This means, publicly available release may not entirely conform to software as described in published papers. For certain reasons it may lack some features or some features may be implemented differently. If you have any questions or comments in regard to Schemik, feel free to contact me. (krajcap (at) inf.upol.cz)
Screenshots


Comparison with other interpreters
Schemik Guile MzScheme TinyScheme MiniScheme
fib 4.40 2.46 1.67 34.08 22.09
fibfp 5.52 3.74 3.58 36.70 failed
fibc** 3.68 31.12 12.68 4.99 2.97
sum 4.16 2.84 1.42 39.35 24.73
sumfp 5.57 4.04 3.59 39.21 failed
tak 3.55 2.23 0.77 24.62 14.95
ctak** 1.26 4.12 5.33 0.72 0.44
cpstak 4.82 3.64 2.63 31.05 19.03
bubblesort* 3.78 1.89 3.97 19.27 1351.72
combi1** 2.04 2.54 2.24 403.74 3385.88
combi2* 3.69 4.08 3.08 1537.85 10543.81
hanoi 2.79 0.87 1.24 5.74 4.01
mazefun 3.84 2.21 1.32 27.68 8.58
nqueens 2.42 0.78 0.44 9.53 7.80
primes 4.98 2.34 1.90 27.25 21.29
permut* 5.47 7.27 4.63 1274.10 14821.43
powerset** 5.10 7.59 5.59 2683.20 21133.95
quicksort* 3.79 5.20 1.56 1967.83 > 17 hrs
Each number represents time (in seconds) it takes to execute the given program.