Logtalk files

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@55 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2001-06-06 20:07:01 +00:00
parent 8082de6375
commit fd048651b6
131 changed files with 6279 additions and 0 deletions

View File

@ -0,0 +1,10 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.8.4
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this library consult the planner.loader utility
file (note that the *.loader files are Prolog files).

View File

@ -0,0 +1,15 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.8.4
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
=================================================================
% plan a trip from london to the aiai conference in edinburgh:
| ?- plan(london)::from(imperial, aiai, L).
L = [[taxi(imperial,lhr)]-[fly(lhr,edin)]-[taxi(edin,aiai)]] ?
yes

View File

@ -0,0 +1,9 @@
:- object(aberdeen_air,
extends(airport)).
fly(renfrew).
:- end_object.

View File

@ -0,0 +1,6 @@
:- object(aiai,
extends(edinburgh)).
:- end_object.

View File

@ -0,0 +1,16 @@
:- object(airport).
:- public(fly/1).
:- mode(fly(?), zero_or_more).
:- public(airport/1).
:- mode(airport(?), zero_or_more).
airport(Airport) :-
self(Airport).
:- end_object.

View File

@ -0,0 +1,6 @@
:- object(albert_hall,
extends(london)).
:- end_object.

View File

@ -0,0 +1,6 @@
:- object(castle,
extends(edinburgh)).
:- end_object.

View File

@ -0,0 +1,30 @@
:- object(city).
:- public(step/3).
:- mode(step(+, +, -), zero_or_more).
:- public(airport/1).
:- mode(airport(?atom), zero_or_more).
step(X, Y, P1-P-P2) :-
\+ same_city(X, Y), !,
X::airport(XA),
Y::airport(YA),
plan(fly)::from(XA, YA, P),
plan(city)::from(X, XA, P1),
plan(city)::from(YA, Y, P2).
step(X, Y, taxi(X, Y)) :-
same_city(X, Y),
X \= Y.
same_city(X, Y) :-
X::airport(A),
Y::airport(A).
:- end_object.

View File

@ -0,0 +1,6 @@
:- object(edin,
extends(edinburgh)).
:- end_object.

View File

@ -0,0 +1,9 @@
:- object(edinburgh,
extends(city)).
airport(edin).
:- end_object.

View File

@ -0,0 +1,13 @@
:- object(fly).
:- public(step/3).
:- mode(step(+, +, -), zero_or_more).
step(From, To, fly(From, To)) :-
From::fly(To).
:- end_object.

View File

@ -0,0 +1,9 @@
:- object(glasgow,
extends(city)).
airport(renfrew).
:- end_object.

View File

@ -0,0 +1,6 @@
:- object(imperial,
extends(london)).
:- end_object.

View File

@ -0,0 +1,10 @@
:- object(lhr,
extends(airport)).
fly(edin).
fly(ringway).
:- end_object.

View File

@ -0,0 +1,9 @@
:- object(london,
extends(city)).
airport(lhr).
:- end_object.

View File

@ -0,0 +1,9 @@
:- object(manchester,
extends(city)).
airport(ringway).
:- end_object.

View File

