Hi everyone,
I’d like to share Prolog Studio, a small desktop editor for SWI-Prolog on macOS that I built during my AI master’s studies. I wanted something that feels like a modern editor but keeps the familiar toplevel workflow, and that newcomers can install without first setting up Homebrew or a terminal.
What it does
- Editor based on Monaco (the editor inside VS Code), with Prolog syntax highlighting, bracket matching, tabs, a file explorer and a predicate outline
- An embedded query console. ⌘R consults the current file, and queries behave like the toplevel:
;for the next answer,.to stop.read/1works from the console too. - Live diagnostics while you type: syntax errors and singleton variables are underlined. Load errors and warnings show up with clickable
file:linelinks. - Completion and hover docs for your own predicates and common built-ins. ⌘-click jumps to a definition.
- ⌘. aborts a runaway query, restarts the engine and reloads your file.
- SWI-Prolog 11.0.1 is included, so it works right after installation. You can still point it at your own
swipl(Homebrew, the official app, etc.).
How it works
It’s an Electron app. The editor talks to a normal swipl process through a small bridge (prolog/bridge.pl) that exchanges JSON over stdin/stdout. Queries run in engines, which gives proper answer-by-answer behaviour, and messages are collected through message_hook/3 to place errors in the editor. The bundled SWI-Prolog is the unmodified official macOS package, verified by checksum at build time and shipped under its BSD-2 license.
Download & source
- Download (universal .dmg, Apple Silicon and Intel, macOS 12+): Release Prolog Studio 0.2.0 · erkinazizi/PrologIDE · GitHub
- Source (MIT): GitHub - erkinazizi/PrologIDE · GitHub
The app is not notarized yet, so on first launch macOS asks you to allow it via System Settings ▸ Privacy & Security ▸ Open Anyway. Signing and notarization are next on my list.
This is an early version (0.2.0). It doesn’t try to replace PceEmacs, the graphical debugger or SWISH. It’s meant to be a friendly starting point, especially for students. I’d really appreciate feedback, bug reports or ideas, here or as GitHub issues. Suggestions on the bridge design are especially welcome.
Thanks to Jan and everyone who maintains SWI-Prolog. Building on top of it was a pleasure.
Erkin