Updated to Logtalk 2.9.1
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@211 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
9c7149eab5
commit
b77427df89
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -16,6 +16,6 @@ Logtalk documentation or by using the call:
|
||||
|
||||
| ?- use_module(library(logtalk)).
|
||||
|
||||
Note that, although we load Logtalk using the @code{use_module/1}
|
||||
built-in predicate, the system is not packaged as a module not does
|
||||
it use modules in its implementation.
|
||||
Note that, although we load Logtalk using the use_module/1 built-in
|
||||
predicate, the system is not packaged as a module nor does it use
|
||||
modules in its implementation.
|
||||
|
@ -1,12 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
This folder contains several examples of Logtalk programs. Most of
|
||||
these examples need objects, protocols and categories that are
|
||||
these examples need objects, protocols, and categories that are
|
||||
defined in the Logtalk standard library or in other examples, so
|
||||
you should load them first (see the NOTES file inside each example
|
||||
folder).
|
||||
@ -36,6 +36,9 @@ bricks
|
||||
classvars
|
||||
example of implementation of class variables (as found in Smalltalk)
|
||||
|
||||
errors
|
||||
example showing the Logtalk compiler warning and error reporting
|
||||
|
||||
inheritance
|
||||
examples of public, protected and private inheritance with both
|
||||
prototypes and classes/instances
|
||||
@ -84,7 +87,7 @@ roots
|
||||
objects, protocols and categories needed by most of the other examples
|
||||
|
||||
searching
|
||||
state-space searching frame work
|
||||
state-space searching framework
|
||||
example adopted from Ivan Bratko's "Prolog Programming for Artificial
|
||||
Intelligence" book
|
||||
|
||||
@ -93,7 +96,7 @@ sicstus
|
||||
|
||||
symdiff
|
||||
example of using parametric objects to implement symbolic expression
|
||||
differentiation and simplification.
|
||||
differentiation and simplification
|
||||
|
||||
viewpoints
|
||||
example on how to implement property and value sharing with prototypes
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -2,10 +2,11 @@
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
descriptors,
|
||||
expert,
|
||||
|
||||
order,
|
||||
|
||||
expert,
|
||||
|
||||
falconiforms, % orders
|
||||
passerformes,
|
||||
tubenose,
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -12,5 +12,5 @@ This folder contains examples of public, protected and private inheritance,
|
||||
for both prototypes and classes/instances. The category "predicates" defines
|
||||
a set of three predicates, one public, one protected and one private. This
|
||||
category is imported by the root objects: "parent" for the prototypes and
|
||||
"object" for the classes/instances. Each root object have a set of three
|
||||
"root" for the classes/instances. Each root object have a set of three
|
||||
descendants, each one using one of the inheritance types.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -52,6 +52,36 @@ protected/0 - private
|
||||
yes
|
||||
|
||||
|
||||
% descendant1 extends public::prototype1
|
||||
|
||||
| ?- descendant1::interface.
|
||||
|
||||
interface/0 - public
|
||||
public/0 - public
|
||||
protected/0 - protected
|
||||
|
||||
yes
|
||||
|
||||
|
||||
% descendant2 extends public::prototype2
|
||||
|
||||
| ?- descendant2::interface.
|
||||
|
||||
interface/0 - public
|
||||
public/0 - protected
|
||||
protected/0 - protected
|
||||
|
||||
yes
|
||||
|
||||
|
||||
% descendant3 extends public::prototype3
|
||||
|
||||
| ?- descendant3::interface.
|
||||
|
||||
interface/0 - public
|
||||
|
||||
yes
|
||||
|
||||
|
||||
% object (root of the inheritance graph) interface
|
||||
|
||||
|
@ -8,6 +8,9 @@
|
||||
prototype1,
|
||||
prototype2,
|
||||
prototype3,
|
||||
descendant1,
|
||||
descendant2,
|
||||
descendant3,
|
||||
|
||||
root,
|
||||
subclass1,
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,21 +1,21 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
aberdeen_air,
|
||||
aiai,
|
||||
plan1,
|
||||
airport,
|
||||
albert_hall,
|
||||
castle,
|
||||
aberdeen_air,
|
||||
city,
|
||||
edin,
|
||||
london,
|
||||
albert_hall,
|
||||
edinburgh,
|
||||
edin,
|
||||
aiai,
|
||||
castle,
|
||||
fly,
|
||||
glasgow,
|
||||
imperial,
|
||||
lhr,
|
||||
london,
|
||||
manchester,
|
||||
plan1,
|
||||
renfrew,
|
||||
ringway,
|
||||
victoria])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,10 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
quick1,
|
||||
|
||||
location2,
|
||||
|
||||
aberdeen,
|
||||
aberystwyth,
|
||||
birmingham,
|
||||
@ -30,15 +34,12 @@
|
||||
salesman,
|
||||
|
||||
circular,
|
||||
incremental,
|
||||
presort,
|
||||
driving,
|
||||
geographic2,
|
||||
incremental,
|
||||
metric1,
|
||||
permute,
|
||||
presort,
|
||||
|
||||
location2,
|
||||
|
||||
descend,
|
||||
quick1,
|
||||
natural])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,15 +1,15 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
cylinders,
|
||||
distributor,
|
||||
electrical,
|
||||
engine,
|
||||
fault,
|
||||
mechanical,
|
||||
engine,
|
||||
cylinders,
|
||||
electrical,
|
||||
starting,
|
||||
sparking,
|
||||
plugs,
|
||||
distributor,
|
||||
fuel_system,
|
||||
lights,
|
||||
mechanical,
|
||||
plugs,
|
||||
sparking,
|
||||
starter_motor,
|
||||
starting])).
|
||||
starter_motor])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
sort1,
|
||||
tracer])).
|
||||
tracer,
|
||||
sort1])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -2,9 +2,9 @@
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
space,
|
||||
space_time,
|
||||
time,
|
||||
space_time,
|
||||
|
||||
space3,
|
||||
space_time4,
|
||||
time1])).
|
||||
time1,
|
||||
space_time4])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
circle2,
|
||||
ellipse3,
|
||||
circle2,
|
||||
line2,
|
||||
point2])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
bounded_coordinate,
|
||||
bounded_history_point,
|
||||
bounded_point,
|
||||
history_point,
|
||||
point,
|
||||
point_history])).
|
||||
point_history,
|
||||
bounded_coordinate,
|
||||
bounded_point,
|
||||
bounded_history_point,
|
||||
history_point])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -2,8 +2,8 @@
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
concentric,
|
||||
polygon,
|
||||
hexagon,
|
||||
pentagon,
|
||||
polygon,
|
||||
square,
|
||||
triangle])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,12 +1,9 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% :
|
||||
|
||||
|
||||
| ?-
|
||||
% the objects in this example are used by several of the other examples.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -2,7 +2,7 @@
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
initialization,
|
||||
classp, class,
|
||||
objectp, object,
|
||||
abstract_classp, abstract_class,
|
||||
classp, class,
|
||||
nil])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -12,9 +12,10 @@ You will need to also load the objects in the roots example.
|
||||
|
||||
You will also need to load the following files in the library directory:
|
||||
dates.loader, types.loader, events.loader, metapredicates.loader, and
|
||||
hierarchies.loader.
|
||||
hierarchies.loader. Alternatively, you can just load the all.loader file.
|
||||
|
||||
Some of the code in this folder is adopted from the book "Prolog Programming
|
||||
for Artificial Intelligence" by Ivan Bratko.
|
||||
|
||||
The object "performance" only provides correct results for the first solution.
|
||||
For a description of the search problems, please see a classical AI book
|
||||
(such as the one above) or visit the url <http://www.plastelina.net/games>.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -43,8 +43,8 @@ CC.<__>..........MMMC
|
||||
..........<__>.MMMCCC
|
||||
|
||||
Cost = 15,
|
||||
Path = [((3,3),esq,0,0),((2,2),dir,1,1),((3,2),esq,0,1),((3,0),dir,0,3),((3,1),esq,0,2),((1,1),dir,2,2),((2,2),esq,1,1),((0,2),dir,3,1),((0,3),esq,3,0),((0,1),dir,3,2),((0,2),esq,3,1),((0,0),dir,3,3)],
|
||||
Initial = ((3,3),esq,0,0)
|
||||
Path = [((3,3),left,0,0),((2,2),right,1,1),((3,2),left,0,1),((3,0),right,0,3),((3,1),left,0,2),((1,1),right,2,2),((2,2),left,1,1),((0,2),right,3,1),((0,3),left,3,0),((0,1),right,3,2),((0,2),left,3,1),((0,0),right,3,3)],
|
||||
Initial = ((3,3),left,0,0)
|
||||
yes
|
||||
|
||||
|
||||
@ -65,16 +65,43 @@ C..........<__>.MMMCC
|
||||
CC.<__>..........MMMC
|
||||
..........<__>.MMMCCC
|
||||
solution length: 12
|
||||
number of state transitions: 27
|
||||
ratio solution length / state transitions: 0.4444444444444444
|
||||
minimum branching degree: 2
|
||||
average branching degree: 2.5555555555555554
|
||||
number of state transitions: 26
|
||||
ratio solution length / state transitions: 0.461538
|
||||
minimum branching degree: 1
|
||||
average branching degree: 2.30769
|
||||
maximum branching degree: 3
|
||||
time: 0.067999999999756255
|
||||
time: 0.02
|
||||
|
||||
Cost = 15,
|
||||
Path = [((3,3),esq,0,0),((2,2),dir,1,1),((3,2),esq,0,1),((3,0),dir,0,3),((3,1),esq,0,2),((1,1),dir,2,2),((2,2),esq,1,1),((0,2),dir,3,1),((0,3),esq,3,0),((0,1),dir,3,2),((0,2),esq,3,1),((0,0),dir,3,3)],
|
||||
Initial = ((3,3),esq,0,0) ?
|
||||
Path = [((3,3),left,0,0),((2,2),right,1,1),((3,2),left,0,1),((3,0),right,0,3),((3,1),left,0,2),((1,1),right,2,2),((2,2),left,1,1),((0,2),right,3,1),((0,3),left,3,0),((0,1),right,3,2),((0,2),left,3,1),((0,0),right,3,3)],
|
||||
Initial = ((3,3),left,0,0) ?
|
||||
|
||||
yes
|
||||
|
||||
|
||||
% bridge problem, solved using a hill climbing strategy
|
||||
|
||||
| ?- performance::init, bridge::initial_state(Initial), hill_climbing(30)::solve(bridge, Initial, Path, Cost), bridge::print_path(Path), performance::report.
|
||||
|
||||
_|____________|_ lamp 1 3 6 8 12
|
||||
1 3 lamp _|____________|_ 6 8 12
|
||||
3 _|____________|_ lamp 1 6 8 12
|
||||
1 3 6 lamp _|____________|_ 8 12
|
||||
3 6 _|____________|_ lamp 1 8 12
|
||||
3 6 8 12 lamp _|____________|_ 1
|
||||
6 8 12 _|____________|_ lamp 1 3
|
||||
1 3 6 8 12 lamp _|____________|_
|
||||
solution length: 8
|
||||
state transitions: 346
|
||||
ratio solution length / state transitions: 0.0231214
|
||||
minimum branching degree: 1
|
||||
average branching degree: 7.42453
|
||||
maximum branching degree: 15
|
||||
time: 0.28
|
||||
|
||||
Initial = [], right, [1, 3, 6, 8, 12]
|
||||
Path = [ ([], right, [1, 3, 6, 8, 12]), ([1, 3], left, [6, 8, 12]), ([3], right, [1, 6, 8, 12]), ([1, 3, 6], left, [8, 12]), ([3, 6], right, [1, 8|...]), ([3, 6|...], left, [1]), ([6|...], right, [...|...]), ([...|...], ..., ...)]
|
||||
Cost = 29
|
||||
|
||||
yes
|
||||
|
||||
@ -104,11 +131,11 @@ yes
|
||||
|
||||
solution length: 6
|
||||
number of state transitions: 105
|
||||
ratio solution length / state transitions: 0.05714285714285714
|
||||
ratio solution length / state transitions: 0.0571429
|
||||
minimum branching degree: 2
|
||||
average branching degree: 3.6315789473684212
|
||||
average branching degree: 3.63158
|
||||
maximum branching degree: 4
|
||||
time: 0.20000000000027285
|
||||
time: 0.02
|
||||
|
||||
Path = [(0,0),(0,3),(3,0),(3,3),(4,2),(0,2)],
|
||||
Initial = (0,0) ?
|
||||
@ -144,14 +171,14 @@ yes
|
||||
|
||||
solution length: 8
|
||||
number of state transitions: 12
|
||||
ratio solution length / state transitions: 0.6666666666666666
|
||||
ratio solution length / state transitions: 0.666667
|
||||
|
||||
|
||||
|
||||
minimum branching degree: 1
|
||||
average branching degree: 2.0
|
||||
average branching degree: 2
|
||||
maximum branching degree: 3
|
||||
time: 0.021999999999934516
|
||||
time: 0.00
|
||||
|
||||
Path = [(0,0),(4,0),(4,3),(0,3),(3,0),(3,3),(4,2),(0,2)],
|
||||
Initial = (0,0) ?
|
||||
@ -190,9 +217,9 @@ solution length: 6
|
||||
number of state transitions: 15
|
||||
ratio solution length / state transitions: 0.4
|
||||
minimum branching degree: 2
|
||||
average branching degree: 3.1333333333333333
|
||||
average branching degree: 3.13333
|
||||
maximum branching degree: 4
|
||||
time: 0.050000000000181899
|
||||
time: 0.01
|
||||
|
||||
Cost = 5,
|
||||
Path = [[2/1,1/2,1/3,3/3,3/2,3/1,2/2,1/1,2/3],[2/2,1/2,1/3,3/3,3/2,3/1,2/1,1/1,2/3],[2/3,1/2,1/3,3/3,3/2,3/1,2/1,1/1,2/2],[1/3,1/2,2/3,3/3,3/2,3/1,2/1,1/1,2/2],[1/2,1/3,2/3,3/3,3/2,3/1,2/1,1/1,2/2],[2/2,1/3,2/3,3/3,3/2,3/1,2/1,1/1,1/2]],
|
||||
@ -232,9 +259,9 @@ solution length: 6
|
||||
number of state transitions: 15
|
||||
ratio solution length / state transitions: 0.4
|
||||
minimum branching degree: 2
|
||||
average branching degree: 3.1333333333333333
|
||||
average branching degree: 3.13333
|
||||
maximum branching degree: 4
|
||||
time: 0.046000000000276486
|
||||
time: 0.02
|
||||
|
||||
Cost = 5,
|
||||
Path = [[2/1,1/2,1/3,3/3,3/2,3/1,2/2,1/1,2/3],[2/2,1/2,1/3,3/3,3/2,3/1,2/1,1/1,2/3],[2/3,1/2,1/3,3/3,3/2,3/1,2/1,1/1,2/2],[1/3,1/2,2/3,3/3,3/2,3/1,2/1,1/1,2/2],[1/2,1/3,2/3,3/3,3/2,3/1,2/1,1/1,2/2],[2/2,1/3,2/3,3/3,3/2,3/1,2/1,1/1,1/2]],
|
||||
|
@ -31,8 +31,8 @@
|
||||
|
||||
expand(Path, l(State,F/G), Threshold, Tree, Solved, Solution, Space, Cost) :-
|
||||
F =< Threshold,
|
||||
(bagof(Next/Cost,
|
||||
(Space::next_state(State, Next, Cost), \+ list::member(Next, Path)),
|
||||
(bagof(Next/Cost2,
|
||||
(Space::next_state(State, Next, Cost2), \+ list::member(Next, Path)),
|
||||
Successors) ->
|
||||
succlist(G, Successors, Trees, Threshold, Space),
|
||||
bestf(Trees, F2, Threshold),
|
||||
|
@ -11,9 +11,6 @@
|
||||
parnames is ['Bound']]).
|
||||
|
||||
|
||||
:- calls(state_space).
|
||||
|
||||
|
||||
:- uses(list).
|
||||
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
Space::goal_state(State).
|
||||
|
||||
hill(Space, State, Threshold, Path, Solution, SoFar, Total) :-
|
||||
SoFar < Threshold,
|
||||
findall(
|
||||
(Estimate, Cost, Next),
|
||||
(Space::next_state(State, Next, Cost),
|
||||
@ -34,9 +33,10 @@
|
||||
Estimate is Guess + Cost),
|
||||
States),
|
||||
list::sort(States, SortedStates),
|
||||
list::member((_, Cost, Next), SortedStates),
|
||||
SoFar2 is SoFar + Cost,
|
||||
hill(Space, Next, Threshold, [State| Path], Solution, SoFar2, Total).
|
||||
list::member((_, Cost2, Next2), SortedStates),
|
||||
SoFar2 is SoFar + Cost2,
|
||||
SoFar2 =< Threshold,
|
||||
hill(Space, Next2, Threshold, [State| Path], Solution, SoFar2, Total).
|
||||
|
||||
|
||||
:- end_object.
|
||||
|
@ -66,7 +66,7 @@
|
||||
write('average branching degree: '), write(Average), nl,
|
||||
write('maximum branching degree: '), write(Maximum), nl,
|
||||
write('time: '), write(Time), nl,
|
||||
!.
|
||||
::retractall(transitions(_, _, _)). % clean up for next solution
|
||||
|
||||
|
||||
transitions(Number) :-
|
||||
@ -87,9 +87,8 @@
|
||||
findall(State2, ::transitions(State1, State2, _), States2),
|
||||
list::length(States2, Length)),
|
||||
Lengths),
|
||||
list::sort(Lengths, SortedLengths),
|
||||
SortedLengths = [Minimum| _],
|
||||
list::reverse(SortedLengths, [Maximum| _]),
|
||||
list::min(Lengths, Minimum),
|
||||
list::max(Lengths, Maximum),
|
||||
numberlist::sum(Lengths, Sum),
|
||||
list::length(Lengths, Length),
|
||||
Average is Sum / Length.
|
||||
@ -116,12 +115,14 @@
|
||||
before(_, solve(_, _, _), _) :-
|
||||
!,
|
||||
time::cpu_time(Time),
|
||||
::assertz(start_time(Time)).
|
||||
::retractall(start_time(_)),
|
||||
::asserta(start_time(Time)).
|
||||
|
||||
before(_, solve(_, _, _, _), _) :-
|
||||
!,
|
||||
time::cpu_time(Time),
|
||||
::assertz(start_time(Time)).
|
||||
::retractall(start_time(_)),
|
||||
::asserta(start_time(Time)).
|
||||
|
||||
|
||||
after(_, next_state(S1, S2), _) :-
|
||||
@ -145,7 +146,8 @@
|
||||
after(_, solve(_, _, Solution), _) :-
|
||||
!,
|
||||
time::cpu_time(Time),
|
||||
::assertz(end_time(Time)),
|
||||
::retractall(end_time(_)),
|
||||
::asserta(end_time(Time)),
|
||||
list::length(Solution, Length),
|
||||
::retractall(solution_length(_)),
|
||||
::asserta(solution_length(Length)).
|
||||
@ -153,11 +155,11 @@
|
||||
after(_, solve(_, _, Solution, _), _) :-
|
||||
!,
|
||||
time::cpu_time(Time),
|
||||
::assertz(end_time(Time)),
|
||||
::retractall(end_time(_)),
|
||||
::asserta(end_time(Time)),
|
||||
list::length(Solution, Length),
|
||||
::retractall(solution_length(_)),
|
||||
::asserta(solution_length(Length)).
|
||||
|
||||
|
||||
:- end_object.
|
||||
|
||||
|
@ -1,17 +1,18 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
best_first1,
|
||||
state_space,
|
||||
water_jug,
|
||||
farmer,
|
||||
heuristic_state_space,
|
||||
bridge,
|
||||
eight_puzzle,
|
||||
miss_cann,
|
||||
search_strategy,
|
||||
blind_search1,
|
||||
breadth_first1,
|
||||
depth_first1,
|
||||
eight_puzzle,
|
||||
farmer,
|
||||
heuristic_search1,
|
||||
heuristic_state_space,
|
||||
best_first1,
|
||||
hill_climbing1,
|
||||
miss_cann,
|
||||
performance,
|
||||
search_strategy,
|
||||
state_space,
|
||||
water_jug])).
|
||||
performance])).
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
next_state((X, Y), (Z, 3)) :-
|
||||
X > 0, Y < 3,
|
||||
Aux is X + Y, Aux >= 4,
|
||||
Aux is X + Y, Aux >= 3,
|
||||
Z is X - (3 - Y).
|
||||
|
||||
next_state((X, Y),(Z, 0)) :-
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -10,5 +10,5 @@ The examples in this folder are adopted from the SICStus Prolog manual.
|
||||
To load all objects in this example consult the sicstus.loader utility
|
||||
file (note that the *.loader files are Prolog files).
|
||||
|
||||
You will also need to load the follwing files in library directory:
|
||||
You will also need to load the following files in library directory:
|
||||
hierarchies.loader and types.loader.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -9,7 +9,7 @@ Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
| ?- sort(rational)::sort([1/8, 2/7, 6/5, 2/9, 1/3], Sorted).
|
||||
|
||||
Sorted = [1/8, 2/9, 2/7, 1/3, 6/5]
|
||||
yes.
|
||||
yes
|
||||
|
||||
|
||||
| ?- sort(colours)::sort([orange, indigo, red, yellow, violet, blue, green], Sorted).
|
||||
@ -27,19 +27,19 @@ yes
|
||||
| ?- red_circle(3)::color(Color).
|
||||
|
||||
Color = red
|
||||
yes.
|
||||
yes
|
||||
|
||||
|
||||
| ?- red_circle(3)::area(Area).
|
||||
|
||||
Area = 28.274334
|
||||
yes.
|
||||
yes
|
||||
|
||||
|
||||
| ?- red_circle(3)::ancestors(As).
|
||||
|
||||
As = [circle(3, red), ellipse(3, 3, red)]
|
||||
yes.
|
||||
yes
|
||||
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ Side = 2
|
||||
Width = 2
|
||||
Height = 2
|
||||
Area = 4
|
||||
yes.
|
||||
yes
|
||||
|
||||
|
||||
| ?- square(2)::current_predicate(Pred).
|
||||
|
@ -1,13 +1,13 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
circle11,
|
||||
ellipse3,
|
||||
circle2,
|
||||
circle11,
|
||||
red_circle1,
|
||||
colours,
|
||||
math_constants,
|
||||
ellipse3,
|
||||
rational,
|
||||
rectangle2,
|
||||
red_circle1,
|
||||
sort1,
|
||||
square1])).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -16,7 +16,7 @@ S = 0
|
||||
yes
|
||||
|
||||
|
||||
% diffrentiate and then simplify the expression 2x^3 + x^2 - 4x
|
||||
% differentiate and then simplify the expression 2x^3 + x^2 - 4x
|
||||
|
||||
| ?- (2*x**3 + x**2 - 4*x)::diff(D), D::simplify(S).
|
||||
|
||||
@ -26,7 +26,7 @@ S = 2*(3*x**2)+2*x-4
|
||||
yes
|
||||
|
||||
|
||||
% diffrentiate and then simplify the expression ln(x^2 + 2x - 7) + 4x
|
||||
% differentiate and then simplify the expression ln(x^2 + 2x - 7) + 4x
|
||||
|
||||
| ?- (log(x**2 + 2*x - 7) + 4*x)::diff(D), D::simplify(S).
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,16 +8,28 @@ Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
This folder contains objects, categories, and protocols that implement
|
||||
predicates for dealing with common Prolog types and structures.
|
||||
|
||||
To load all a group of objects, protocols and categories in this
|
||||
library consult the corresponding *.loader utility file.
|
||||
To load a group of objects, protocols, and categories in this library
|
||||
consult the corresponding *.loader utility file. Currently, there are
|
||||
seven groups of entities defined:
|
||||
|
||||
Some files represent work in progress and are not loaded by default by
|
||||
any loader utility file.
|
||||
dates
|
||||
debugging
|
||||
events
|
||||
hierarchies
|
||||
metapredicates
|
||||
random
|
||||
types
|
||||
|
||||
There is also a file named all.loader that will load all entities in the
|
||||
seven groups listed above.
|
||||
|
||||
Specific notes about each group of objects, categories, and protocols
|
||||
can be found in the corresponding *.notes files.
|
||||
|
||||
Some files represent work in progress and are not loaded by default by
|
||||
any loader utility file.
|
||||
|
||||
Some of the code in this library is based on public domain Prolog code,
|
||||
in particular, adopted from the Edinburgh Prolog library.
|
||||
in particular, code adopted from the Edinburgh Prolog library.
|
||||
|
||||
All source files are formatted using four-spaces tabs.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
38
Logtalk/library/all.loader
Normal file
38
Logtalk/library/all.loader
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
datep, date, % dates
|
||||
timep, time,
|
||||
|
||||
event_handlersp, % events
|
||||
event_registryp, event_registry,
|
||||
before_event_registry, after_event_registry,
|
||||
monitorp, monitor,
|
||||
|
||||
debuggerp, % debugging
|
||||
debugger,
|
||||
|
||||
hierarchyp, % hierarchies
|
||||
proto_hierarchyp, proto_hierarchy,
|
||||
class_hierarchyp, class_hierarchy,
|
||||
|
||||
metap, meta, % metapredicates
|
||||
loopp, loop,
|
||||
|
||||
randomp, % random
|
||||
random,
|
||||
|
||||
termp, term, % types
|
||||
atomic,
|
||||
atom, callable,
|
||||
characterp, character,
|
||||
number, float, integer, natural,
|
||||
compound,
|
||||
listp, list, difflist,
|
||||
numberlistp, numberlist,
|
||||
varlist,
|
||||
queuep, queue,
|
||||
dictionaryp, bintree,
|
||||
setp, set,
|
||||
comparingp])).
|
||||
|
11
Logtalk/library/all.notes
Normal file
11
Logtalk/library/all.notes
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
The all.loader file will load all the entities loaded by the other
|
||||
loader files.
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -9,7 +9,8 @@ Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
To load all objects in this group consult the debugging.loader utility
|
||||
file.
|
||||
|
||||
You will also need to load FIRST the events.loader file.
|
||||
You will need to load FIRST the events.loader file otherwise you will get
|
||||
a runtime error.
|
||||
|
||||
|
||||
The object debugger enables you to:
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -121,7 +121,6 @@
|
||||
:- public(subset/2).
|
||||
|
||||
:- mode(subset(+set, +set), zero_or_one).
|
||||
:- mode(subset(?set, +set), zero_or_more).
|
||||
|
||||
:- info(subset/2, [
|
||||
comment is 'True if Subset is a subset of Set.',
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.8.4
|
||||
Release 2.9.1
|
||||
|
||||
Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,9 +8,9 @@ Copyright (c) 1998-2001 Paulo Moura. All Rights Reserved.
|
||||
To consult the Logtalk documentation open the file index.html with a
|
||||
web browser.
|
||||
|
||||
Starting with version 2.6.0, all the pages are being converted to
|
||||
conform to the HTML 4.01 Strict W3C Standard. In a future version,
|
||||
they will also be XHTML 1.0 ready. You can change the appearence of
|
||||
the pages by changing the included styles.css cascade style sheet file.
|
||||
Needless to say, the manual pages look better in recent web navigator
|
||||
releases that support both the HTML 4 and CSS1 web standards.
|
||||
Starting with version 2.6.0, all the pages conform to the HTML 4.01
|
||||
Strict W3C Standard. In a future version, they will also be XHTML 1.0
|
||||
ready. You can change the appearence of the pages by changing the
|
||||
included styles.css cascade style sheet file. Needless to say, the
|
||||
manual pages look better in recent web browser releases that support
|
||||
both the HTML 4 and CSS1 web standards.
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<head>
|
||||
<title>Logtalk Bibliography</title>
|
||||
<link rel=stylesheet href="styles.css" type="text/css">
|
||||
<link rel=stylesheet href="styles.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -4,14 +4,14 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Logtalk 2.8.4 Documentation</title>
|
||||
<title>Logtalk 2.9.1 Documentation</title>
|
||||
<link rel=stylesheet href="styles.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<hr />
|
||||
<h1 class="center">Logtalk 2.8.4</h1>
|
||||
<h1 class="center">Logtalk 2.9.1</h1>
|
||||
|
||||
<h3 class="center">Documentation</h3>
|
||||
<p class="center">
|
||||
@ -44,7 +44,7 @@ Portugal
|
||||
|
||||
<hr />
|
||||
<p class="center">
|
||||
Last updated on: February 10, 2001
|
||||
Last updated on: November 26, 2001
|
||||
</p>
|
||||
<p class="center">
|
||||
<a href="http://validator.w3.org/check/referer"><img src="vh401.gif" alt="Valid HTML 4.01!" width="88" height="31"></a>
|
||||
|
@ -33,7 +33,7 @@ abolish_category(@category_identifier)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -61,7 +61,7 @@ abolish_category(@category_identifier)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ abolish_events(@event, @object_identifier, @callable, @object_identifier, @objec
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -63,7 +63,7 @@ abolish_events(@event, @object_identifier, @callable, @object_identifier, @objec
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -34,7 +34,7 @@ abolish_object(@object_identifier)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -62,7 +62,7 @@ abolish_object(@object_identifier)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ abolish_protocol(@protocol_identifier)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -61,7 +61,7 @@ abolish_protocol(@protocol_identifier)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ category_property(?category_identifier, ?category_property)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -57,7 +57,7 @@ category_property(?category_identifier, ?category_property)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ create_category(+category_identifier, +list, +list, +list)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -67,7 +67,7 @@ create_category(+category_identifier, +list, +list, +list)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ create_object(+object_identifier, +list, +list, +list)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -67,7 +67,7 @@ create_object(+object_identifier, +list, +list, +list)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ create_protocol(+protocol_identifier, +list, +list)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -65,7 +65,7 @@ create_protocol(+protocol_identifier, +list, +list)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ current_category(?category_identifier)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -55,7 +55,7 @@ current_category(?category_identifier)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ current_event(?event, ?object_identifier, ?callable, ?object_identifier, ?object
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -63,7 +63,7 @@ current_event(?event, ?object_identifier, ?callable, ?object_identifier, ?object
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ current_object(?object_identifier)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -55,7 +55,7 @@ current_object(?object_identifier)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ current_protocol(?protocol_identifier)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -55,7 +55,7 @@ current_protocol(?protocol_identifier)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ define_events(@event, @object_identifier, @callable, @object_identifier, +object
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -65,7 +65,7 @@ define_events(@event, @object_identifier, @callable, @object_identifier, +object
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,11 +33,11 @@ extends_object(Prototype, Parent, Scope)
|
||||
<pre>
|
||||
extends_object(?object_identifier, ?object_identifier)
|
||||
|
||||
extends_object(?object_identifier, ?object_identifier, ?entity_scope)
|
||||
extends_object(?object_identifier, ?object_identifier, ?scope)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -46,7 +46,7 @@ extends_object(?object_identifier, ?object_identifier, ?entity_scope)
|
||||
<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>
|
||||
<dd><code>type_error(scope, Scope)</code></dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
@ -65,7 +65,7 @@ extends_object(?object_identifier, ?object_identifier, ?entity_scope)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,11 +33,11 @@ extends_protocol(Protocol1, Protocol2, Scope)
|
||||
<pre>
|
||||
extends_protocol(?protocol_identifier, ?protocol_identifier)
|
||||
|
||||
extends_protocol(?protocol_identifier, ?protocol_identifier, ?entity_scope)
|
||||
extends_protocol(?protocol_identifier, ?protocol_identifier, ?scope)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -46,7 +46,7 @@ extends_protocol(?protocol_identifier, ?protocol_identifier, ?entity_scope)
|
||||
<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>
|
||||
<dd><code>type_error(scope, Scope)</code></dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
@ -65,7 +65,7 @@ extends_protocol(?protocol_identifier, ?protocol_identifier, ?entity_scope)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,7 +33,7 @@ forall(+callable, +callable)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -57,7 +57,7 @@ forall(+callable, +callable)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -36,12 +36,12 @@ implements_protocol(Category, Protocol, Scope)
|
||||
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)
|
||||
implements_protocol(?object_identifier, ?protocol_identifier, ?scope)
|
||||
implements_protocol(?category_identifier, ?protocol_identifier, ?scope)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -52,7 +52,7 @@ implements_protocol(?category_identifier, ?protocol_identifier, ?entity_scope)
|
||||
<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>
|
||||
<dd><code>type_error(scope, Scope)</code></dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
@ -71,7 +71,7 @@ implements_protocol(?category_identifier, ?protocol_identifier, ?entity_scope)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,11 +33,11 @@ imports_category(Object, Category, Scope)
|
||||
<pre>
|
||||
imports_category(?object_identifier, ?category_identifier)
|
||||
|
||||
imports_category(?object_identifier, ?category_identifier, ?entity_scope)
|
||||
imports_category(?object_identifier, ?category_identifier, ?scope)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -46,7 +46,7 @@ imports_category(?object_identifier, ?category_identifier, ?entity_scope)
|
||||
<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>
|
||||
<dd><code>type_error(scope, Scope)</code></dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
@ -65,7 +65,7 @@ imports_category(?object_identifier, ?category_identifier, ?entity_scope)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -33,11 +33,11 @@ instantiates_class(Instance, Class, Scope)
|
||||
<pre>
|
||||
instantiates_class(?object_identifier, ?object_identifier)
|
||||
|
||||
instantiates_class(?object_identifier, ?object_identifier, ?entity_scope)
|
||||
instantiates_class(?object_identifier, ?object_identifier, ?scope)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -46,7 +46,7 @@ instantiates_class(?object_identifier, ?object_identifier, ?entity_scope)
|
||||
<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>
|
||||
<dd><code>type_error(scope, Scope)</code></dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
@ -65,7 +65,7 @@ instantiates_class(?object_identifier, ?object_identifier, ?entity_scope)
|
||||
<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
|
||||
Last updated on: October 21, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
@ -21,8 +21,10 @@
|
||||
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.
|
||||
|
||||
Compiles to disk a list of 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. In other words, the files must exist in your current working directory.
|
||||
</p>
|
||||
<p>
|
||||
Note that only the errors related to problems in the predicate argument are listed below. Other exceptions may be thrown by the compiler if any of the compiled entities contain errors.
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
@ -34,7 +36,7 @@ logtalk_compile(+atom_list)
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
<h3>Errors</h3>
|
||||
<h4>Errors</h4>
|
||||
|
||||
<blockquote>
|
||||
<dl>
|
||||
@ -64,7 +66,7 @@ logtalk_compile(+atom_list)
|
||||
<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
|
||||
Last updated on: October 22, 2001
|
||||
</p>
|
||||
<hr />
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user