PrologJ includes builtin predicates corresponding to two common Prolog dialects: "Edinburgh" Prolog and the ISO standard. The former is the dialect found in books such as the 1st through 4th editions of Programming in Prolog by Clocksin and Mellish. The latter is the dialect that was standardized by the ISO in 1995 as standard ISO/IEC 13211-1. In addition, PrologJ includes several extensions.
The builtin predicates of PrologJ are grouped into predicate sets. The list below shows all the user-visible builtin predicates and the set of which each is a part. Fuller documentation for each predicate can be found in the documentation for the set to which it belongs.
The setting of the dialect
flag determines which dialect's
builtin predicates PrologJ recognizes, by enabling or disabling several sets.
The Core set, which includes predicates common to both dialects,
is always enabled. The ISO set is enabled when the value of
dialect
is either iso
or both
. The
Edinburgh set is enabled when the value of dialect
is either edinburgh
or both
. The EIO
set - which consists of input-output predicates that use the edinburgh
names but recognize an initial iso-style stream argument is enabled when
the value of dialect
is both
.
The predicate sets that are PrologJ extensions are selectively enabled or
disabled by a flag whose name is the same as that of the set (but beginning
with a lowercase letter) - e.g.the Miscellaneous set is enabled when the
miscellaneous
flag is on
, and is disabled when it
is off
.
Core - predicates common to both the ISO and edinburgh dialects.
ISO - predicates belonging to the ISO dialect but not the Edinburgh dialect.
Edinburgh - predicates belonging to the Edinburgh dialect but not the ISO dialect.
EIO - IO predicates with edinburgh names, but using ISO-style streams.
Debug - predicates used for the debugging facility.
Grammar Rules - The Prolog grammar rules facility.
Miscellaneous - miscellaneous PrologJ extensions.
abolish / 1
(Core
)
abort / 0
(Miscellaneous
)
arg / 3
(Core
)
=:= / 2
(Core
)
=\= / 2
(Core
)
> / 2
(Core
)
>= / 2
(Core
)
< / 2
(Core
)
=< / 2
(Core
)
asserta / 1
(Core
)
assertz / 1
(Core
)
at_end_of_stream / 0
(ISO
)
at_end_of_stream / 1
(ISO
)
atom / 1
(Core
)
atom_chars / 2
(ISO
)
atom_codes / 2
(ISO
)
atom_concat / 3
(ISO
)
atom_length / 2
(ISO
)
atomic / 1
(Core
)
bagof / 3
(ISO
)
break / 0
(Miscellaneous
)
call / 1
(Core
)
catch / 3
(ISO
)
char_code / 2
(ISO
)
char_conversion / 2
(ISO
)
clause / 2
(Core
)
close / 1
(ISO
)
close / 2
(ISO
)
compound / 1
(ISO
)
, / 2
(Core
)
consult / 1
(Edinburgh
)
copy_term / 2
(ISO
)
current_char_conversion / 2
(ISO
)
current_input / 1
(ISO
)
current_op / 3
(ISO
)
current_output / 1
(ISO
)
current_predicate / 1
(ISO
)
current_prolog_flag / 2
(ISO
)
! / 0
(Core
)
debugging / 0
(Debug
)
deny / 1
(Miscellaneous
)
; / 2
(Core
)
display / 1
(Edinburgh
)
display / 2
(EIO
)
fail / 0
(Core
)
findall / 3
(ISO
)
float / 1
(ISO
)
flush_output / 0
(ISO
)
flush_output / 1
(ISO
)
foreach / 2
(Miscellaneous
)
functor / 3
(Core
)
get / 1
(Edinburgh
)
get / 2
(EIO
)
get_byte / 1
(ISO
)
get_byte / 2
(ISO
)
get_char / 1
(ISO
)
get_char / 2
(ISO
)
get_code / 1
(ISO
)
get_code / 2
(ISO
)
get0 / 1
(Edinburgh
)
get0 / 2
(EIO
)
halt / 0
(Core
)
halt / 1
(Core
)
-> / 2
(ISO
)
-> ; / 3
(ISO
)
integer / 1
(Core
)
is / 2
(Core
)
listing / 1
(Edinburgh
)
listing / 2
(EIO
)
name / 2
(Edinburgh
)
nl / 0
(Core
)
nl / 1
(ISO
)
nodebug / 0
(Debug
)
nospy / 1
(Debug
)
nonvar / 1
(Core
)
not / 1
(Edinburgh
)
\+ / 1
(ISO
)
\= / 2
(Core
)
notrace / 0
(Debug
)
notrace / 1
(Debug
)
number / 1
(ISO
)
number_chars / 2
(ISO
)
number_codes / 2
(ISO
)
once / 1
(ISO
)
op / 3
(Core
)
open / 3
(ISO
)
open / 4
(ISO
)
peek / 1
(Miscellaneous
)
peek / 2
(Miscellaneous
)
peek_byte / 1
(ISO
)
peek_byte / 2
(ISO
)
peek_char / 1
(ISO
)
peek_char / 2
(ISO
)
peek_code / 1
(ISO
)
peek_code / 2
(ISO
)
phrase / 2
(Grammar Rules
)
put / 1
(Core
)
put / 2
(EIO
)
put_byte / 1
(ISO
)
put_byte / 2
(ISO
)
put_char / 1
(ISO
)
put_char / 2
(ISO
)
put_code / 1
(ISO
)
put_code / 2
(ISO
)
read / 1
(Core
)
read / 2
(ISO
)
read_line / 1
(Miscellaneous
)
read_line / 2
(Miscellaneous
)
read_term / 2
(ISO
)
read_term / 3
(ISO
)
reconsult / 1
(Edinburgh
)
repeat / 0
(Core
)
reset / 1
(Miscellaneous
)
retract / 1
(Core
)
retractall / 1
(Core
)
see / 1
(Edinburgh
)
seeing / 1
(Edinburgh
)
seen / 0
(Edinburgh
)
set_input / 1
(ISO
)
set_output / 1
(ISO
)
set_prolog_flag / 2
(ISO
)
set_stream_position / 2
(ISO
)
setof / 3
(ISO
)
skip / 1
(Edinburgh
)
skip / 2
(EIO
)
skipln / 0
(Miscellaneous
)
skipln / 1
(Miscellaneous
)
spy / 1
(Debug
)
stream_property / 2
(ISO
)
stream / 1
(Miscellaneous
)
sub_atom / 5
(ISO
)
tab / 1
(Edinburgh
)
tab / 2
(EIO
)
tell / 1
(Edinburgh
)
telling / 1
(Edinburgh
)
== / 2
(Core
)
\== / 2
(Core
)
@> / 2
(ISO
)
@>= / 2
(ISO
)
@< / 2
(ISO
)
@=< / 2
(ISO
)
throw / 1
(ISO
)
throw_error / 1
(Miscellaneous
)
told / 0
(Edinburgh
)
trace / 0
(Debug
)
trace / 1
(Debug
)
true / 0
(Core
)
= / 2
(Core
)
unify_with_occurs_check / 2
(ISO
)
=.. / 2
(Core
)
var / 1
(Core
)
write / 1
(Core
)
write / 2
(ISO
)
write_canonical / 1
(ISO
)
write_canonical / 2
(ISO
)
write_term / 2
(ISO
)
write_term / 3
(ISO
)
writeq / 1
(Core
)
writeq / 2
(ISO
)