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 use gprolog and gplc for 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 β€” (for gplc) 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 to 2097152 (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 to 2097152 (2MB).
  • GLOBALSZ β€” size of the global stack, also known as the heap. defaults to 4194304 (4MB). yes bestie the heap is the global stack here, they're the same thing, iykyk.
  • LOCALSZ β€” size of the local stack. defaults to 2097152 (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.


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 πŸ’–βœ¨πŸ¦‹