Scryer Prolog
?- append("Hello, ", X, "Hello, Scryer Prolog!").
X = "Scryer Prolog!".
Scryer Prolog Meetup 2024
The second annual Scryer Prolog meetup is going to happen in Vienna (Austria) on the 7th and 8th of November 2024. Join us to discover the present and future of Scryer Prolog! Participation is free, registration is required. More details here.
Scryer Prolog is a free software ISO Prolog system intended to be an industrial strength production environment and a testbed for bleeding edge research in logic and constraint programming.
Some of the Scryer Prolog features are:
ISO standard compliant
Integrated constraint programming libraries: clp(B), clp(Z).
Compact string representation
Network libraries (TCP sockets, HTTP server, HTTP client, ...)
WebAssembly support
Usable as a library
WAM based engine, cross-platform made in Rust
and more...
Try Scryer Prolog without any installation! Use Scryer Playground, which uses the WASM version of Scryer Prolog.
What is Prolog?
Prolog is a logic programming language created by Alain Colmerauer and Robert Kowalski in 1972. The idea behind Prolog is try to express a task in language similar to First Order Logic. Prolog systems include unification and non-determinism as key concepts upon which we build programs.
A Prolog program is made up of predicates which define a relation between its arguments. A predicate is made from clauses. A clause can be either a fact or a rule. There's also a toplevel, which we can use to ask and reason about our task.
It's still to this day one of the best examples and one of the most popular languages in the field of logic programming. That's because Prolog allows us to elegantly solve many tasks with short and general programs.
If you want a more detailed description of Prolog, check A Tour of Prolog.
If you want to learn more about Prolog history, check the videos l'Aventure Prolog and 50 years of Prolog and beyond.
Where can I learn Prolog?
There are a lot of classical Prolog books. Those books can teach you the basics of Prolog. Some examples are: The Art of Prolog (Shapiro), Programming in Prolog (Clocksin, Mellish) and The Craft of Prolog (O'Keefe). However, most of them are not updated to modern Prolog. We recommend The Power of Prolog (Markus Triska) for modern Prolog. For reference about the builtin Prolog modules and libraries in Scryer, check the documentation site. It's this!
Downloads
The latest version of Scryer Prolog is 0.9.4. And it's already useful for lots of tasks.
Windows (64 bits) | Download |
macOS (Intel) | Download |
macOS (ARM) | Download |
Linux (Ubuntu 20.04, 64 bits) | Download |
Linux (Ubuntu 22.04, 64 bits) | Download |
Linux (Ubuntu 22.04, 32 bits) | Download |
Scryer Prolog can also be compiled from source, instructions are on the GitHub README. It runs on Linux, macOS and Windows. Other operating systems may work but they're not regularly tested.
If you're in Linux, maybe your distribution already has an Scryer Prolog package.
There's also a Docker image available.
Support and discussions
If Scryer Prolog crashes or yields unexpected errors, consider filing an issue.
To get in touch with the Scryer Prolog community, participate in discussions or visit our #scryer IRC channel on Libera!