NAME
|
bp – B prolog |
SYNOPSIS
|
bp [ –p sz ] [ –s sz ] [ –b sz ] [ –t sz ] file ... |
DESCRIPTION
|
Bp is a prolog system. It includes a prolog compiler and the emulator.
This page documents the details about using this system in Plan
9. There is more documentation about the system within the source
directory. The compiler is writen in prolog and its source is
only available by asking the author. By default the emulator loads a prolog interpreter and several tools. If another prolog program is intended to replace the main interpreter loop, supply its file as an argument for Bp . Multiple such files may be given. Options –t, –p, –s, and –b, set maximum sizes for the table area, program area, the control stack (and heap), and the trail stack, respectively. Evaluation of an incorrect program is the most likely cause for exceeding such limits, check for that first. Although bp does not support unicode (nor anything outside 7–bits ASCII), the "←" rune is allowed as a replacement for ":–" in source files. The predicate exits/1 can be used to halt the system reporting the given status to the underlying Plan 9 system. The status is an atom with the error string, as said in exits(2).
The predicate rc/2 can be used to run the command specified by
the first argument (an atom containing a generic rc(1) command
line), and obtain its error status through the second argument. |
SOURCE
|
/sys/src/cmd/bprolog |
FILES
|
/sys/lib/bprolog/bp.out /sys/lib/bprolog/tools.out |
SEE ALSO
|
The Art of Prolog: Advanced Programming Techniques. Sterling and
Shapiro. MIT Press. 1986. B–Prolog User's Manual. |
AUTHOR
|
Neng–Fa Zhou. Dept. of Computer and Information Science, Brooklyn
College. zhou@mse.kyutech.ac.jp or zhou@sci.brooklyn.cuny.edu |
BUGS
|
Unicode is not handled properly. |