@ -0,0 +1,46 @@
:- object(plan(_)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is 'Air-line trip planner.',
parnames is ['Mode'],
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- public(from/3).
:- mode(from(+atom, +atom, -list), zero_or_more).
:- info(from/3,
[comment is 'Plan a trip from Start to Destination.',
argnames is ['Start', 'Destination', 'Plan']]).
from(Start, Destination, Plan) :-
from(Start, Destination, [], Plan).
from(Start, Destination, _, [Step]) :-
parameter(1, Mode),
Mode::step(Start, Destination, Step),
!.
from(Start, Destination, Locations, [Step| Steps]) :-
parameter(1, Mode),
Mode::step(Start, City2, Step),
not_member(City2, Locations),
from(City2, Destination, [Start| Locations], Steps).
not_member(_, []).
not_member(City, [Location| Locations]) :-
City \= Location,
not_member(City, Locations).
:- end_object.

View File

@ -0,0 +1,21 @@
:- initialization(
logtalk_load([
aberdeen_air,
aiai,
airport,
albert_hall,
castle,
city,
edin,
edinburgh,
fly,
glasgow,
imperial,
lhr,
london,
manchester,
plan1,
renfrew,
ringway,
victoria])).

View File

@ -0,0 +1,10 @@
:- object(renfrew,
extends(airport)).
fly(aberdeen_air).
fly(ringway).
:- end_object.

View File

@ -0,0 +1,10 @@
:- object(ringway,
extends(manchester, airport)).
fly(lhr).
fly(renfrew).
:- end_object.

View File

@ -0,0 +1,6 @@
:- object(victoria,
extends(manchester)).
:- end_object.

View File

@ -0,0 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.8.4
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this library consult the travellers.loader utility
file (note that the *.loader files are Prolog files).

View File

@ -0,0 +1,38 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.8.4
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
=================================================================
% build a route by adding one town at a time:
| ?- incremental::route([london, brighton, portsmouth, exeter, oxford, aberystwyth], Route).
Route = oxford~london~portsmouth~brighton~exeter~aberystwyth ?
yes
% presort towns by geographical distance before using the incremental algorithm:
| ?- presort::route([london, brighton, portsmouth, exeter, oxford, aberystwyth], Route).
Route = brighton~london~oxford~portsmouth~exeter~aberystwyth ?
yes
% come home after the journey:
| ?- circular::route([london, brighton, portsmouth, exeter, oxford, aberystwyth], Route).
Route = london~brighton~portsmouth~exeter~aberystwyth~oxford~london ?
yes
% blind search by generating permutations of the list of towns:
| ?- permute::route([london, brighton, portsmouth, exeter, oxford, aberystwyth], Route).
Route = (aberystwyth~exeter~portsmouth~brighton~london~oxford,273.6237583942784) ?
yes

View File

@ -0,0 +1,11 @@
:- object(aberdeen,
extends(location(194, 340))).
links([
(edinburgh, 115),
(glasgow, 142)]).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(aberystwyth,
extends(location(126, 102))).
links([
(birmingham, 114),
(liverpool, 100),
(swansea, 75)]).
:- end_object.

View File

@ -0,0 +1,16 @@
:- object(birmingham,
extends(location(192, 106))).
links([
(aberystwyth, 114),
(bristol, 86),
(cambridge, 97),
(liverpool, 99),
(nottingham, 48),
(oxford, 63),
(sheffield, 75)]).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(brighton,
extends(location(248, 10))).
links([
(dover, 81),
(portsmouth, 49),
(london, 52)]).
:- end_object.

View File

@ -0,0 +1,13 @@
:- object(bristol,
extends(location(168, 47))).
links([
(cardiff, 44),
(exeter, 76),
(oxford, 71),
(birmingham, 86)]).
:- end_object.

View File

@ -0,0 +1,13 @@
:- object(cambridge,
extends(location(254, 92))).
links([
(nottingham, 82),
(oxford, 80),
(london, 54),
(birmingham, 97)]).
:- end_object.

View File

@ -0,0 +1,11 @@
:- object(cardiff,
extends(location(148, 56))).
links([
(bristol, 44),
(swansea, 45)]).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(carlisle,
extends(location(166, 226))).
links([
(glasgow, 94),
(leeds, 117),
(newcastle, 58)]).
:- end_object.

View File

@ -0,0 +1,72 @@
:- object(circular,
extends(salesman)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- op(400, yfx, ~).
route([Town| Towns], Route) :-
route(Towns, Town~Town, Route).
route([], Route, Route).
route([Town| Towns], Route, Route2) :-
best_place(Route, Town, Best),
split(Best, Route, Town, Split),
route(Towns, Split, Route2).
best_place(Route, Town, Best) :-
best_place(Route, Town, 10000000, 0, 0, Best).
best_place(R~T1~T2, Town, XD, _, I, Best) :-
atom(T1),
atom(T2),
extra(T1, Town, T2, XT),
XT < XD,
I2 is I + 1,
best_place(R~T1, Town, XT, I2, I2, Best).
best_place(R~T1~T2, Town, XD, XI, I, Best) :-
atom(T1),
atom(T2),
I2 is I + 1,
best_place(R~T1, Town, XD, XI, I2, Best).
best_place(T1~T2, Town, XD, _, I, Best) :-
atom(T1),
atom(T2),
extra(T1, Town, T2, XT),
XT < XD,
Best is I + 1.
best_place(_~_, _, _, XI, _, XI).
split(0, Route, Town, Route~Town).
split(IX, Route~Town1, Town, Split~Town1) :-
IX2 is IX - 1,
split(IX2, Route, Town, Split).
split(1, Route, Town, Town~Route).
extra(T1, T, T2, E) :-
T1::crow_flies(T, E1),
T::crow_flies(T2, E2),
T1::crow_flies(T2, E3),
E is E1 + E2 - E3.
:- end_object.

View File

@ -0,0 +1,20 @@
:- object(descend).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- public(less/2).
less(X, Y):-
X >= Y.
:- end_object.

View File

@ -0,0 +1,11 @@
:- object(dover,
extends(location(292, 38))).
links([
(brighton, 81),
(london, 71)]).
:- end_object.

View File

@ -0,0 +1,52 @@
:- object(driving,
extends(salesman)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- op(400, yfx, ~).
route(Towns, Route) :-
presort::route(Towns, Presort),
drive_around(Presort, Route).
drive_around(Route~Town1~Town2, Route1~Route2) :-
!,
drive_around(Route~Town1, Route1),
Town1::drive(Town2, Route2).
drive_around(Town1~Town2, Route) :-
!,
Town1::drive(Town2, Route).
drive_around(Town, Town).
drive_length(Route, Length) :-
drive_length(Route, 0, Length).
drive_length(Route~Town1~Town2, Acc, Length) :-
!,
Town1::road_distance(Town2, Length2),
Acc2 is Acc + Length2,
drive_length(Route~Town1, Acc2, Length).
drive_length(Town1~Town2, Acc, Length) :-
!,
Town1::road_distance(Town2, Length2),
Length is Acc + Length2.
drive_length(_, Length, Length).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(edinburgh,
extends(location(162, 282))).
links([
(aberdeen, 115),
(glasgow, 44),
(newcastle, 104)]).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(exeter,
extends(location(138, 18))).
links([
(bristol, 76),
(penzance, 112),
(portsmouth, 126)]).
:- end_object.

View File

@ -0,0 +1,68 @@
:- object(geographic(_OX, _OY)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
parnames is ['OX', 'OY'],
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- public(less/2).
less(Town1, Town2):-
angle(Town1, Angle1),
angle(Town2, Angle2),
Angle1 < Angle2.
angle(Town, Angle) :-
Town::at(X, Y),
parameter(1, OX),
parameter(2, OY),
angle(X, Y, OX, OY, Angle).
angle(X, Y, OX, OY, Angle) :-
X > OX,
Y >= OY,
Angle is atan((Y-OY)/(X-OX)).
angle(X, Y, OX, OY, Angle) :-
X > OX,
Y < OY,
pi(Pi),
Angle is Pi + Pi - atan((OY-Y)/(X-OX)).
angle(X, Y, OX, OY, Angle) :-
X < OX,
Y >= OY,
pi(Pi),
Angle is Pi - atan((Y-OY)/(OX-X)).
angle(X, Y, OX, OY, Angle) :-
X < OX,
Y < OY,
pi(Pi),
Angle is Pi + atan((OY-Y)/(OX-X)).
angle(OX, Y, OX, OY, Angle) :-
Y > OY,
pi(Pi),
Angle is Pi / 2.
angle(OX, Y, OX, OY, Angle) :-
Y =< OY,
pi(Pi),
Angle is 1.5 * Pi.
pi(Pi) :-
Pi is 4.0*atan(1.0).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(glasgow,
extends(location(132, 273))).
links([
(aberdeen, 142),
(carlisle, 94),
(edinburgh, 44)]).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(hull,
extends(location(240, 168))).
links([
(leeds, 58),
(sheffield, 65),
(york, 37)]).
:- end_object.

View File

@ -0,0 +1,91 @@
:- object(incremental,
extends(salesman)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- op(400, yfx, ~).
route([Town| Towns], Route) :-
route(Towns, Town, Route).
route([], Route, Route).
route([Town| Towns], Route, Route2) :-
best_place(Route, Town, Best),
split(Best, Route, Town, NewR),
route(Towns, NewR, Route2).
best_place(Route~Town1, Town, Best) :- % try the back first ...
atom(Town1),
Town::crow_flies(Town1, Distance),
best_place(Route~Town1, Town, Distance, 0, 0, Best).
best_place(Town, _, 0) :-
atom(Town).
best_place(R~T1~T2, T, XD, _, I, Best) :-
atom(T1),
atom(T2),
extra(T1, T, T2, XT),
XT < XD,
I2 is I + 1,
best_place(R~T1, T, XT, I2, I2, Best).
best_place(R~T1~T2, T, XD, XI, I, Best) :-
atom(T1),
atom(T2),
I2 is I + 1,
best_place(R~T1, T, XD, XI, I2, Best).
best_place(T1~T2, T, XD, _, I, Best) :-
atom(T1),
atom(T2),
extra(T1, T, T2, XT),
XT < XD,
I2 is I + 1,
best_place(T1, T, XT, I2, I2, Best).
best_place(T1~T2, T, XD, XI, I, Best) :-
atom(T1),
atom(T2),
I2 is I + 1,
best_place(T1, T, XD, XI, I2, Best).
best_place(T1, T, XD, _, I, Best) :-
atom(T1),
T1::crow_flies(T, Distance),
Distance < XD,
Best is I + 1.
best_place(_, _, _, XI, _, XI).
split(0, Route, Town, Route~Town).
split(IX, Route~Town1, Town, S~Town1) :-
IX2 is IX -1,
split(IX2, Route, Town, S).
split(1, Route, Town, Town~Route).
extra(T1, T, T2, XT) :-
T1::crow_flies(T, Distance1),
T::crow_flies(T2, Distance2),
T1::crow_flies(T2, Distance3),
XT is Distance1 + Distance2 - Distance3.
:- end_object.

View File

@ -0,0 +1,14 @@
:- object(leeds,
extends(location(208, 170))).
links([
(carlisle, 117),
(hull, 58),
(sheffield, 34),
(manchester, 41),
(york, 23)]).
:- end_object.

View File

@ -0,0 +1,13 @@
:- object(liverpool,
extends(location(164, 150))).
links([
(aberystwyth, 100),
(birmingham, 99),
(manchester, 35),
(sheffield, 70)]).
:- end_object.

View File

@ -0,0 +1,83 @@
:- object(location(_X, _Y)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
parnames is ['X', 'Y'],
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- op(400, yfx, ~).
:- public(at/2).
:- mode(at(-integer, -integer), one).
:- public(crow_flies/2).
:- mode(crow_flies(+atom, -integer), one).
:- public(drive/2).
:- mode(drive(+atom, -nonvar), zero_or_more).
:- public(links/1).
:- mode(links(-list), one).
:- public(road_distance/2).
:- mode(road_distance(?atom, ?integer), zero_or_more).
at(X, Y) :-
parameter(1, X),
parameter(2, Y).
crow_flies(Town, Distance) :-
::at(X, Y),
Town::at(U, V),
U0 is U-X,
V0 is V-Y,
Distance is sqrt(U0*U0+V0*V0).
road_distance(Town, Distance) :-
::links(Links),
member((Town, Distance), Links).
drive(To, Route) :- % plan a road journey
self(Self),
plan_drive(Self, To, [], _, Route).
% go directly
plan_drive(From, To, _, Distance, From~To):-
To::links(Links),
member((From, Distance), Links).
% go indirectly
plan_drive(From, To, R, D+DI, Route~To):-
To::links(Links),
nearest(Links, From, Int, DI),
\+ member(Int, R),
plan_drive(From, Int, [To| R], D, Route).
nearest(Links, To, Int, Distance):-
quick(metric(To))::sort(Links, Sorted),
member((Int, Distance), Sorted).
member(Head, [Head| _]).
member(Head, [_| Tail]) :-
member(Head, Tail).
:- end_object.

View File

@ -0,0 +1,14 @@
:- object(london,
extends(location(244,54))).
links([
(brighton, 52),
(dover, 71),
(cambridge, 54),
(oxford, 57),
(portsmouth, 72)]).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(manchester,
extends(location(180, 156))).
links([
(leeds, 41),
(liverpool, 35),
(sheffield, 38)]).
:- end_object.

View File

@ -0,0 +1,24 @@
:- object(metric(_Town)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
parnames is ['Town'],
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- public(less/2).
less((Town1, _), (Town2, _)):-
parameter(1, Town),
Town::crow_flies(Town1, Distance1),
Town::crow_flies(Town2, Distance2),
Distance1 < Distance2.
:- end_object.

View File

@ -0,0 +1,20 @@
:- object(natural).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- public(less/2).
less(X, Y):-
X < Y.
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(newcastle,
extends(location(210, 230))).
links([
(edinburgh, 104),
(carlisle, 58),
(york, 80)]).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(nottingham,
extends(location(216, 128))).
links([
(birmingham, 48),
(cambridge, 82),
(sheffield, 38)]).
:- end_object.

View File

@ -0,0 +1,13 @@
:- object(oxford,
extends(location(214, 66))).
links([
(bristol, 71),
(birmingham, 63),
(cambridge, 80),
(london, 57)]).
:- end_object.

View File

@ -0,0 +1,10 @@
:- object(penzance,
extends(location(10, 0))).
links([(
exeter, 112)]).
:- end_object.

View File

@ -0,0 +1,65 @@
:- object(permute,
extends(salesman)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- op(400, yfx, ~).
route(Towns, Route) :-
findall(
(Towns2, Length),
(permute(Towns, Towns2), route_length(Towns2, Length)),
List),
shortest(List, Route).
permute([Town], Town).
permute(Towns, Towns2~Town) :-
delete(Towns, Town, Towns3),
permute(Towns3, Towns2).
delete([Head| Tail], Head, Tail).
delete([Head| Tail], Element, [Head| Tail2]):-
delete(Tail, Element, Tail2).
route_length(Town, 0) :-
atom(Town), !.
route_length(Towns~Town1~Town2, Length) :-
!,
route_length(Towns~Town1, Length1),
Town1::crow_flies(Town2, Length2),
Length is Length1 + Length2.
route_length(Town1~Town2, Length) :-
Town1::crow_flies(Town2, Length).
shortest(List, Shortest) :-
shortest(List, null, 1000000, Shortest).
shortest([], Route, Length, (Route, Length)).
shortest([(Route, Length)| Routes], _, LX, Shortest) :-
Length < LX, !,
shortest(Routes, Route, Length, Shortest).
shortest([_| Routes], RX, LX, Shortest) :-
shortest(Routes, RX, LX, Shortest).
:- end_object.

View File

@ -0,0 +1,12 @@
:- object(portsmouth,
extends(location(216, 22))).
links([
(brighton, 49),
(exeter, 126),
(london, 72)]).
:- end_object.

View File

@ -0,0 +1,43 @@
:- object(presort,
extends(incremental)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- uses(quick(_)).
route(Towns, Route) :-
arrange(Towns, Towns2),
^^route(Towns2, Route).
arrange(Towns, Sorted) :-
centre(Towns, X, Y),
quick(geographic(X, Y))::sort(Towns, Sorted).
centre(Towns, X, Y) :-
average(Towns, 0, 0, U, V, 0, L),
X is U/L,
Y is V/L.
average([], U, V, U, V, L, L).
average([Town| Towns], UX, VX, U, V, I, L):-
Town::at(UT, VT),
UX2 is UX+UT,
VX2 is VX+VT,
I2 is I + 1,
average(Towns, UX2, VX2, U, V, I2, L).
:- end_object.

View File

@ -0,0 +1,45 @@
:- object(quick(_Order)).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
parnames is ['Order'],
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- public(sort/2).
:- mode(sort(+list, -list), one).
sort([], []).
sort([X| L], S):-
split(L, X, L1, L2),
sort(L1, S1),
sort(L2, S2),
app(S1, [X| S2], S).
split([], _, [], []).
split([D| L], X, [D| L1], L2):-
parameter(1, Order),
Order::less(D, X),
!,
split(L, X, L1, L2).
split([D| L], X, L1, [D| L2]):-
split(L, X, L1, L2).
app([], L, L).
app([H| T], L, [H| T2]) :-
app(T, L, T2).
:- end_object.

View File

@ -0,0 +1,20 @@
:- object(salesman).
:- info([
authors is 'Paulo Moura',
version is 1.0,
date is 2000/4/22,
comment is '.',
source is 'Example adopted from the Francis G. McCabe L&O documentation.']).
:- op(400, yfx, ~).
:- public(route/2).
:- mode(route(+list, -nonvar), zero_or_more).
:- end_object.

View File

@ -0,0 +1,15 @@
:- object(sheffield,
extends(location(208, 142))).
links([
(birmingham, 75),
(hull, 65),
(leeds, 34),
(liverpool, 70),
(manchester, 38),
(nottingham, 38)]).
:- end_object.

View File

@ -0,0 +1,11 @@
:- object(swansea,
extends(location(126, 66))).
links([
(cardiff, 45),
(aberystwyth, 75)]).
:- end_object.

View File

@ -0,0 +1,44 @@
:- initialization(
logtalk_load([
aberdeen,
aberystwyth,
birmingham,
brighton,
bristol,
cambridge,
cardiff,
carlisle,
dover,
edinburgh,
exeter,
glasgow,
hull,
leeds,
liverpool,
london,
manchester,
newcastle,
nottingham,
oxford,
penzance,
portsmouth,
sheffield,
swansea,
york,
salesman,
circular,
driving,
geographic2,
incremental,
metric1,
permute,
presort,
location2,
descend,
quick1,
natural])).

View File

@ -0,0 +1,12 @@
:- object(york,
extends(location(218, 184))).
links([
(leeds, 23),
(hull, 37),
(newcastle, 80)]).
:- end_object.

View File

@ -0,0 +1,70 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>abolish_category/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#abolish_category1">abolish_category/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
abolish_category(Category)
</pre>
<p>
Removes from the database a dynamic category.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
abolish_category(@category_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Category is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Category is not a valid category identifier:</dt>
<dd><code>type_error(category_identifier, Category)</code></dd>
<dt>Category is an identifier of a static category:</dt>
<dd><code>permission_error(modify, static_category, Category)</code></dd>
<dt>Category does not exist:</dt>
<dd><code>existence_error(category, Category)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- abolish_category(monitoring).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="create_protocol3.html">Previous</a> | <a href="abolish_object1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,72 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>abolish_events/5</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#abolish_events5">abolish_events/5</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
abolish_events(Event, Object, Message, Sender, Monitor)
</pre>
<p>
Abolishes all matching events.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
abolish_events(@event, @object_identifier, @callable, @object_identifier, @object_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Event is neither a variable nor a valid event identifier:</dt>
<dd><code>type_error(event, Event)</code></dd>
<dt>Object is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Object)</code></dd>
<dt>Message is neither a variable nor a callable term:</dt>
<dd><code>type_error(callable, Message)</code></dd>
<dt>Sender is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Sender)</code></dd>
<dt>Monitor is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Monitor)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- abolish_events(_, list, _, _, debugger).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="specializes_class2_3.html">Previous</a> | <a href="current_event5.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,71 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>abolish_object/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#abolish_object1">abolish_object/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
abolish_object(Object)
</pre>
</p>
<p>
Removes from the database a dynamic object.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
abolish_object(@object_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Object is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Object is not a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Object)</code></dd>
<dt>Object is an identifier of a static object:</dt>
<dd><code>permission_error(modify, static_object, Object)</code></dd>
<dt>Object does not exist:</dt>
<dd><code>existence_error(object, Object)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- abolish_object(list).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="abolish_category1.html">Previous</a> | <a href="abolish_protocol1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,70 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>abolish_protocol/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#abolish_protocol1">abolish_protocol/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
abolish_protocol(Protocol)
</pre>
<p>
Removes from the database a dynamic protocol.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
abolish_protocol(@protocol_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Protocol is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Protocol is not a valid protocol identifier:</dt>
<dd><code>type_error(protocol_identifier, Protocol)</code></dd>
<dt>Protocol is an identifier of a static protocol:</dt>
<dd><code>permission_error(modify, static_protocol, Protocol)</code></dd>
<dt>Protocol does not exist:</dt>
<dd><code>existence_error(protocol, Protocol)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- abolish_protocol(listp).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="abolish_object1.html">Previous</a> | <a href="extends_object2_3.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,66 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>category_property/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#category_property2">category_property/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
category_property(Category, Property)
</pre>
<p>
Enumerates, by backtracking, the properties associated with the defined categories.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
category_property(?category_identifier, ?category_property)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Category is neither a variable nor a valid category identifier:</dt>
<dd><code>type_error(category_identifier, Category)</code></dd>
<dt>Property is neither a variable nor a valid category property:</dt>
<dd><code>domain_error(category_property, Property)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- category_property(Category, dynamic).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="current_protocol1.html">Previous</a> | <a href="object_property2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,76 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>create_category/4</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#create_category4">create_category/4</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
create_category(Identifier, Relations, Directives, Clauses)
</pre>
<p>
Creates a new, dynamic, category.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
create_category(+category_identifier, +list, +list, +list)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Identifier is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Identifier is not a valid category identifier:</dt>
<dd><code>type_error(category_identifier, Identifier)</code></dd>
<dt>Identifier is already in use:</dt>
<dd><code>permission_error(replace, category, Identifier)</code></dd>
<dd><code>permission_error(replace, object, Identifier)</code></dd>
<dd><code>permission_error(replace, protocol, Identifier)</code></dd>
<dt>Relations is not a list:</dt>
<dd><code>type_error(list, Relations)</code></dd>
<dt>Directives is not a list:</dt>
<dd><code>type_error(list, Directives)</code></dd>
<dt>Clauses is not a list:</dt>
<dd><code>type_error(list, Clauses)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- create_category(foo, [implements(bar)], [], [bar(1), bar(2)]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="protocol_property2.html">Previous</a> | <a href="create_object4.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,76 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>create_object/4</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#create_object4">create_object/4</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
create_object(Identifier, Relations, Directives, Clauses)
</pre>
<p>
Creates a new, dynamic, object.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
create_object(+object_identifier, +list, +list, +list)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Identifier is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Identifier is not a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Identifier)</code></dd>
<dt>Identifier is already in use:</dt>
<dd><code>permission_error(replace, category, Identifier)</code></dd>
<dd><code>permission_error(replace, object, Identifier)</code></dd>
<dd><code>permission_error(replace, protocol, Identifier)</code></dd>
<dt>Relations is not a list:</dt>
<dd><code>type_error(list, Relations)</code></dd>
<dt>Directives is not a list:</dt>
<dd><code>type_error(list, Directives)</code></dd>
<dt>Clauses is not a list:</dt>
<dd><code>type_error(list, Clauses)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- create_object(foo, [extends(bar)], [public(foo/1)], [foo(1), foo(2)]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="create_category4.html">Previous</a> | <a href="create_protocol3.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>create_protocol/3</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#create_protocol3">create_protocol/3</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
create_protocol(Identifier, Relations, Directives)
</pre>
<p>
Creates a new, dynamic, protocol.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
create_protocol(+protocol_identifier, +list, +list)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Identifier is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Identifier is not a valid protocol identifier:</dt>
<dd><code>type_error(protocol_identifier, Identifier)</code></dd>
<dt>Identifier is already in use:</dt>
<dd><code>permission_error(replace, category, Identifier)</code></dd>
<dd><code>permission_error(replace, object, Identifier)</code></dd>
<dd><code>permission_error(replace, protocol, Identifier)</code></dd>
<dt>Relations is not a list:</dt>
<dd><code>type_error(list, Relations)</code></dd>
<dt>Directives is not a list:</dt>
<dd><code>type_error(list, Directives)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- create_protocol(foo, [extends(bar)], [public(foo/1)]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="create_object4.html">Previous</a> | <a href="abolish_category1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,64 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>current_category/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#current_category1">current_category/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
current_category(Category)
</pre>
<p>
Enumerates, by backtracking, all currently defined categories. All categories are found, either static, dynamic, or built-in.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
current_category(?category_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Category is neither a variable nor a valid category identifier:</dt>
<dd><code>type_error(category_identifier, Category)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- current_category(monitoring).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="../directives/public1.html">Previous</a> | <a href="current_object1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,72 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>current_event/5</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#current_event5">current_event/5</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
current_event(Event, Object, Message, Sender, Monitor)
</pre>
<p>
Enumerates, by backtracking, all defined events.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
current_event(?event, ?object_identifier, ?callable, ?object_identifier, ?object_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Event is neither a variable nor a valid event identifier:</dt>
<dd><code>type_error(event, Event)</code></dd>
<dt>Object is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Object)</code></dd>
<dt>Message is neither a variable nor a callable term:</dt>
<dd><code>type_error(callable, Message)</code></dd>
<dt>Sender is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Sender)</code></dd>
<dt>Monitor is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Monitor)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- current_event(Event, Object, Message, Sender, debugger).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="abolish_events5.html">Previous</a> | <a href="define_events5.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,64 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>current_object/1</title>
<link rel=stylesheet type="text/css" href="../../styles.css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#current_object1">current_object/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
current_object(Object)
</pre>
<p>
Enumerates, by backtracking, all currently defined objects. All objects are found, either static, dynamic or built-in.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
current_object(?object_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Object is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Object)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- current_object(list).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="current_category1.html">Previous</a> | <a href="current_protocol1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,64 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>current_protocol/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#current_protocol1">current_protocol/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
current_protocol(Protocol)
</pre>
<p>
Enumerates, by backtracking, all currently defined protocols. All protocols are found, either static, dynamic, or built-in.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
current_protocol(?protocol_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Protocol is neither a variable nor a valid protocol identifier:</dt>
<dd><code>type_error(protocol_identifier, Protocol)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- current_protocol(listp).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="current_object1.html">Previous</a> | <a href="category_property2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>define_events/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#define_events5">define_events/5</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
define_events(Event, Object, Message, Sender, Monitor)
</pre>
<p>
Defines a new set of events.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
define_events(@event, @object_identifier, @callable, @object_identifier, +object_identifier)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Event is neither a variable nor a valid event identifier:</dt>
<dd><code>type_error(event, Event)</code></dd>
<dt>Object is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Object)</code></dd>
<dt>Message is neither a variable nor a callable term:</dt>
<dd><code>type_error(callable, Message)</code></dd>
<dt>Sender is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Sender)</code></dd>
<dt>Monitor is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Monitor is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Monitor)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- define_events(_, list, member(_, _), _ , debugger).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="current_event5.html">Previous</a> | <a href="logtalk_compile1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>extends_object/2-3</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#extends_object2_3">extends_object/2-3</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
extends_object(Prototype, Parent)
extends_object(Prototype, Parent, Scope)
</pre>
<p>
Enumerates, by backtracking, all pairs of objects such that the first one extends the second.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
extends_object(?object_identifier, ?object_identifier)
extends_object(?object_identifier, ?object_identifier, ?entity_scope)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Prototype is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Prototype)</code></dd>
<dt>Parent is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Parent)</code></dd>
<dt>Scope is neither a variable nor a valid entity scope:</dt>
<dd><code>type_error(entity_scope, Scope)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- extends_object(Object, state_space).
| ?- extends_object(Object, list, public).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="abolish_protocol1.html">Previous</a> | <a href="extends_protocol2_3.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>extends_protocol/2-3</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#extends_protocol2_3">extends_protocol/2-3</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
extends_protocol(Protocol1, Protocol2)
extends_protocol(Protocol1, Protocol2, Scope)
</pre>
<p>
Enumerates, by backtracking, all pairs of protocols such that the first one extends the second.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
extends_protocol(?protocol_identifier, ?protocol_identifier)
extends_protocol(?protocol_identifier, ?protocol_identifier, ?entity_scope)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Protocol1 is neither a variable nor a valid protocol identifier:</dt>
<dd><code>type_error(protocol_identifier, Protocol1)</code></dd>
<dt>Protocol2 is neither a variable nor a valid protocol identifier:</dt>
<dd><code>type_error(protocol_identifier, Protocol2)</code></dd>
<dt>Scope is neither a variable nor a valid entity scope:</dt>
<dd><code>type_error(entity_scope, Scope)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- extends_protocol(listp, Protocol).
| ?- extends_protocol(Protocol, termp, private).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="extends_object2_3.html">Previous</a> | <a href="implements_protocol2_3.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,66 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>forall/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#forall2">forall/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
forall(Generator, Test)
</pre>
<p>
This predicate is true if, for all solutions of Generator, Test is true (some Prolog compilers already define this or a similar predicate).
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
forall(+callable, +callable)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Generator is not a callable term:</dt>
<dd><code>type_error(callable, Generator)</code></dd>
<dt>Test is not a callable term:</dt>
<dd><code>type_error(callable, Test)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- forall(member(X, [1, 2, 3]), write(X)).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="logtalk_load1.html">Previous</a> | <a href="logtalk_version3.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,80 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>implements_protocol/2-3</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#implements_protocol2_3">implements_protocol/2-3</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
implements_protocol(Object, Protocol)
implements_protocol(Category, Protocol)
implements_protocol(Object, Protocol, Scope)
implements_protocol(Category, Protocol, Scope)
</pre>
<p>
Enumerates, by backtracking, all pairs of entities such that an object or a category implements a protocol.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
implements_protocol(?object_identifier, ?protocol_identifier)
implements_protocol(?category_identifier, ?protocol_identifier)
implements_protocol(?object_identifier, ?protocol_identifier, ?entity_scope)
implements_protocol(?category_identifier, ?protocol_identifier, ?entity_scope)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Object is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Object)</code></dd>
<dt>Category is neither a variable nor a valid category identifier:</dt>
<dd><code>type_error(category_identifier, Category)</code></dd>
<dt>Protocol is neither a variable nor a valid protocol identifier:</dt>
<dd><code>type_error(protocol_identifier, Protocol)</code></dd>
<dt>Scope is neither a variable nor a valid entity scope:</dt>
<dd><code>type_error(entity_scope, Scope)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- implements_protocol(List, listp).
| ?- implements_protocol(List, listp, public).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="extends_protocol2_3.html">Previous</a> | <a href="imports_category2_3.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>imports_category/2-3</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#imports_category2_3">imports_category/2-3</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
imports_category(Object, Category)
imports_category(Object, Category, Scope)
</pre>
<p>
Enumerates, by backtracking, all pairs of objects and categories such that the first one imports the other.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
imports_category(?object_identifier, ?category_identifier)
imports_category(?object_identifier, ?category_identifier, ?entity_scope)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Object is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Object)</code></dd>
<dt>Category is neither a variable nor a valid category identifier:</dt>
<dd><code>type_error(category_identifier, Category)</code></dd>
<dt>Scope is neither a variable nor a valid entity scope:</dt>
<dd><code>type_error(entity_scope, Scope)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- imports_category(debugger, monitoring).
| ?- imports_category(Object, monitoring, protected).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="implements_protocol2_3.html">Previous</a> | <a href="instantiates_class2_3.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>instantiates_class/2-3</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#instantiates_class2_3">instantiates_class/2-3</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
instantiates_class(Instance, Class)
instantiates_class(Instance, Class, Scope)
</pre>
<p>
Enumerates, by backtracking, all pairs of objects such that the first one instantiates the second.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
instantiates_class(?object_identifier, ?object_identifier)
instantiates_class(?object_identifier, ?object_identifier, ?entity_scope)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Instance is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Instance)</code></dd>
<dt>Class is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Class)</code></dd>
<dt>Scope is neither a variable nor a valid entity scope:</dt>
<dd><code>type_error(entity_scope, Scope)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- instantiates_class(water_jug, state_space).
| ?- instantiates_class(Space, state_space, public).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="imports_category2_3.html">Previous</a> | <a href="specializes_class2_3.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,73 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>logtalk_compile/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#logtalk_compile1">logtalk_compile/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
logtalk_compile(Entities)
</pre>
<p>
Compiles to disk a list of Logtalk entities (objects, protocols, or categories) using the default compiler options specified in the Logtalk configuration file. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the argument is a list of entity/file names, not file paths.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
logtalk_compile(+atom_list)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Entities is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor a proper list:</dt>
<dd><code>type_error(list, Entities)</code></dd>
<dt>One of the entities is not an atom:</dt>
<dd><code>type_error(atom, Entity)</code></dd>
<dt>One of the entities does not exist in the current working directory:</dt>
<dd><code>existence_error(entity, Entity)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- logtalk_compile([tree]).
| ?- logtalk_compile([listp, list]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="define_events5.html">Previous</a> | <a href="logtalk_compile2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: October 1, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,79 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>logtalk_compile/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#logtalk_compile1">logtalk_compile/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
logtalk_compile(Entities, Options)
</pre>
<p>
Compiles to disk a list of Logtalk entities (objects, protocols, or categories) using a list of options. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the first argument is a list of entity/file names, not file paths.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
logtalk_compile(+atom_list, +list)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Entities is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor a proper list:</dt>
<dd><code>type_error(list, Entities)</code></dd>
<dt>One of the entities is not an atom:</dt>
<dd><code>type_error(atom, Entity)</code></dd>
<dt>One of the entities does not exist in the current working directory:</dt>
<dd><code>existence_error(entity, Entity)</code></dd>
<dt>Options is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Options is neither a variable nor a list:</dt>
<dd><code>type_error(list, Options)</code></dd>
<dt>One of the options is not valid:</dt>
<dd><code>type_error(compiler_option, Option)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- logtalk_compile([list], []).
| ?- logtalk_compile([listp, list], [xml(off), plredf(warning)]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="logtalk_compile1.html">Previous</a> | <a href="logtalk_load1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: October 1, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,73 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>logtalk_load/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#logtalk_load1">logtalk_load/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
logtalk_load(Entities)
</pre>
<p>
Compiles to disk and then loads to memory a list of Logtalk entities (objects, protocols or categories) using the default compiler options specified in the Logtalk configuration file. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the argument is a list of entity/file names, not file paths.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
logtalk_load(+atom_list)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Entities is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor a proper list:</dt>
<dd><code>type_error(list, Entities)</code></dd>
<dt>One of the entities is not an atom:</dt>
<dd><code>type_error(atom, Entity)</code></dd>
<dt>One of the entities does not exist in the current working directory:</dt>
<dd><code>existence_error(entity, Entity)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- logtalk_load([tree]).
| ?- logtalk_load([listp, list]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="logtalk_compile1.html">Previous</a> | <a href="logtalk_load2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: October 1, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,78 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>logtalk_load/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#logtalk_load1">logtalk_load/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
logtalk_load(Entities, Options)
</pre>
<p>
Compiles to disk and then loads to memory a Logtalk entity or a list of entities (objects, protocols or categories) using a list of options. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the first argument is a list of entity/file names, not file paths.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
logtalk_load(+atom_list, +list)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Entities is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor a proper list:</dt>
<dd><code>type_error(list, Entities)</code></dd>
<dt>One of the entities is not an atom:</dt>
<dd><code>type_error(atom, Entity)</code></dd>
<dt>One of the entities does not exist in the current working directory:</dt>
<dd><code>existence_error(entity, Entity)</code></dd>
<dt>Options is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Options is neither a variable nor a list:</dt>
<dd><code>type_error(list, Options)</code></dd>
<dt>One of the options is not valid:</dt>
<dd><code>type_error(compiler_option, Option)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- logtalk_load([list], []).
| ?- logtalk_load([listp, list], [xml(off), plredf(warning)]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="logtalk_load1.html">Previous</a> | <a href="forall2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: October 1, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,68 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>logtalk_version/3</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#logtalk_version3">logtalk_version/3</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
logtalk_version(Major, Minor, Patch)
</pre>
<p>
Returns the Logtalk pre-processor and runtime version.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
logtalk_version(?integer, ?integer, ?integer)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Major is neither a variable nor an integer:</dt>
<dd><code>type_error(integer, Major)</code></dd>
<dt>Minor is neither a variable nor an integer:</dt>
<dd><code>type_error(integer, Minor)</code></dd>
<dt>Patch is neither a variable nor an integer:</dt>
<dd><code>type_error(integer, Patch)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- logtalk_version(Major, Minor, Patch).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="forall2.html">Previous</a> | <a href="retractall1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,66 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>object_property/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#object_property2">object_property/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
object_property(Object, Property)
</pre>
<p>
Enumerates, by backtracking, the properties associated with the defined objects.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
object_property(?object_identifier, ?object_property)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Object is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Object)</code></dd>
<dt>Property is neither a variable nor a valid object property:</dt>
<dd><code>domain_error(object_property, Property)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- object_property(list, Property).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="category_property2.html">Previous</a> | <a href="protocol_property2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,66 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>protocol_property/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#protocol_property2">protocol_property/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
protocol_property(Protocol, Property)
</pre>
<p>
Enumerates, by backtracking, the properties associated with the currently defined protocols.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
protocol_property(?protocol_identifier, ?protocol_property)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Protocol is neither a variable nor a valid protocol identifier:</dt>
<dd><code>type_error(protocol_identifier, Protocol)</code></dd>
<dt>Property is neither a variable nor a valid protocol property:</dt>
<dd><code>domain_error(protocol_property, Property)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- protocol_property(listp, Property).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="object_property2.html">Previous</a> | <a href="create_category4.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,64 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>retractall/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#retractall1">retractall/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
retractall(Head)
</pre>
<p>
Logtalk adds this built-in predicate, with the usual definition, to a Prolog compiler if it is not already defined.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
retractall(+callable)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Head is not a callable term:</dt>
<dd><code>type_error(callable, Head)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- retractall(foo(_)).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="logtalk_version3.html">Previous</a> | <a href="../methods/parameter2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,74 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>specializes_class/2-3</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#specializes_class2_3">specializes_class/2-3</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
specializes_class(Class, Superclass)
specializes_class(Class, Superclass, Scope)
</pre>
<p>
Enumerates, by backtracking, all pairs of objects such that the first one specializes the second.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
specializes_class(?object_identifier, ?object_identifier)
specializes_class(?object_identifier, ?object_identifier, ?entity_scope)
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Class is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Class)</code></dd>
<dt>Superclass is neither a variable nor a valid object identifier:</dt>
<dd><code>type_error(object_identifier, Superclass)</code></dd>
<dt>Scope is neither a variable nor a valid entity scope:</dt>
<dd><code>type_error(entity_scope, Scope)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- specializes_class(Subclass, state_space).
| ?- specializes_class(Subclass, state_space, public).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="instantiates_class2_3.html">Previous</a> | <a href="abolish_events5.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,64 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>{}/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#external1">{}/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
{Goal}
</pre>
<p>
Calls external Prolog code. Can be used to bypass the Logtalk pre-processor/compiler.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
{+callable}
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<p>
(none)
</p>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
N1/D1 &lt; N2/D2 :-
{N1*D2 &lt; N2*D1}.
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="to_super1.html">Previous</a> | <a href="../errors.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: October 8, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,81 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>::/2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#to_object2">::/2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
Object::Predicate
(Object1, Object2, ...)::Predicate
(Object1; Object2, ...)::Predicate
Object::(Predicate1, Predicate2, ...)
Object::(Predicate1; Predicate2; ...)
</pre>
<p>
Sends a message to an object. The message argument must match a public predicate of the receiver object. We can also send the same message to a set of objects or a set of messages to the same object. The "<CODE>,</CODE>" and "<CODE>;</CODE>" in the list have the usual Prolog meaning.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
+receivers::+messages
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Either Object or Predicate is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Predicate is declared private:</dt>
<dd><code>permission_error(access, private_predicate, Predicate)</code></dd>
<dt>Predicate is declared protected:</dt>
<dd><code>permission_error(access, protected_predicate, Predicate)</code></dd>
<dt>Predicate is not declared:</dt>
<dd><code>existence_error(predicate_declaration, Predicate)</code></dd>
<dt>Object does not exist:</dt>
<dd><code>existence_error(object, Object)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
| ?- list::member(X, [1, 2, 3]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="../methods/after3.html">Previous</a> | <a href="to_self1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: October 7, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,75 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>::/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#to_self1">::/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
::Predicate
::(Predicate1, Predicate2, ...)
::(Predicate1; Predicate2; ...)
</pre>
<p>
Send a message to <a class="glossary" title="Go to glossary definition" href="../../glossary.html#self">self</a>. Only used in the body of a predicate definition. The argument should match a public or protected predicate of <a class="glossary" title="Go to glossary definition" href="../../glossary.html#self">self</a>. It may also match a private predicate if the predicate is imported from a category, if used from inside a category, or when using private inheritance. We can also send a set of messages to self. The "<CODE>,</CODE>" and "<CODE>;</CODE>" in the list have the usual Prolog meaning.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
::+messages
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Predicate is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Predicate is declared private:</dt>
<dd><code>permission_error(access, private_predicate, Predicate)</code></dd>
<dt>Predicate is not declared:</dt>
<dd><code>existence_error(predicate_declaration, Predicate)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
area(Area) :-
::width(Width),
::height(Height),
Area is Width*Height.
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="to_object2.html">Previous</a> | <a href="to_super1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: October 8, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,72 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>^^/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#to_super1">^^/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
^^Predicate
</pre>
<p>
Calls a redefined/inherited definition for a message. Normally only used in the body of a predicate definition for the message. Predicate should match a public or protected predicate of <a class="glossary" title="Go to glossary definition" href="../../glossary.html#self">self</a> or be within the scope of <a class="glossary" title="Go to glossary definition" href="../../glossary.html#this">this</a>.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
^^+message
</pre>
</blockquote>
<h3>Errors</h3>
<blockquote>
<dl>
<dt>Predicate is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Predicate is declared private:</dt>
<dd><code>permission_error(access, private_predicate, Predicate)</code></dd>
<dt>Predicate is not declared:</dt>
<dd><code>existence_error(predicate_declaration, Predicate)</code></dd>
<dt>Container of the inherited predicate definition is the same object that contains the <code>^^/1</code> call:</dt>
<dd><code>endless_loop(Predicate)</code></dd>
</dl>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
init :-
assertz(counter(0)),
^^init.
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="to_self1.html">Previous</a> | <a href="external1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,58 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>calls/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#calls1">calls/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
calls(Protocol)
calls(Protocol1, Protocol2, ...)
calls([Protocol1, Protocol2, ...])
</pre>
<p>
Declares the protocol(s) that are called by predicates defined in an object or category.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
calls(+protocol_identifiers)
</pre>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
:- calls(comparingp).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="../index.html">Previous</a> | <a href="category1_2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,68 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>category/1-2</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#category1_2">category/1-2</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
category(Category)
category(Category,
implements(Protocols))
</pre>
<p>
Starting category directive.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
category(+category_identifier)
category(+category_identifier,
implements(+implemented_protocols))
</pre>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
:- category(monitoring).
:- category(monitoring,
implements(monitoringp)).
:- category(attributes,
implements(protected::variables)).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="calls1.html">Previous</a> | <a href="dynamic0.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,62 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>discontiguous/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#discontiguous1">discontiguous/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
discontiguous(Predicate)
discontiguous(Predicate1, Predicate2, ...)
discontiguous([Predicate1, Predicate2, ...])
</pre>
<p>
Declares discontiguous predicates.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
discontiguous(+predicate_indicator_term)
</pre>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
:- discontiguous(counter/1).
:- discontiguous(lives/2, works/2).
:- discontiguous([db/4, key/2, file/3]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="uses1.html">Previous</a> | <a href="dynamic1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,56 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>dynamic/0</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#dynamic0">dynamic/0</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
dynamic
</pre>
<p>
Declares an entity and all of its directives and clauses dynamic.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
dynamic
</pre>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
:- dynamic.
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="category1_2.html">Previous</a> | <a href="end_category0.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,62 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>dynamic/1</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#dynamic1">dynamic/1</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
dynamic(Predicate)
dynamic(Predicate1, Predicate2, ...)
dynamic([Predicate1, Predicate2, ...])
</pre>
<p>
Declares dynamic predicates. Note that an object can be static and have both static and dynamic predicates.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
dynamic(+predicate_indicator_term)
</pre>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
:- dynamic(counter/1).
:- dynamic(lives/2, works/2).
:- dynamic([db/4, key/2, file/3]).
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="discontiguous1.html">Previous</a> | <a href="info2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,56 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>end_category/0</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#end_category0">end_category/0</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
end_category
</pre>
<p>
Ending category directive.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
end_category
</pre>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
:- end_category.
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="dynamic0.html">Previous</a> | <a href="end_object0.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

View File

@ -0,0 +1,56 @@
<!doctype html public "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>end_object/0</title>
<link rel=stylesheet href="../../styles.css" type="text/css">
</head>
<body>
<hr />
<h2><code><a class="back" title="Return to index" href="../index.html#end_object0">end_object/0</a></code></h2>
<hr />
<h4>Description</h4>
<blockquote>
<pre>
end_object
</pre>
<p>
Ending object directive.
</p>
</blockquote>
<h4>Template and modes</h4>
<blockquote>
<pre>
end_object
</pre>
</blockquote>
<h4>Examples</h4>
<blockquote>
<pre>
:- end_object.
</pre>
</blockquote>
<hr />
<p class="center">
<strong><a href="end_category0.html">Previous</a> | <a href="end_protocol0.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: July 4, 2000
</p>
<hr />
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More