 
 
Contents
- 
1  Acknowledgements
- 2  GNU Prolog License Conditions
- 3  Introduction
- 4  Using GNU Prolog
- 5  Debugging
- 6  Format of definitions
- 7  Prolog directives and control constructs
- 8  Prolog built-in predicates
- 
8.1  Type testing
- 
8.1.1  var/1, 
nonvar/1,
atom/1,
integer/1,
float/1,
number/1,
atomic/1, 
 compound/1,
callable/1,
ground/1,
is_list/1,
list/1,
 partial_list/1,
list_or_partial_list/1
 
- 8.2  Term unification
- 8.3  Term comparison
- 8.4  Term processing
- 8.5  Variable naming/numbering
- 8.6  Arithmetic
- 8.7  Dynamic clause management
- 8.8  Predicate information
- 8.9  All solutions
- 8.10  Streams
- 8.11  Constant term streams
- 8.12  Character input/output
- 
8.12.1  get_char/2,
get_char/1,
get_code/1,
get_code/2
- 8.12.2  get_key/2,
get_key/1
	 get_key_no_echo/2,
get_key_no_echo/1
- 8.12.3  peek_char/2,
peek_char/1,
peek_code/1,
peek_code/2
- 8.12.4  unget_char/2,
unget_char/1,
unget_code/2,
unget_code/1
- 8.12.5  put_char/2,
put_char/1,
put_code/1,
put_code/2,
nl/1,
nl/0
 
- 8.13  Byte input/output
- 8.14  Term input/output
- 
8.14.1  read_term/3,
read_term/2,
read/2,
read/1
- 8.14.2  read_atom/2,
read_atom/1,
read_integer/2,
read_integer/1, 
 read_number/2,
read_number/1
- 8.14.3  read_token/2,
read_token/1
- 8.14.4  syntax_error_info/4
- 8.14.5  last_read_start_line_column/2
- 8.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
- 8.14.7  format/3,
format/2
- 8.14.8  portray_clause/2,
portray_clause/1
- 8.14.9  get_print_stream/1
- 8.14.10  op/3
- 8.14.11  current_op/3
- 8.14.12  char_conversion/2
- 8.14.13  current_char_conversion/2
 
- 8.15  Input/output from/to constant terms
- 
8.15.1  read_term_from_atom/3,
read_from_atom/2,
read_token_from_atom/2
- 8.15.2  read_term_from_chars/3,
read_from_chars/2,
read_token_from_chars/2
- 8.15.3  read_term_from_codes/3,
read_from_codes/2,
read_token_from_codes/2
- 8.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
- 8.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
- 8.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
 
- 8.16  DEC-10 compatibility input/output
- 8.17  Term expansion
- 8.18  Logic, control and exceptions
- 
8.18.1  abort/0,
stop/0,
top_level/0,
break/0,
halt/1,
halt/0
- 8.18.2  false/0, once/1, (\+)/1 - not provable,
call/2-11,
	 call_with_args/1-11, call_det/2, forall/2
- 8.18.3  repeat/0
- 8.18.4  between/3, for/3
 
- 8.19  Atomic term processing
- 8.20  List processing
- 8.21  Global variables
- 
8.21.1  Introduction
- 8.21.2  g_assign/2,
g_assignb/2,
g_link/2
- 8.21.3  g_read/2
- 8.21.4  g_array_size/2
- 8.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
- 8.21.6  g_set_bit/2,
g_reset_bit/2,
g_test_set_bit/2,
g_test_reset_bit/2
- 8.21.7  Examples
 
- 8.22  Prolog state
- 8.23  Program state
- 8.24  System statistics
- 8.25  Random number generator
- 8.26  File name processing
- 8.27  Operating system interface
- 8.28  Sockets input/output
- 8.29  Linedit management
 
- 9  Finite domain solver and built-in predicates
- 
9.1  Introduction
- 9.2  FD variable parameters
- 9.3  Initial value constraints
- 9.4  Type testing
- 9.5  FD variable information
- 9.6  Arithmetic constraints
- 
9.6.1  FD arithmetic expressions
- 9.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
- 9.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
- 9.6.4  fd_prime/1,
fd_not_prime/1
 
- 9.7  Boolean and reified constraints
- 
9.7.1  Boolean FD expressions
- 9.7.2  fd_reified_in/4
- 9.7.3  (#\)/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
- 9.7.4  fd_cardinality/2,
fd_cardinality/3,
fd_at_least_one/1,
fd_at_most_one/1, 
 fd_only_one/1
 
- 9.8  Symbolic constraints
- 9.9  Labeling constraints
- 9.10  Optimization constraints
 
- 10  Interfacing Prolog and C
- References
- Index
Copyright (C) 1999-2021 Daniel Diaz
Verbatim copying and distribution of this entire article is permitted in any
medium, provided this notice is preserved. More about the copyright
 
