GNU Prolog is a free Prolog compiler with constraint solving over finite domains developed by Daniel Diaz.

Loading of files that start with a number

GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2006 Daniel Diaz
| ?- [3d].
uncaught exception: error(syntax_error('user_input:1 (char:3) , \
 | ] or operator expected in list'),read_term/3)
| ?- ['3d'].
compiling /home/nuno/3d.pl for byte code...
/home/nuno/3d.pl compiled, 1 lines read - 243 bytes written, 17 ms

ISO-8859-1 / ISO-8859-15 support

If you want/need support for these encodings you can use the Debian package. This package is build based on the original GNU Prolog source with patches.

amd64 port

Stack Size

If you’re compiling directly calling gcc instead of gplc you can make the stacks bigger by creating a asm file. This is actually what gprolog does internally. Here’s an example file where we allocate 64Mg for all the stacks (local, global, trail, cstr):

$ (echo .data ; for i in local global trail cstr; \
do echo .globl def_${i}_size; \
 echo def_${i}_size: .long $[64*1024]; done | sort) > SIZES.s

Now, on the makefile include:

target: <file1>.o <file2>.o $(OBJECT_PL) SIZES.o
        <gcc_command>

“crtbegin.o: No such file or directory” Compile Problem

Often this error crops up when you are using different compilers. The system might be calling a default compiler that is different from the one being called by gplc.

Use ‘gplc -v’ to check what compiler gplc is calling and the option ‘–c-compiler’ to select a different one.

print_object_not_linked, print_to_chars

Problem: system_error(cannot_catch_throw(error( \

resource_error(print_object_not_linked),print_to_chars/2)))

Fix I Used: print_to_chars/2 ⇒ write_to_chars/2

Links