GPROLOG(1)
π GPROLOG(1) β the general commands manual, section 1 π
okay bestie, sit down, we're talking about gprolog and it's actually so good. this is section 1 of the general commands manual, so it's a command you run, not a syscall or a config file. periodt.
β¨ NAME β¨
gprolog β prolog interpreter and native code compiler π¦
πΈ SYNOPSIS πΈ
gprolog
gplc [options] [ filename ]
like... that's it. two whole vibes. one runs the interpreter, one compiles stuff. slay.
π DESCRIPTION π
GNU Prolog (gprolog) is a prolog interpreter and compiler to native code. no cap, it does both.
In its basic form, gprolog starts an interactive Prolog interpreter. just you, a prompt, and infinite possibilities β¨
The gplc command compiles Prolog sources into object files, which may be linked to produce a stand-alone executable. so if you wanna ship your lil prolog program as a whole independent binary, that's the move, and it ate.
if you're like "okay but how do i actually write Prolog programs with these" β bestie, go read the GNU Prolog manual (online), it explains how to usegprologandgplcfor writing Prolog programs. this page is just the appetiser π
π OPTIONS π
--helpβ prints a summary of allowable options. the classic. the icon. when in doubt, ask for help fr fr.filenameβ (forgplc) compiles the specified file. so you point it at your file and it does the thing. main character energy.
π§ ENVIRONMENT π§
these are the environment variables that size up your stacks, and yes you can tune all of them π«Ά
TRAILSZβ size of the trail stack, needed to effect backtracking (undo bindings). defaults to2097152(2MB). this is the one that lets prolog go "jk, undo" and rewind your bindings, so don't starve it.CSTRSZβ size of the constraints stack. defaults to2097152(2MB).GLOBALSZβ size of the global stack, also known as the heap. defaults to4194304(4MB). yes bestie the heap is the global stack here, they're the same thing, iykyk.LOCALSZβ size of the local stack. defaults to2097152(2MB).
π SEE ALSO π
so this is where it gets a little silly. the manual page says the YAP manual is available on a debian system in the gprolog-doc package β yes, it literally says YAP, we're just reporting what's written, don't come for me π β and you can find it as the PDF file:
/usr/share/doc/gprolog-doc/gprolog.pdf
and as an html document at the URL:
http://gprolog.org/manual/html_node/
go read it. it's giving essential reading. π
π AUTHOR π
GNU Prolog is written and maintained by Daniel Diaz. absolute legend, we stan π
This manual page was compiled by Salvador Abreu <spa@debian.org>, based on the page for Yap Prolog written by Ralf Treinen <treinen@debian.org>. a whole collab. iconic.
β COPYRIGHT β
Since this manpage is derived from the GNU Prolog manual it is subject to its licence, which is either the standard GPL-3 or LGPL-3 (dual-licensed). so you pick, that's the deal π
Refer to the text of these licenses in a debian system in the directory:
/usr/share/common-licences
note the spelling, bestie β it's common-licences with the extra letters, exactly like that. don't "fix" it, just go read the actual licence text there.
and that's the whole page!! this version is dated December 10, 2016 and lives in the GPROLOG(1) slot of the manual β so if you ever see it floating around, that's the one. love u, go write some prolog πβ¨π¦
π¦ where this page comes from
- debian bookworm: gprolog 1.4.5.0-3 Β· GPL-3.0-or-later
- debian trixie: gprolog 1.4.5.0-3 Β· GPL-3.0-or-later
- ubuntu jammy: gprolog 1.4.5.0-3 Β· GPL-3.0-or-later
- ubuntu noble: gprolog 1.4.5.0-3 Β· GPL-3.0-or-later
- ubuntu resolute: gprolog 1.5.0-0.1 Β· GPL-3.0-or-later
- ubuntu stonking: gprolog 1.5.0-0.1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms