Prolog/Predicati built-in: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Tux3 (discussione | contributi)
m Nuova pagina: List of built-in predicates in ISO Prolog. ==Term unification== ;=/2 :Prolog unification ;unify_with_occurs_check/2 : ;(\=)/2 :Not Prolog unifiable ==Type testing== ;var/1 :True if t...
(Nessuna differenza)

Versione delle 22:38, 18 dic 2008

List of built-in predicates in ISO Prolog.

Term unification

=/2
Prolog unification
unify_with_occurs_check/2
(\=)/2
Not Prolog unifiable

Type testing

var/1
True if term currently is a variable
atom/1
True if term is bound to an atom
integer/1
True if term is bound to an integer
float/1
True if term is bound to a floating point number
atomic/1
True if term is bound to an atom, integer or floating point number
compound/1
True if term is bound to a compound term
nonvar/1
True if term is not a variable
number/1
True if term is bound to an integer or floating point number

Term comparison

(@=<)/2
Term less than or equal to
(==)/2
Term identical
(\==)/2
Term not identical
(@<)/2
Term less than
(@>)/2
Term greater than
(@>=)/2
Term greater than or equal to

Term creation and decomposition

functor/3
arg/3
(=../2)
copy_term/2

Arithmetic evaluation

is/2

Arithmetic comparison

'=:='/2
Arithmetic equal
'=\='/2
Arithmetic not equal
'<'/2
Arithmetic less than
'=<'/2
Arithmetic less than or equal to
'>'/2
Arithmetic greater than
'>='/2
Arithmetic greater than or equal to

Clauses

Clause retrieval and information

clause/2
current_predicate/1

Clause creation and destruction

asserta/1
assertz/1
retract/1
abolish/1

All solutions

findall/3
bagof/3
setof/3

Input and output

Stream selection and control

current_input/1
current_output/1
set_input/1
set_output/1
open/4, open/3
Opening a stream
close/1, close/2
Closing a stream
stream_property/2
at_end_of_stream/1, at_end_of_stream/0
set_stream_position/2

Character input-output

get_char/2, get_char/1
get_code/2, get_code/1
peek_char/2, peek_char/1
peek_code/2, peek_code/1
put_char/2, put_char/1
put_code/2, put_code/1
nl/0, nl/1

Reading from binary streams

get_byte/2, get_byte/1
peek_byte/2, peek_byte/1
put_byte/2, put_byte/1

Term input and output

read_term/2, read_term/3
read/1, read/2

Termini di scrittura

write_term/3, write_term/2
write/1, write/2
writeq/1, writeq/2
write_canonical/1, write_canonical/2

Operatori

op/3
current_op/3

Conversione di caratteri

char_conversion/2
current_char_conversion/2

Logica e controllo

(\+)/1
Not provable
once/1
repeat/0

Atom processing

atom_length/2
atom_concat/3
sub_atom/5
atom_chars
atom_codes/2
char_code/2
number_chars/2
number_codes/2

Implementazione definita

set_prolog_flag/2
current_prolog_flag/2
halt/0, halt/1

Funtori

Funtori di valore

(+)/2
Addizione
(-)/2
Sottrazione
(*)/2
Moltiplicazione
(//)/2
Divisione intero
(/)/2
Divisione
(rem)/2
Rimando
(mod)/2
Modulo
(-)/1
Negazione
(abs)/1
Valore assoluto
(sign)/1
Sign
(float_integer_part)/1
Integer part
(float_fractional_part)/1
Fractional part
(float)/1
Float coercion
(floor)/1
Floor
(truncate)/1
Truncate
(round)/1
Round
(ceiling)/1
Ceiling

Funzioni aritmetiche e di bit

(**)/2
Potenza
sin/1
Seno
cos/1
Coseno
atan/1
Arcotangente
exp/1
Esponente
log/1
Logaritmo
sqrt/1
Radice quadrata
(>>)/2
Scorrimento Bit a destra
(<<)/2
Scorrimento bit a sinistra
(/\)/2
Bitwise and
(\/)/2
Bitwise or
(\)/1
Bitwise complemento