head 1.35; access; symbols; locks ulrich:1.35; strict; comment @# @; 1.35 date 2024.07.02.15.42.37; author ulrich; state Exp; branches; next 1.34; 1.34 date 2024.06.06.07.39.21; author ulrich; state Exp; branches; next 1.33; 1.33 date 2024.05.07.13.39.37; author ulrich; state Exp; branches; next 1.32; 1.32 date 2024.03.15.14.00.50; author ulrich; state Exp; branches; next 1.31; 1.31 date 2024.03.12.09.38.41; author ulrich; state Exp; branches; next 1.30; 1.30 date 2024.03.11.09.07.06; author ulrich; state Exp; branches; next 1.29; 1.29 date 2024.03.11.07.26.06; author ulrich; state Exp; branches; next 1.28; 1.28 date 2024.03.05.07.28.47; author ulrich; state Exp; branches; next 1.27; 1.27 date 2024.03.05.07.11.56; author ulrich; state Exp; branches; next 1.26; 1.26 date 2024.03.05.07.07.44; author ulrich; state Exp; branches; next 1.25; 1.25 date 2023.08.12.03.38.50; author ulrich; state Exp; branches; next 1.24; 1.24 date 2023.08.12.03.30.15; author ulrich; state Exp; branches; next 1.23; 1.23 date 2023.06.26.08.19.11; author ulrich; state Exp; branches; next 1.22; 1.22 date 2023.06.08.08.25.54; author ulrich; state Exp; branches; next 1.21; 1.21 date 2022.08.26.16.30.19; author ulrich; state Exp; branches; next 1.20; 1.20 date 2022.07.26.14.29.27; author ulrich; state Exp; branches; next 1.19; 1.19 date 2022.05.18.09.44.52; author ulrich; state Exp; branches; next 1.18; 1.18 date 2022.05.11.09.35.33; author ulrich; state Exp; branches; next 1.17; 1.17 date 2019.06.01.13.01.18; author ulrich; state Exp; branches; next 1.16; 1.16 date 2018.07.07.15.06.07; author ulrich; state Exp; branches; next 1.15; 1.15 date 2014.11.30.23.28.58; author ulrich; state Exp; branches; next 1.14; 1.14 date 2014.04.13.21.43.16; author ulrich; state Exp; branches; next 1.13; 1.13 date 2013.11.29.09.15.30; author ulrich; state Exp; branches; next 1.12; 1.12 date 2012.09.06.06.16.53; author ulrich; state Exp; branches; next 1.11; 1.11 date 2012.08.21.12.01.20; author ulrich; state Exp; branches; next 1.10; 1.10 date 2012.07.08.14.44.17; author ulrich; state Exp; branches; next 1.9; 1.9 date 2012.07.06.15.56.18; author ulrich; state Exp; branches; next 1.8; 1.8 date 2012.07.06.15.54.01; author ulrich; state Exp; branches; next 1.7; 1.7 date 2012.07.06.15.49.14; author ulrich; state Exp; branches; next 1.6; 1.6 date 2012.07.06.15.47.56; author ulrich; state Exp; branches; next 1.5; 1.5 date 2012.07.06.15.23.55; author ulrich; state Exp; branches; next 1.4; 1.4 date 2012.07.06.15.19.52; author ulrich; state Exp; branches; next 1.3; 1.3 date 2012.07.06.15.17.52; author ulrich; state Exp; branches; next 1.2; 1.2 date 2012.07.04.16.42.44; author ulrich; state Exp; branches; next 1.1; 1.1 date 2012.06.29.12.58.42; author ulrich; state Exp; branches; next ; desc @@ 1.35 log @length/2: added example that used to fail in Quintus 1.5 @ text @
The aim of the Prolog prologue is to avoid discussing such details and concentrate on the identification and precise definition of these commonly used predicates instead. The Prolog prologue is a possibly empty file to be included (7.4.2.7). After inclusion, the following predicates are defined. A processor may provide also some other means to include the prologue. For example, via a command line switch.
member(X, L)
is true if X
is an element of
the list L
.
More precisely,
member(X, L)
is true iff X
is an element of
a list prefix of L
.
Procedurally, member/2
is defined with the following
clauses.
member(X, [X|_L]). member(X, [_|L]) :- member(X, L).Alternatively:
member(X, [E|L]) :- ( X = E ; member(X, L) ).
member(?term, ?term)
?- member(X, [1,2]). X = 1 ; X = 2. ?- member(1, L). L = [1|_A] ; L = [_A,1|_B] ; L = [_A,_B,1|_C] ; ... . % ad infinitum ?- member(X, [Y,Z|nonlist]). X = Y ; X = Z. ?- member(X, nonlist). false. ?- member(X, X). sto, loops % occurs-check | sto, X = [X|_A] ; X = [_A,X|_B] ; X = [_A,_B,X|_C] ; ... % rational trees | sto, X = [_A|_B] ; X = [_A,[_A,[_A|_B]|_C]|_C] ; X = [_A,_B,[_A,_B,[_A,_B|_C]|_D]|_D] ; ... . % literal substitutions
append(Xs, Ys, Zs)
is true if Zs
is the
concatenation of the lists Xs
and Ys
.
More precisely,
append(Xs, Ys, Zs)
is true iff the list Xs
is a list prefix of Zs
and Ys
is
Zs
with prefix Xs
removed.
Procedurally, append/3
is defined with the following
clauses.
append([], Zs, Zs). append([X|Xs], Ys, [X|Zs]) :- append(Xs, Ys, Zs).
append(?term, ?term, ?term)
?- append([a,b],[c,d], Xs). Xs = [a,b,c,d]. ?- append([a], nonlist, Xs). Xs = [a|nonlist]. ?- append([a], Ys, Zs). Zs = [a|Ys]. ?- append(Xs, Ys, [a,b,c]). Xs = [], Ys = [a,b,c] ; Xs = [a], Ys = [b,c] ; Xs = [a,b], Ys = [c] ; Xs = [a,b,c], Ys = []. ?- append(Xs, Ys, [a,b|Xs]). Xs = [], Ys = [a,b] ; Xs = [a], Ys = [b,a] ; Xs = [a,b], Ys = [a,b] ; Xs = [a,b,a], Ys = [b,a] ; ... . % ad infinitum
length(List, Length)
is true iff List
is a
list of length Length
.
length(List, Length)
is executed as
follows:
List
is neither a partial list nor a list, then
the goal fails.
List
is a list, then
unifies Length
with the length of List
.
Length
is an integer, then
unifies List
with a list of length Length
with Length
distinct fresh variables as elements.
Len
of N0 being the integer 0.
Length
with Len
and List
with a list of
length Len
with Len
distinct fresh
variables as elements.
List
is a partial list and Length
is
a variable, chooses the next element Len
of N0
and proceeds to step p.p.3.1 g.
length(List, Length)
is re-executable. On
backtracking, continue at p.p.3.1 h above.
length(?term, ?integer)
Length
is neither a variable nor an integer
type_error(integer, Length).
Length
is an integer that is less than zero
domain_error(not_less_than_zero, Length).
?- length([a,b,c], Length). Length = 3. ?- length(List, 5). List = [_A,_B,_C,_D,_E]. ?- length(List, Length). List = [], Length = 0 ; List = [_A], Length = 1 ; List = [_A,_B], Length = 2 ; ... . % Ad infinitum. ?- length([a|List],Length). List = [], Length = 1 ; List = [_A], Length = 2 ; List = [_A,_B], Length = 3 ; ... . % Ad infinitum.
between(Lower, Upper, X)
is true iff X
is
greater than or equal to Lower
, and less than or equal to Upper
.
between(Lower, Upper, X)
is
defined with the following clauses when no error conditions apply.
between(Lower, Upper, Lower) :- Lower =< Upper. between(Lower1, Upper, X) :- Lower1 < Upper, Lower2 is Lower1 + 1, between(Lower2, Upper, X).
between(+integer,+integer,?integer)
Lower
is a variable
instantiation_error.
Upper
is a variable
instantiation_error.
Lower
is neither a variable nor an integer
type_error(integer, Lower).
Upper
is neither a variable nor an integer
type_error(integer, Upper).
X
is neither a variable nor an integer
type_error(integer, X).
between(X, X, 1)
.
?- between(1, 2, 0). false. ?- between(1, 2, I). I = 1 ; I = 2. ?- between(2, 1, I). false. ?- between(I, I, 0). instantiation_error. ?- between(1, I, 0). instantiation_error. ?- between(I, -1, 0). instantiation_error. ?- between(1, c, 0). type_error(integer, c). ?- between(1+1,2,I). type_error(integer, 1+1).
select(X, Xs, Ys)
is true if X
is an element
of the list Xs
and Ys
is the
list Xs
with one occurrence of X
removed.
Procedurally, select/3
is defined with the following
clauses.
select(E, [E|Xs], Xs). select(E, [X|Xs], [X|Ys]) :- select(E, Xs, Ys).
select(?term, ?term, ?term)
?- select(X, [1,2], Xs). X = 1, Xs = [2] ; X = 2, Xs = [1]. ?- select(X, [Y|nonlist], Xs). X = Y, Xs = nonlist. ?- select(E, Xs, Xs). sto, loops | sto, Xs = [E|Xs] ; Xs = [_A,E|_B], _B = [E|_B] ; ... .
succ(X, S)
is true iff S
is
the successor of the non-negative integer X
.
succ(X, S)
is
defined with the following clauses when no error conditions apply.
succ(X, S) :- ( nonvar(S) -> S > 0, X is S-1 ; S is X+1 ).
succ(?integer,+integer)
succ(+integer,-integer)
X
is a variable and S
is a variable.
instantiation_error.
X
is neither a variable nor an integer
type_error(integer, X).
S
is neither a variable nor an integer
type_error(integer, S).
X
is an integer that is less than zero
domain_error(not_less_than_zero, X).
S
is an integer that is less than zero
domain_error(not_less_than_zero, S).
X
is maxint and S
is a variable.
evaluation_error(int_overflow).
repesentation_error(max_integer).
succ(X, X)
requires an instantiation
error although there is no solution.
?- succ(X, S). instantiation_error. ?- succ(X, X). instantiation_error. ?- succ(0, S). S = 1. ?- succ(1, 1+1). type_error(integer, 1+1). ?- succ(X, 0). false. ?- succ(-1, S). domain_error(not_less_than_zero, -1). ?- current_prolog_flag(max_integer, MI), succ(MI, 0). false. ?- current_prolog_flag(max_integer, MI), succ(MI, 1). false. ?- current_prolog_flag(max_integer, MI), succ(MI, MI). false. ?- current_prolog_flag(max_integer, MI), succ(MI, S). false | evaluation_error(int_overflow) | representation_error(max_integer).
maplist(R_1, E1s)
is true iff
E1s
is a list and
for each element E1
of E1s
,
call(R_1, E1)
is true.
maplist(R_2, E1s, E2s)
is true iff
E1s
and E2s
are lists of same length
and
for each element E1
of E1s
and each corresponding
element of E2
,
call(R_2, E1, E2)
is true.
maplist(R_n, E1s, E2s, ... Ens)
is true iff
E1s
, E2s
up to Ens
are
lists of same length
and call(R_n, E1_i, E2_i, ... En_i)
is true for
each i
where Ek_i
is the i-th element of Listk
.
Procedurally, maplist/2..8
is defined with the following
clauses.
maplist(_R_1, []). maplist(R_1, [E1|E1s]) :- call(R_1, E1), maplist(R_1, E1s). maplist(_R_2, [], []). maplist(R_2, [E1|E1s], [E2|E2s]) :- call(R_2, E1, E2), maplist(R_2, E1s, E2s). maplist(_R_3, [], [], []). maplist(R_3, [E1|E1s], [E2|E2s], [E3|E3s]) :- call(R_3, E1, E2, E3), maplist(R_3, E1s, E2s, E3s). ... maplist(_R_n, [], [], ... []). maplist(R_n, [E1|E1s], [E2|E2s], ... [En|Ens]) :- call(R_n, E1, E2, ... En), maplist(R_n, E1s, E2s, ... Ens).
maplist(?term, ?term)
maplist(?term, ?term, ?term)
maplist(?term, ?term, ?term, ?term)
maplist(?term, ?term, ?term, ... ?term)
?- maplist(>(3), [1, 2]). true. ?- maplist(>(3), [1, 2, 3]). false. ?- maplist(=(X), Xs). Xs = [] ; Xs = [X] ; Xs = [X, X] ; Xs = [X, X, X] ; ... . % Ad infinitum.
nth0(N, Es0, E, Es)
is true if E
is an
element of the list Es0
and there are N
elements before E
. Es
is the list without this
occurence of E
.
More precisely,
nth0(N, Es0, E, Es)
is true iff there is a list
prefix Prefix
of Es0
and length(Prefix,N), append(Prefix,[E|Postfix], Es0),
append(Prefix, Postfix, Es)
is true.
nth0(?integer, ?term, ?term, ?term)
nth0(?integer, ?term, ?term)
nth1(?integer, ?term, ?term, ?term)
nth1(?integer, ?term, ?term)
N
is neither a variable nor an integer
type_error(integer, N).
N
is an integer that is less than zero
domain_error(not_less_than_zero, N).
?- nth0(1, [a,b,c], E). E = b. ?- nth0(N, [a,b,c], E). N = 0, E = a ; N = 1, E = b ; N = 2, E = c. ?- nth0(0, [A,B|non_list], E). A = E. ?- nth0(2, Es, E). Es = [_A,_B,E|_C]. ?- nth0(N, Es, E). N = 0, Es = [E|_A] ; N = 1, Es = [_A,E|_B] ; N = 2, Es = [_A,_B,E|_C] ; N = 3, Es = [_A,_B,_C,E|_D] ; ... . ?- nth0(non_integer, Es, E). type_error(integer, non_integer). ?- nth0(-1, Es, E). domain_error(not_less_than_zero, -1). ?- nth0(N, [[]|Es], Es). N = 0, Es = [] ; sto, loops | N = 0, Es = [] ; sto, N = 1, Es = [Es|_A] ; ... . ?- nth1(0, Es, E). false.
nth0/3
, nth1/4
,
and nth1/3
all provide similar functionality to
nth0/4
.
nth0(N, Es0, E) :- nth0(N, Es0, E, _). nth1(N, Es0, E, Es) :- N \== 0, nth0(N, [_|Es0], E, [_|Es]), N \== 0. nth1(N, Es0, E) :- nth1(N, Es0, E, _).
foldl(R_3, Xs, S0,S)
is true iff Xs
is a
list and for all elements X1
..Xn
of Xs
the
following is true.
call(R_3, X1, S0,S1), call(R_3, X2, S1,S2), ..., call(R_3, Xn, Spn,S).
foldl(R_4, Xs, Ys, S0,S)
is true iff Xs
and Ys
are lists of same length and for all
elements X1
..Xn
of Xs
and Y1
..Yn
of Ys
the following is
true.
call(R_4, X1, Y1, S0,S1), call(R_4, X2, Y2, S1,S2), ..., call(R_4, Xn, Yn, Spn,S).
foldl(R_5, Xs, Ys, Zs, S0,S)
is true
iff Xs
, Ys
, and Zs
are lists of same length and for all
elements X1
..Xn
of Xs
,
Y1
..Yn
of Ys
, and
Z1
..Zn
of Zs
the following is
true.
call(R_5, X1, Y1, Z1, S0,S1), call(R_5, X2, Y2, Z2, S1,S2), ..., call(R_5, Xn, Yn, Zn, Spn,S).
Procedurally, foldl/4..6
is defined with the following
clauses.
foldl(_, [], S,S). foldl(R_3, [X|Xs], S0,S) :- call(R_3, X, S0,S1), foldl(R_3, Xs, S1,S1). foldl(_, [], [], S,S). foldl(R_4, [X|Xs], [Y|Ys], S0,S) :- call(R_4, X, Y, S0,S1), foldl(R_4, Xs, Ys, S1,S). foldl(_, [], [], [], S,S). foldl(R_5, [X|Xs], [Y|Ys], [Z|Zs], S0,S) :- call(R_5, X, Y, Z, S0,S1), foldl(R_5, Xs, Ys, Zs, S1,S).
foldl(?term, ?term, ?term,?term)
foldl(?term, ?term, ?term, ?term,?term)
foldl(?term, ?term, ?term, ?term, ?term,?term)
scanlist
or reduce
in some Prolog
processors.
?- foldl(append, [[1,2],[3],[4,5]], [],Xs). Xs = [4,5,3,1,2].
template(X, S)
is true iff S
is
the templateessor of the non-negative integer X
.
template(?integer,+integer)
template(+integer,-integer)
X
is a variable and @@.
instantiation_error.
?- true. true.
foldl(R_5, Xs, Ys, Ys, S0,S)
is true
@
1.31
log
@*** empty log message ***
@
text
@d414 1
a414 1
member(?term, ?term).
d479 1
a479 1
append(?term, ?term, ?term).
d502 7
@
1.30
log
@*** empty log message ***
@
text
@d374 1
a374 1
maplist(Cont_1, E1s)
d817 1
a817 1
call(Cont_1, E1)
is true.
d820 1
a820 1
maplist(Cont_2, E1s, E2s)
d826 1
a826 1
call(Cont_2, E1, E2)
is true.
d828 1
a828 1
maplist(Cont_n, E1s, E2s, ... Ens)
is true iff
d831 1
a831 1
and call(Cont_n, E1_i, E2_i, ... En_i)
is true for
d838 14
a851 14
maplist(_Cont_1, []).
maplist(Cont_1, [E1|E1s]) :-
call(Cont_1, E1),
maplist(Cont_1, E1s).
maplist(_Cont_2, [], []).
maplist(Cont_2, [E1|E1s], [E2|E2s]) :-
call(Cont_2, E1, E2),
maplist(Cont_2, E1s, E2s).
maplist(_Cont_3, [], [], []).
maplist(Cont_3, [E1|E1s], [E2|E2s], [E3|E3s]) :-
call(Cont_3, E1, E2, E3),
maplist(Cont_3, E1s, E2s, E3s).
d855 4
a858 4
maplist(_Cont_n, [], [], ... []).
maplist(Cont_n, [E1|E1s], [E2|E2s], ... [En|Ens]) :-
call(Cont_n, E1, E2, ... En),
maplist(Cont_n, E1s, E2s, ... Ens).
@
1.26
log
@foldl/4..6 finally defined
@
text
@a1065 4
template(X, S)
is true iff S
is
the templateessor of the non-negative integer X
.
d1005 13
a1017 1
template(?integer,+integer)
template(+integer,-integer)
d1026 13
a1038 1
X
is a variable and @@.
d1062 3
a1064 1
instantiation_error.
d1066 1
a1066 1
nth0(N, Es0, E, Es)
is true if of the
list Es0
and Es
is the list after position
@@@@@@.
d885 4
a888 1
nth0(N, Es0, E, Es)
is true iff (@@list prefix)
d968 1
a968 1
nth0(N, [_|Es0], E, Es),
d976 1
d978 1
a978 34
succ(X, S)
is true iff S
is
the successor of the non-negative integer X
.
succ(?integer,+integer)
succ(+integer,-integer)
X
is a variable and @@.
instantiation_error.
?- true. true.
succ(X, S)
is true iff S
is
the successor of the non-negative integer X
.
d987 2
a988 2
succ(?integer,+integer)
succ(+integer,-integer)
@
1.19
log
@N290
@
text
@d5 1
a5 1
List
is a partial list and Length
is
the variable of the partial list. (Implementation defined)
type_error(integer, []).
d611 1
a611 1
type_error(integer,Lower).
d615 1
a615 1
type_error(integer,Upper).
d619 1
a619 1
type_error(integer,X).
d651 1
a651 1
type_error(integer,c).
d654 1
a654 1
type_error(integer,1+1).
d720 1
a720 1
type_error(integer,X).
d724 1
a724 1
type_error(integer,S).
d868 170
@
1.18
log
@*** empty log message ***
@
text
@d5 1
a5 1
succ(+integer,?integer)
succ(-integer,+integer)
d741 1
a741 1
is maxint.
d743 2
a744 1
evaluation_error(int_overflow)
a745 4
X
is maxint and S
is a variable.
evaluation_error(int_overflow)
d779 4
a782 2
?- current_prolog_flag(max_integer, Max),
( integer(Max) -> succ(Max, S) ; true ).
d784 5
a788 1
| Max = unbounded.
@
1.17
log
@Stefan Kral!
@
text
@d5 1
a5 1
maplist(Cont, List1)
is true iff List1
is a
list and call(Cont,
X1)
is true for each element X1
of List1
.
maplist(Cont, List1, List2)
is true
iff List1
and List2
are lists of same length
and call(Cont, X1, X2)
is true for each
element X1
of List1
and each corresponding
element of X2
.
d782 2
a783 2
maplist(Cont, List_1, List_2, ... List_n)
is true iff
List_1
, List_2
up to List_n
are
d785 2
a786 2
and call(Cont, E_1_i, E_2_i, ... E_n_i)
is true for
each i
where E_k_i
is the i-th element of List_k
.
d792 14
a805 9
maplist(_Cont, []).
maplist(Cont, [E_1|List_1]) :-
call(Cont, E_1),
maplist(Cont, List_1).
maplist(_Cont, [], []).
maplist(Cont, [E_1|List_1], [E_2|List_2]) :-
call(Cont, E_1, E_2),
maplist(Cont, List_1, List_2).
d809 4
a812 4
maplist(_Cont, [], [], ... []).
maplist(Cont, [E_1|List_1], [E_2|List_2], ... [E_n|List_n]) :-
call(Cont, E_1, E_2, ... E_n),
maplist(Cont, List_1, List_2, ... List_n).
d820 4
a823 1
...
@
1.13
log
@Vor ROK-Kommentaren
@
text
@d579 1
a579 1
greater or equal Lower
, and less or equal Upper
.
@
1.12
log
@Changes made during WG17 meeting.
@
text
@d5 1
a5 1
Len
of N being the integer 0.
d522 1
a522 1
a variable, chooses the next element Len
of N
d548 7
@
1.11
log
@N235
@
text
@d428 3
d446 3
a448 2
is a list prefix of Zs
and Ys
occurs
in Zs
immediately after the prefix Xs
.
d677 7
@
1.10
log
@*** empty log message ***
@
text
@d5 1
a5 1
Length
is a neither a variable nor an integer
d652 1
a652 1
X
is a neither a variable nor an integer
d656 1
a656 1
S
is a neither a variable nor an integer
@
1.8
log
@*** empty log message ***
@
text
@d746 20
@
1.7
log
@*** empty log message ***
@
text
@d747 2
a748 1
Version control
d750 3
a752 1
Zs
and Ys
occurs
d439 10
a448 1
List
is a list, then proceeds to ...
d450 1
a450 1
Length
is an integer, then proceeds to ...
d452 4
a455 2
List
is a partial list and Length
is a variable ...
d457 3
a459 3
List
with a list of length Length
with Length
distinct fresh variables as elements.
d461 1
a461 1
Else the goal fails.
d467 1
a467 1
backtracking, continue at p.p.3.1 @@@@@@
d508 1
a508 1
greater or equal Lower
, and less or equal upper
.
d510 2
a511 3
between(Lower, Upper, X)
is executed as
follows:
d513 8
a520 9
I
between(Lower, Upper, X)
is re-executable. On
backtracking, continue at p.p.4.1 @@@@@@.
d703 2
a704 2
and i
where E_j_i is the i-th element of List_j.
d710 11
d722 4
a727 8
The zipWith3 function takes a function which combines three elements,
as well as three lists and returns a list of their point-wise
combination, analogous to zipWith.
@
1.1
log
@Initial revision
@
text
@d12 2
a13 1
background-color: white
d83 2
a84 2
and concentrate on the identification and precise definition of the
predicates instead. The Prolog prologue is a possibly empty file to
d94 4
a97 1
Additions by Cor.2:2012 are bold
d104 10
a113 10
1 true/0.
2 fail/0.
3 call/1.
4 !/0.
5 (',')/2.
6 (;)/2 - disjunction.
7 (->)/2.
8 (;)/2 - if-then-else.
9 catch/3.
10 throw/1.
d116 4
a119 4
1 bounded.
2 max_integer.
3 min_integer.
4 integer_rounding_function.
d122 5
a126 5
1 char_conversion.
2 debug.
3 maxarity.
4 unknown.
5 double_quotes.
d129 11
a139 11
a) instantiation_error/0.
b) type_error/2.
c) domain_error/2.
d) existence_error/2.
e) permission_error/3.
f) representation_error/1.
g) evaluation_error/1.
h) resource_error/1.
i) syntax_error/1.
j) system_error/0.
k) uninstantiation_error/1.
d142 4
a145 4
1 (=)/2.
2 unify_with_occurs_check/2.
3 (\=)/2.
4 subsumes_term/2.
d148 11
a158 11
1 var/1.
2 atom/1.
3 integer/1.
4 float/1.
5 atomic/1.
6 compound/1.
7 nonvar/1.
8 number/1.
9 callable/1.
10 ground/1.
11 acyclic_term/1.
d161 4
a164 4
1 (@@=<)/2, (==)/2, (\==)/2, (@@<)/2, (@@>)/2, (@@>=)/2.
2 compare/3.
3 sort/2.
4 keysort/2.
d167 5
a171 5
1 functor/3.
2 arg/3.
3 (=..)/2.
4 copy_term/2
5 term_variables/2.
d174 1
a174 1
1 (is)/2.
d177 1
a177 1
1 (=:=)/2, (=\=)/2, (<)/2, (=<)/2, (>)/2, (>=)/2.
d180 2
a181 2
1 clause/2.
2 current_predicate/1.
d184 5
a188 5
1 asserta/1.
2 assertz/1.
3 retract/1.
4 abolish/1.
5 retractall/1.
d191 3
a193 3
1 findall/3.
2 bagof/3.
3 setof/3.
d196 9
a204 9
1 current_input/1.
2 current_output/1.
3 set_input/1.
4 set_output/1.
5 open/4, open/3.
6 close/2, close/1.
7 flush_output/1, flush_output/0.
8 stream_property/2, at_end_of_stream/0, at_end_of_stream/1.
9 set_stream_position/2.
d207 3
a209 3
1 get_char/2, get_char/1, get_code/1, get_code/2.
2 peek_char/2, peek_char/1, peek_code/1, peek_code/2.
3 put_char/2, put_char/1, put_code/1, put_code/2, nl/0, nl/1.
d212 3
a214 3
1 get_byte/2, get_byte/1.
2 peek_byte/2, peek_byte/1.
3 put_byte/2, put_byte/1.
d217 6
a222 6
1 read_term/3, read_term/2, read/1, read/2.
2 write_term/3, write_term/2, write/1, write/2, writeq/1, writeq/2, write_canonical/1, write_canonical/2.
3 op/3.
4 current_op/3.
5 char_conversion/2.
6 current_char_conversion/2.
d225 5
a229 5
1 (\+)/1.
2 once/1.
3 repeat/0.
4 call/2..8.
5 false/0.
d232 8
a239 8
1 atom_length/2.
2 atom_concat/3.
3 sub_atom/5.
4 atom_chars/2.
5 atom_codes/2.
6 char_code/2.
7 number_chars/2.
8 number_codes/2.
d242 4
a245 4
1 set_prolog_flag/2.
2 current_prolog_flag/2.
3 halt/0.
4 halt/1.
d251 3
a253 1
ceiling/1, (+)/1, (div)/2.
d256 15
a270 15
1 (**)/2.
2 sin/1.
3 cos/1.
4 atan/1.
5 exp/1.
6 log/1.
7 sqrt/1.
8 max/2.
9 min/2.
10 (^)/2.
11 asin/1.
12 acos/1.
13 atan2/2.
14 tan/1.
15 pi/0.
d273 6
a278 6
1 (>>)/2.
2 (<<)/2.
3 (/\)/2.
4 (\/)/2.
5 (\)/1.
6 xor/2.
d283 2
a284 2
1 current_module/1.
2 predicate_property/2.
d287 1
a287 1
2 current_predicate/1.
d293 3
d724 2
@