head 1.36; access; symbols; locks ulrich:1.36; strict; comment @# @; 1.36 date 2010.12.11.20.48.14; author ulrich; state Exp; branches; next 1.35; 1.35 date 2010.07.27.20.34.01; author ulrich; state Exp; branches; next 1.34; 1.34 date 2010.07.22.07.53.50; author ulrich; state Exp; branches; next 1.33; 1.33 date 2010.07.21.06.08.05; author ulrich; state Exp; branches; next 1.32; 1.32 date 2010.07.20.14.46.13; author ulrich; state Exp; branches; next 1.31; 1.31 date 2010.07.19.11.13.35; author ulrich; state Exp; branches; next 1.30; 1.30 date 2010.07.09.13.19.00; author ulrich; state Exp; branches; next 1.29; 1.29 date 2009.11.02.20.25.43; author ulrich; state Exp; branches; next 1.28; 1.28 date 2009.11.02.20.23.23; author ulrich; state Exp; branches; next 1.27; 1.27 date 2009.11.02.00.53.26; author ulrich; state Exp; branches; next 1.26; 1.26 date 2009.11.02.00.51.51; author ulrich; state Exp; branches; next 1.25; 1.25 date 2009.11.02.00.51.30; author ulrich; state Exp; branches; next 1.24; 1.24 date 2009.11.01.23.53.04; author ulrich; state Exp; branches; next 1.23; 1.23 date 2009.11.01.23.51.35; author ulrich; state Exp; branches; next 1.22; 1.22 date 2009.11.01.23.47.10; author ulrich; state Exp; branches; next 1.21; 1.21 date 2009.10.27.10.19.49; author ulrich; state Exp; branches; next 1.20; 1.20 date 2009.10.26.20.40.40; author ulrich; state Exp; branches; next 1.19; 1.19 date 2009.10.22.14.37.02; author ulrich; state Exp; branches; next 1.18; 1.18 date 2009.10.22.14.13.59; author ulrich; state Exp; branches; next 1.17; 1.17 date 2009.10.22.13.50.08; author ulrich; state Exp; branches; next 1.16; 1.16 date 2009.10.22.12.10.29; author ulrich; state Exp; branches; next 1.15; 1.15 date 2009.10.22.11.38.34; author ulrich; state Exp; branches; next 1.14; 1.14 date 2009.10.22.11.36.27; author ulrich; state Exp; branches; next 1.13; 1.13 date 2009.10.21.20.45.48; author ulrich; state Exp; branches; next 1.12; 1.12 date 2009.10.21.20.08.57; author ulrich; state Exp; branches; next 1.11; 1.11 date 2009.10.21.20.03.33; author ulrich; state Exp; branches; next 1.10; 1.10 date 2009.10.21.19.37.04; author ulrich; state Exp; branches; next 1.9; 1.9 date 2009.10.21.13.58.03; author ulrich; state Exp; branches; next 1.8; 1.8 date 2009.10.20.17.26.31; author ulrich; state Exp; branches; next 1.7; 1.7 date 2009.10.20.11.45.25; author ulrich; state Exp; branches; next 1.6; 1.6 date 2009.10.19.20.47.37; author ulrich; state Exp; branches; next 1.5; 1.5 date 2009.10.19.03.36.10; author ulrich; state Exp; branches; next 1.4; 1.4 date 2009.10.19.03.33.35; author ulrich; state Exp; branches; next 1.3; 1.3 date 2009.10.19.03.27.32; author ulrich; state Exp; branches; next 1.2; 1.2 date 2009.10.19.03.01.47; author ulrich; state Exp; branches; next 1.1; 1.1 date 2009.10.19.02.55.00; author ulrich; state Exp; branches; next ; desc @@ 1.36 log @Final @ text @
This is the final state of the document as it was used for the resolutions in Edinburgh. In the meantime many systems adopted accordingly.In 13211-1:1995 built-in predicates (8) are provided automatically by a standard-conforming processor. This document provides an overview of the current practice of built-in predicates that are not part of 13211-1 but are compliant (5.1) due to:
5.5.9 Built-in predicates
A processor may support one or more additional built-in
predicates (8) as an implementation specific feature.
Implementors interested in standardization who wish to see their system listed in this table are asked to provide a table in HTML with the complete first row and one row for their system. Please consider only additional built-in predicates if you believe that they should be part of the Prolog core.
In all known Prolog processors, there is no distiction between control constructs (7.8) and built-in predicates (8) w.r.t. predicate_property/2.
bip : built-in predicate lib : library - must be loaded explicitly pdp : pre-defined predicate - either autoloaded or pre-defined otherwise. alt : alternate name or very close alternate definition - : this built-in is not present empty : this field is unknown, please help to remove the unknowns!
core | core | pllib | B | IF | SICStus | YAP | SWI | ECLiPSe | GNU | |
Functor | 2008-11-17 | 2009-07-17 | 7B | 7.3 | 5.3 | 3.12 | 6.0 | 5.7 | 6.0 | 1.3 |
compare/3 | 8.4.2 | 8.4.2 | bip | bip | bip | bip | bip | bip | bip | bip |
sort/2 | 8.18.4 | 8.18.4 | any | bip | bip | bip | bip | bip | bip | bip |
keysort/2 | 8.18.5 | 8.18.5 | any | bip | - | bip | bip | bip | bip | bip |
ground/1 | 8.3.10 | 8.3.10 | bip | bip | bip | bip | bip | bip | bip | |
call/2-8 | 8.15.4 | 8.15.4 | bip | bip | ... | 4 | bip | bip | lib | bip |
false/0 | pdp | - | bip | bip | pdp | bip | new | |||
callable/1 | 8.3.9 | 8.3.9 | pdp | - | bip | bip | bip | bip | bip | |
subsumes_term/2 | alt | - | alt | alt | alt | alt | - | |||
alt | lib | lib | bip | lib | ||||||
alt | 4 | alt | alt | alt | ||||||
bip | alt | alt | alt | alt | ||||||
acyclic_term/1 | alt | 8.3.11 | - | alt | lib | lib | bip | bip | - | |
8.3.11 | alt | - | alt | alt | alt | alt | alt | - | ||
8.3.12 | alt | - | bip | alt | alt | alt | alt | - | ||
term_variables/2,3 | bip | lib | bip | bip | lib | |||||
retractall/1 | 8.9.5 | 8.9.5 | bip | - | bip | bip | bip | bip | bip | |
numbervars/3 | 8.5.5 | 8.5.5 | bip | - | bip | bip | bip | lib | bip | |
subsumes/2 | 8.2.4 | 8.2.4 | alt | - | lib | lib | bip | lib | - | |
forall/2 | 8.10.4 | 8.10.4 | pdp | - | - | bip | bip | lib | new | |
setup_call_cleanup/3 | 7.8.11 | new | - | alt | bip | bip | lib | - | ||
call_cleanup/2 | 8.15.5 | bip | - | bip | bip | bip | alt | - | ||
(?=)/2 | ? | bip | - | bip | - | bip | lib | - | ||
between/3 | bip | - | - | - | lib | bip | lib | - | ||
is_list/1 | ? | bip | - | lib | bip | bip | bip | - | ||
variant/2 | bip | lib | lib | alt | bip | |||||
(=@@=)/ 2 | alt | alt | bip | alt | ||||||
between/4 | ? | - | - | - | - | - | bip | - | ||
(>=<)/2 | bip | - | - | - | - | - | - | - | ||
arity/2 | - | - | - | - | - | bip | - | |||
length/2 | 8.18.2 | lib | any | bip | - | bip | bip | bip | bip | bip |
append/3 | 8.18.1 | lib | any | bip | bip | lib | lib | pdp | bip | bip |
member/2 | 8.18.3 | lib | any | bip | bip | lib | lib | pdp | bip | bip |
8.2.4.1 DescriptionThe last sentence should go reformulated into subclause 8.2.4 (precedent: 8.10.2 bagof/3).
subsumes(General, Specific)
is true iff there is a substitution θ, including the empty substitution, such thatthe term General is instantiated. Generalθ = Specific = Specificθ . This predicate provides a one-way unification.
subsumes(General, Specific) :- subsumes_chk(General, Specific), General = Specific.
subsumes_term(General, Specific)
is true iff there is a
substitution θ such
that
General
θ andSpecific
θ are identical, and
Specific
θ andSpecific
are identical.
Procedurally, subsumes_term(General, Specific)
simply succeeds or fails accordingly. There is no side effect or
unification.
subsumes_term(@@term, @@term)
subsumes_term(a, a). Succeeds. subsumes_term(f(X,Y), f(Z,Z)). Succeeds. subsumes_term(f(Z,Z), f(X,Y)). Fails. subsumes_term(g(X), g(f(X))). Fails. subsumes_term(X, f(X)). Fails. subsumes_term(X, Y), subsumes_term(Y, f(X)). Succeeds.
NOTES
1subsumes_term/2
is not transitive. The last two examples above illustrate this.
2 A related built-in predicatesubsumes/2
is implemented in many existing processors. In addition to testing for one-sided unifiability, it binds the first argument to become the second. In many situations this binding leads to erroneous programs. The following definition is deprecated and is mentioned here only for backwards compatibility.subsumes(General, Specific) :- subsumes_term(General, Specific), General = Specific.
sort(Xs, Sorted) :- setof(X, member(X,Xs), Sorted). sort([], []).Is
sort(@@list, ?list)
a good mode? After all
?- sort([A],[a]). A = a.
mykeysort(KV_s, Sorted) :- bagof(K-V, Vs^ ( setof(K-Vs, bagof(V, member(K-V,KV_s), Vs), KVs_s), member(K-Vs, KVs_s), member(V, Vs) ), Sorted). mykeysort([], []).Is
keysort(@@list, ?list)
a good mode? After
variant_halfcorrect(A, B) :- subsumes_term(A, B), subsumes_term(B, A).The more costly version would them be:
variant_correct(A, B) :- copy_term(A, AC), subsumes_term(AC, B), subsumes_term(B, AC).
keysort(@@list, ?list)
a good mode? After
@
1.34
log
@Last additions prior to voting
@
text
@d6 1
a6 1
Specific
θ
= Specific
.
d291 1
a291 1
second. In most situations this binding leads to erroneous programs.
@
1.30
log
@Updated versions
@
text
@d108 1
d124 9
a132 10
NOTE — A related built-in predicate subsumes/2
is
implemented in many existing processors. In addition to testing for
semi-unifiability, it binds the first argument to become the
second. In most situations this binding leads to erroneous programs.
d248 2
a249 2
Procedurally, subsumes_term(General, Specific)
succeeds
or fails; there is no unification.
d264 6
d276 1
a276 1
subsumes_term(f(X,Y), f(Z,Z)).
a277 3
subsumes_term(f(Z,Z), f(X,Y)).
Fails.
d281 11
a291 1
NOTE — The following definition is deprecated and is mentioned
d337 20
@
1.29
log
@*** empty log message ***
@
text
@d141 1
a141 1
subsumes_chk(General, Specific)
is true iff there is a
d244 1
a244 1
Procedurally, subsumes_chk(General, Specific)
succeeds
d249 1
a249 1
subsumes_chk(@@term, @@term)
d257 10
a266 1
subsumes_chk(f(X,Y), f(Z,Z)).
d269 2
a270 2
subsumes_chk(f(Z,Z), f(X,Y)).
Fails
d273 3
a275 4
subsumes/2
provides
similar functionality to subsumes_chk/2
except that
subsumes/2
unifies the arguments.
d278 1
a278 1
subsumes_chk(General, Specific),
d281 1
@
1.28
log
@*** empty log message ***
@
text
@d218 1
a218 1
may replace the current definition of subsumes/2.
@
1.27
log
@*** empty log message ***
@
text
@d218 1
a218 1
may replace the current definition of subsumes/2.
@
1.26
log
@*** empty log message ***
@
text
@d238 1
a238 1
or fails. No unification is performed.
@
1.25
log
@*** empty log message ***
@
text
@d237 1
a237 1
Procedurally, subsumes_chk(General, Specific)
suceeds
@
1.24
log
@*** empty log message ***
@
text
@d217 1
a217 1
subsumes(General, Specific)
is true iff there is a
@
1.18
log
@Further reformulation for subsumes/2
@
text
@d180 3
a182 1