Logtalk 2.16.0 release files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1014 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura
2004-03-03 04:07:59 +00:00
parent 8a0fa13746
commit d494081bc5
115 changed files with 1220 additions and 424 deletions

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
This folder contains several examples of Logtalk programs. Most of
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 the library
you should load them first (see the NOTES files inside the library
folder and inside each example folder).
Some examples may redefine objects already loaded from other examples.
@@ -26,7 +26,7 @@ All examples are formatted using four spaces tabs.
By default, compiling an example generates a .xml documenting file for each
compiled entity (object, category, or protocol). See the xml sub-directory
for instructions on how to browse the .xml files for on-line reading or how
to convert the files to print-ready format.
to convert the files to a print-ready format such as PDF.
Here is a short description of each included example:
@@ -76,6 +76,9 @@ msglog
example of using events and monitors for recording, replaying, and
printing user messages
operators
example of using operators local to objects and categories
parametric
simple example of parametric objects

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -0,0 +1,26 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
To load most objects in this example consult the operators.loader
utility file (note that the *.loader files are Prolog files).
This folder contains examples of the used of operators inside
objects and categories.
double.lgt
Simple object containing clauses using an infix operator.
triple.lgt
Simple object reading from a file, and asserting into self,
clauses that use an infix operator.
reverse.lgt
Simple object reading from a file, and writing to another
file, clauses that use infix operators.

View File

@@ -0,0 +1,46 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
% operators declared inside an object are not visible outside:
| ?- double::(I double J).
Syntax error: Operator expected
% you must use instead:
| ?- double::double(I, J).
I = 1
J = 2 ;
I = 2
J = 4 ;
I = 3
J = 6
Yes
% operators also affect inputing of terms, enabling this example to work:
| ?- triple::triple(I, J).
I = 1
J = 3 ;
I = 2
J = 6 ;
I = 3
J = 9
Yes

View File

@@ -0,0 +1,21 @@
:- object(double).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2004/2/16,
comment is 'Contains a simple table of facts for testing operator handling code.']).
:- public(double/2).
:- op(500, xfx, double).
1 double 2.
2 double 4.
3 double 6.
:- end_object.

View File

@@ -0,0 +1,5 @@
0 next 1.
1 next 2.
2 next 3.
3 next 4.
4 next 5.

View File

@@ -0,0 +1,6 @@
:- initialization(
logtalk_load([
double,
triple,
reverse])).

View File

@@ -0,0 +1,33 @@
:- object(reverse).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2004/2/16,
comment is 'Reads and writes a simple table of facts from and to files for testing operator handling code.']).
:- op(500, xfx, next).
:- op(500, xfx, previous).
:- initialization(reverse_file).
reverse_file :-
open('next.txt', read, RStream),
open('previous.txt', write, WStream),
read(RStream, Term),
process(Term, RStream, WStream).
process(end_of_file, RStream, WStream) :-
close(RStream),
close(WStream).
process(X next Y, RStream, WStream) :-
write(WStream, Y previous X), write(WStream, '.'), nl(WStream),
read(RStream, Next),
process(Next, RStream, WStream).
:- end_object.

View File

@@ -0,0 +1,34 @@
:- object(triple).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2004/2/16,
comment is 'Read and asserts a simple table of facts from a file for testing operator handling code.']).
:- public(triple/2).
:- dynamic(triple/2).
:- op(500, xfx, triple).
:- initialization(read_from_file).
read_from_file :-
open('triple.txt', read, Stream),
read(Stream, Term),
process(Stream, Term).
process(Stream, end_of_file) :-
close(Stream),
!.
process(Stream, Term) :-
assertz(Term),
read(Stream, Next),
process(Stream, Next).
:- end_object.

View File

@@ -0,0 +1,3 @@
1 triple 3.
2 triple 6.
3 triple 9.

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@@ -23,8 +23,8 @@ You can find the original description of this example (and a solution using
SICStus Objects) at the URL:
http://www.sics.se/ps/sicstus/sicstus_32.html#SEC254
Suppose you wish to represent one point in a two-dimensional space. The
protocol you will have to define consists on the operation move/2, wish
Suppose you wish to represent points in a two-dimensional space. The
protocol you will have to define consists on the operation move/2, which
allows you to move one point to a new position, and on the operation
print/0, which prints the point position. From the base class point,
which contains the indicated operations, we wish to build three
@@ -35,8 +35,8 @@ Finally, a class bounded_history_point combining the functionality of
classes bounded_point and history_point.
At first sight, this looks like the kind of ideal problem to illustrate
the advantages of the multiple inheritance mechanisms. This type of
solution holds, however, several problems. If the methods move/2 and
the advantages of the multiple inheritance mechanisms. However, this type
of solution holds several problems. If the methods move/2 and
print/0 are inherited by bounded_history_point of classes
history_point and bounded_point simultaneously, then one point will be
moved and shown twice. If the inheritance is carried out, for each

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@@ -8,3 +8,9 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
This directory contains two versions, one prototype-based and the
other one class-based, of a very simple geometric shapes hierarchy.
ph
prototype-based version
ch
class-based version

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.15.6
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================