?- append("Hello, ", X, "Hello, Scryer Prolog!").
X = "Scryer Prolog!".
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
Compact string representation
Usable as a library
WAM based engine, cross-platform made in Rust
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.
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!
The latest version of Scryer Prolog is 0.9.3. And it's already useful for lots of tasks.
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.