Contents
-
1 Acknowledgements
- 2 Introduction
- 3 Using GNU Prolog
- 4 Debugging
- 5 Format of definitions
- 6 Prolog directives and control constructs
- 7 Prolog built-in predicates
-
7.1 Type testing
-
7.1.1 var/1,
nonvar/1,
atom/1,
integer/1,
float/1,
number/1,
atomic/1,
compound/1,
callable/1,
list/1,
partial_list/1,
list_or_partial_list/1
- 7.2 Term unification
- 7.3 Term comparison
- 7.4 Term processing
- 7.5 Variable naming/numbering
- 7.6 Arithmetic
- 7.7 Dynamic clause management
- 7.8 Predicate information
- 7.9 All solutions
- 7.10 Streams
- 7.11 Constant term streams
- 7.12 Character input/output
-
7.12.1 get_char/2,
get_char/1,
get_code/1,
get_code/2
- 7.12.2 get_key/2,
get_key/1
get_key_no_echo/2,
get_key_no_echo/1
- 7.12.3 peek_char/2,
peek_char/1,
peek_code/1,
peek_code/2
- 7.12.4 unget_char/2,
unget_char/1,
unget_code/2,
unget_code/1
- 7.12.5 put_char/2,
put_char/1,
put_code/1,
put_code/2,
nl/1,
nl/0
- 7.13 Byte input/output
- 7.14 Term input/output
-
7.14.1 read_term/3,
read_term/2,
read/2,
read/1
- 7.14.2 read_atom/2,
read_atom/1,
read_integer/2,
read_integer/1,
read_number/2,
read_number/1
- 7.14.3 read_token/2,
read_token/1
- 7.14.4 syntax_error_info/4
- 7.14.5 last_read_start_line_column/2
- 7.14.6 write_term/3,
write_term/2,
write/2,
write/1,
writeq/2,
writeq/1,
write_canonical/2,
write_canonical/1,
display/2,
display/1,
print/2,
print/1
- 7.14.7 format/3,
format/2
- 7.14.8 portray_clause/2,
portray_clause/1
- 7.14.9 get_print_stream/1
- 7.14.10 op/3
- 7.14.11 current_op/3
- 7.14.12 char_conversion/2
- 7.14.13 current_char_conversion/2
- 7.15 Input/output from/to constant terms
-
7.15.1 read_term_from_atom/3,
read_from_atom/2,
read_token_from_atom/2
- 7.15.2 read_term_from_chars/3,
read_from_chars/2,
read_token_from_chars/2
- 7.15.3 read_term_from_codes/3,
read_from_codes/2,
read_token_from_codes/2
- 7.15.4 write_term_to_atom/3,
write_to_atom/2,
writeq_to_atom/2,
write_canonical_to_atom/2,
display_to_atom/2,
print_to_atom/2,
format_to_atom/3
- 7.15.5 write_term_to_chars/3,
write_to_chars/2,
writeq_to_chars/2,
write_canonical_to_chars/2,
display_to_chars/2,
print_to_chars/2,
format_to_chars/3
- 7.15.6 write_term_to_codes/3,
write_to_codes/2,
writeq_to_codes/2,
write_canonical_to_codes/2,
display_to_codes/2,
print_to_codes/2,
format_to_codes/3
- 7.16 DEC-10 compatibility input/output
- 7.17 Term expansion
- 7.18 Logic, control and exceptions
- 7.19 Atomic term processing
- 7.20 List processing
- 7.21 Global variables
-
7.21.1 Introduction
- 7.21.2 g_assign/2,
g_assignb/2,
g_link/2
- 7.21.3 g_read/2
- 7.21.4 g_array_size/2
- 7.21.5 g_inc/3,
g_inc/2,
g_inco/2,
g_inc/1,
g_dec/3,
g_dec/2,
g_deco/2,
g_dec/1
- 7.21.6 g_set_bit/2,
g_reset_bit/2,
g_test_set_bit/2,
g_test_reset_bit/2
- 7.21.7 Examples
- 7.22 Prolog state
- 7.23 Program state
- 7.24 System statistics
- 7.25 Random number generator
- 7.26 File name processing
- 7.27 Operating system interface
- 7.28 Sockets input/output
- 7.29 Linedit management
- 7.30 Source reader facility
- 8 Finite domain solver and built-in predicates
-
8.1 Introduction
- 8.2 FD variable parameters
- 8.3 Initial value constraints
- 8.4 Type testing
- 8.5 FD variable information
- 8.6 Arithmetic constraints
-
8.6.1 FD arithmetic expressions
- 8.6.2 Partial AC: (#=)/2 - constraint equal,
(#\=)/2 - constraint not equal,
(#<)/2 - constraint less than,
(#=<)/2 - constraint less than or equal,
(#>)/2 - constraint greater than,
(#>=)/2 - constraint greater than or equal
- 8.6.3 Full AC: (#=#)/2 - constraint equal,
(#\=#)/2 - constraint not equal,
(#<#)/2 - constraint less than,
(#=<#)/2 - constraint less than or equal,
(#>#)/2 - constraint greater than,
(#>=#)/2 - constraint greater than or equal
- 8.6.4 fd_prime/1,
fd_not_prime/1
- 8.7 Boolean and reified constraints
-
8.7.1 Boolean FD expressions
- 8.7.2 (#\)/1 - constraint NOT,
(#<=>)/2 - constraint equivalent,
(#\<=>)/2 - constraint different,
(##)/2 - constraint XOR,
(#==>)/2 - constraint imply,
(#\==>)/2 - constraint not imply,
(#/\)/2 - constraint AND,
(#\/\)/2 - constraint NAND,
(#\/)/2 - constraint OR,
(#\\/)/2 - constraint NOR
- 8.7.3 fd_cardinality/2,
fd_cardinality/3,
fd_at_least_one/1,
fd_at_most_one/1,
fd_only_one/1
- 8.8 Symbolic constraints
- 8.9 Labeling constraints
- 8.10 Optimization constraints
- 9 Interfacing Prolog and C
- References
- Index
Copyright (C) 1999-2007 Daniel Diaz
Verbatim copying and distribution of this entire article is permitted in any
medium, provided this notice is preserved. More about the copyright