Logtalk 2.19.0 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1104 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura 2004-07-25 18:47:43 +00:00
parent 3801508cdf
commit 2a1fbb6e88
141 changed files with 684 additions and 382 deletions

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@ -16,14 +16,14 @@ easy installation of Logtalk on Unix and Unix-like operating systems.
INSTALLING FOR A SINGLE USER
In the case of a single user, the Logtalk directory can simply be
copied to the user home directory.
In the case of a single user, the Logtalk directory may simply be copied to
the user home directory.
INSTALLING FOR MULTIPLE USERS
In the case of multiple users, the Logtalk directory can be copied to
any location that its accessible by all the users.
In the case of multiple users, the Logtalk directory can be copied to any
location that its accessible by all the users.
Regarding directory and file permissions, it is advisable to make all files
read-only in order to avoid user tempering. However, the library and examples
@ -46,11 +46,11 @@ variable named $LOGTALKHOME pointing to the Logtalk installation for use with
your Prolog compilers. If you use a csh shell, add the following line to your
~/.cshrc file:
setenv LOGTALKHOME "/your/installation/directory/lgt2180"
setenv LOGTALKHOME "/your/installation/directory/lgt2190"
If you use a bash shell, add the following lines to your ~/.profile file:
LOGTALKHOME="/your/installation/directory/lgt2180"
LOGTALKHOME="/your/installation/directory/lgt2190"
export LOGTALKHOME
When using the provided shell script for installing Logtalk, a symbolic link

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@ -35,7 +35,7 @@ URL:
http://www.logtalk.org/
At this address you can also find useful documentation and information
At this address you can also find additional documentation and information
about Logtalk.

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@ -10,6 +10,20 @@ RELEASE NOTES
=============
2.19.0 - July 26, 2004
Added support for defining more that one entity per file using Logtalk
source metafiles (*.mlgt), which the runtime engine automatically splits
on single entity source files plus loading and compiling helper files.
Updated the URL used on the automatically generated XML documenting files
when compiling entities with the option doctype(web).
Improved error checking when compiling calls to the {}/1 control construct.
Corrected several typos and some outdated links on the Logtalk manuals.
2.18.0 - July 9, 2004
Added caching of method lookups in order to improve message processing

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@ -9,31 +9,31 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
This folder contains several examples of Logtalk programs. A brief
description of each example is included below.
Each example contains a NOTES file and a loader utility file that may
be used to load all the example entities. In addition, most examples
Each example folder contains a NOTES file and a loader helper file which
may be used to load all the example entities. In addition, most examples
contain a SCRIPT file with sample queries for your to try.
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 files inside the library
folder and the NOTES file inside each example folder).
Most of these examples need objects, protocols, and categories which are
defined in the Logtalk standard library or in other examples, so you
should load them first (see the NOTES files inside the library folder and
the NOTES file inside each example folder).
Some examples may redefine objects already loaded from other examples.
You may want to restart Logtalk after trying each example.
Some of the examples code have been adopted from public available
Prolog code and from known Prolog text books and are copyrighted by
the respective authors.
Some of the examples code have been adopted from public available Prolog
code and from known Prolog text books and are copyrighted by the respective
authors.
These are programming examples, meaning that you should study the
source files to fully understand them.
These are programming examples, meaning that you should study the source
files to fully understand them.
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 a print-ready format such as PDF.
compiled entity (object, category, or protocol). See the xml folder for
instructions on how to browse the .xml files for on-line reading or how to
convert the files to a print-ready format such as PDF.
Here is a short description of each included example:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,13 +1,12 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
This folder contains objects, categories, and protocols that implement
predicates for dealing with common Prolog types and structures.
This folder contains some useful objects, categories, and protocols.
To load a group of objects, protocols, and categories in this library
change your Prolog working directory to this folder and then compile
@ -55,20 +54,21 @@ predicate logtalk_load/1. For example:
| ?- logtalk_load(all_loader).
Specific notes about each group of objects, categories, and protocols
can be found in the corresponding *.notes files.
Specific notes about each group of objects, categories, and protocols can be
found in the corresponding *.notes files.
Some of the files contained in this directory represent work in progress
and are not loaded by default by any loader utility file.
Some of the files contained in this directory 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, code adopted from the Edinburgh Prolog library. The definition
Some of the code in this library is based on public domain Prolog code, in
particular, code adopted from the Edinburgh Prolog library. The definition
of predicate reverse/2 in object list is from Richard O'Keefe and can be found
in its book "The Craft of Prolog".
By default, compiling any group of entities described above 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.
for on-line reading or how to convert the files to a print-ready format such
as PDF.
All source files are formatted using four-spaces tabs.

View File

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

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@ -16,5 +16,5 @@ The object date implements some useful calandar date predicates.
The object time implements some useful time predicates.
Please note that some of the functionality of these objects depends
on the used Prolog support for accessing operating system time and
on the chosen Prolog support for accessing operating system time and
date values.

View File

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

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@ -16,9 +16,9 @@ implement convenient predicates for registering before and after events.
The protocol event_handlersp declares the two basic event handler predicates
(before/3 and after/3). You will need to refer this protocol in your objects
if you need to use the super control structure (^^/1) with these predicates.
if you want to use the super control structure (^^/1) with these predicates.
The monitor object implements more sophisticated event handling predicates.
Some of the objects assume that the used Prolog compiler defines the
Some of the objects assume that the chosen Prolog compiler defines the
usual sort/2 built-in predicate.

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@ -11,5 +11,5 @@ utility file:
| ?- logtalk_load(hierarchies_loader).
These objects implement reflection predicates over class/instance
and prototype hierarchies.
These objects implement reflection predicates over class and prototype
hierarchies.

View File

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

View File

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

View File

@ -2,9 +2,9 @@
:- protocol(systemp).
:- info([
version is 1.7,
version is 1.81,
author is 'Portable Operating-System Interface (POSI) initiative',
date is 2004/6/24,
date is 2004/7/20,
comment is 'Portable operating system access protocol.']).
:- public(make_directory/1).
@ -15,12 +15,12 @@
exceptions is [
'Directory is not instantiated' - instantiation_error,
'Directory is neither a variable nor a valid file name' - type_error(file_name, 'Directory'),
'No permission for creating a new directory' - permission_error(write, 'Directory')]]).
'No permission for making a new directory' - permission_error(write, 'Directory')]]).
:- public(delete_directory/1).
:- mode(delete_directory(+atom), one).
:- info(delete_directory/1, [
comment is 'Deletes a directory.',
comment is 'Deletes a directory (and all of its contents).',
argnames is ['Directory'],
exceptions is [
'Directory is not instantiated' - instantiation_error,
@ -42,7 +42,7 @@
:- public(working_directory/1).
:- mode(working_directory(?atom), one).
:- info(working_directory/1, [
comment is 'Current working directory.',
comment is 'Current working directory (as an absolute file name).',
argnames is ['Directory'],
exceptions is [
'Directory is neither a variable nor a valid file name' - type_error(file_name, 'Directory')]]).
@ -50,17 +50,16 @@
:- public(directory_exists/1).
:- mode(directory_exists(+atom), zero_or_one).
:- info(directory_exists/1, [
comment is 'True if the specified directory exists.',
comment is 'True if the specified directory exists (irrespective of directory permissions).',
argnames is ['Directory'],
exceptions is [
'Directory is not instantiated' - instantiation_error,
'Directory is neither a variable nor a valid file name' - type_error(file_name, 'Directory'),
'No access permission for the directory' - permission_error(read, 'Directory')]]).
'Directory is neither a variable nor a valid file name' - type_error(file_name, 'Directory')]]).
:- public(directory_files/2).
:- mode(directory_files(+atom, -list), one).
:- info(directory_files/2, [
comment is 'List of all directory files. Returns an empty list if the directory is empty.',
comment is 'List of all directory files (returns an empty list if the directory is empty).',
argnames is ['Directory', 'Files'],
exceptions is [
'Directory is not instantiated' - instantiation_error,
@ -82,7 +81,7 @@
:- public(rename_file/2).
:- mode(rename_file(+atom, +atom), zero_or_one).
:- info(rename_file/2, [
comment is 'Renames a file (or directory).',
comment is 'Renames a file (or a directory).',
argnames is ['Old', 'New'],
exceptions is [
'Old is not instantiated' - instantiation_error,
@ -106,20 +105,30 @@
'No read permission to the original file' - permission_error(read, 'Original'),
'No write permission to the file copy' - permission_error(write, 'Copy')]]).
:- public(symbolic_link/2).
:- mode(symbolic_link(+atom, -atom), one).
:- info(symbolic_link/2, [
comment is 'Follows a symbolic link returning the target full path.',
:- public(make_symlink/2).
:- mode(make_symlink(+atom, +atom), one).
:- info(make_symlink/2, [
comment is 'Makes a symbolic link.',
argnames is ['Symlink', 'Target'],
exceptions is [
'Symlink is not instantiated' - instantiation_error,
'Target is not instantiated' - instantiation_error,
'Symlink is neither a variable nor a valid file name' - type_error(file_name, 'Symlink'),
'Symlink is a valid file name but not a symbolic link' - type_error(symlink, 'Symlink'),
'No access permission to the symbolic link' - permission_error(access, 'Symlink')]]).
'Target is neither a variable nor a valid file name' - type_error(file_name, 'Target'),
'No permission for creating the symbolic link' - permission_error(write, 'Symlink')]]).
:- public(file_exists/1).
:- mode(file_exists(+atom), zero_or_one).
:- info(file_exists/1, [
comment is 'True if the specified file exists (irrespective of type and file permissions).',
argnames is ['File'],
exceptions is [
'File is not instantiated' - instantiation_error,
'File is neither a variable nor a valid file name' - type_error(file_name, 'File')]]).
:- public(file_property/2).
:- mode(file_property(+atom, +nonvar), zero_or_one).
:- mode(file_property(+atom, -nonvar), one_or_more).
:- mode(file_property(+atom, +compound), zero_or_one).
:- mode(file_property(+atom, -compound), one_or_more).
:- info(file_property/2, [
comment is 'File properties.',
argnames is ['File', 'Property'],
@ -127,13 +136,13 @@
'File is not instantiated' - instantiation_error,
'File is neither a variable nor a valid file name' - type_error(file_name, 'File'),
'File does not exists' - existence_error(file, 'File'),
'No access permission to the file' - permission_error(access, 'File'),
'Property is neither a variable nor a file name part' - type_error(file_property, 'Property')]]).
'No read permission to the file' - permission_error(read, 'File'),
'Property is neither a variable nor a file property' - type_error(file_property, 'Property')]]).
:- public(current_environment_variable/1).
:- mode(current_environment_variable(?atom), zero_or_more).
:- info(current_environment_variable/1, [
comment is 'Argument is a corrently defined environment variable . Fails if the variable does not exists.',
comment is 'Argument is a currently defined environment variable . Fails if the variable does not exists.',
argnames is ['Variable'],
exceptions is [
'Variable is neither a variable nor an atom' - type_error(atom, 'Variable')]]).
@ -173,7 +182,7 @@
:- public(time_stamp/1).
:- mode(time_stamp(-number), one).
:- info(time_stamp/1, [
comment is 'Returns the current system-dependent time stamp.',
comment is 'Returns a system-dependent time stamp (which can be used for sorting).',
argnames is ['Time']]).
:- public(local_time/1).
@ -185,17 +194,19 @@
:- public(utc_time/1).
:- mode(utc_time(?time(?integer, ?integer, ?integer, ?integer, ?integer, ?integer, ?integer)), zero_or_one).
:- info(utc_time/1, [
comment is 'Universal Coordinated Time (UTC) time.',
comment is 'Universal Coordinated Time (UTC).',
argnames is [time('Year', 'Month', 'Day', 'Hours', 'Mins', 'Secs', 'Microsecs')]]).
:- public(convert_time/2).
:- mode(convert_time(+number, ?time(?integer, ?integer, ?integer, ?integer, ?integer, ?integer, ?integer)), zero_or_one).
:- mode(convert_time(?number, +time(+integer, +integer, +integer, +integer, +integer, +integer, +integer)), zero_or_one).
:- info(convert_time/2, [
comment is 'Converts a system-dependent time stamp to calendar local date and time.',
comment is 'Converts between system-dependent time stamps and calendar local date and time.',
argnames is ['Time', time('Year', 'Month', 'Day', 'Hours', 'Mins', 'Secs', 'Microsecs')],
exceptions is [
'Time is not instantiated' - instantiation_error,
'Time is neither a variable nor a valid time stamp' - type_error(time_stamp, 'Variable')]]).
'Neither argument is instantiated' - instantiation_error,
'Time stamp is neither a variable nor a valid time stamp' - type_error(time_stamp, 'Time'),
'Time structure is neither a variable nor a valid time structure' - type_error(time_structure, 'time(Year, Month, Day, Hours, Mins, Secs, Microsecs)')]]).
:- public(cpu_time/1).
:- mode(cpu_time(-number), one).
@ -209,24 +220,24 @@
comment is 'Host name (default is localhost).',
argnames is ['Name']]).
:- public(canonical_os_path/2).
:- mode(canonical_os_path(+atom, -atom), one).
:- mode(canonical_os_path(-atom, +atom), one).
:- info(canonical_os_path/2, [
comment is 'Converts between canonical and operating system dependent paths.',
:- public(canonical_os_file_name/2).
:- mode(canonical_os_file_name(+atom, -atom), one).
:- mode(canonical_os_file_name(-atom, +atom), one).
:- info(canonical_os_file_name/2, [
comment is 'Converts between canonical and operating system dependent file names.',
argnames is ['Canonical', 'OS']]).
:- public(canonical_path/3).
:- mode(canonical_path(+atom, -atom, -atom), zero_or_one).
:- mode(canonical_path(-atom, +atom, -atom), zero_or_one).
:- mode(canonical_path(-atom, -atom, +atom), zero_or_one).
:- info(canonical_path/3, [
comment is 'Converts between relative, absolute, and URL canonical paths.',
:- public(canonical_file_name/3).
:- mode(canonical_file_name(+atom, -atom, -atom), one).
:- mode(canonical_file_name(-atom, +atom, -atom), one).
:- mode(canonical_file_name(-atom, -atom, +atom), one).
:- info(canonical_file_name/3, [
comment is 'Converts between relative, absolute, and URL canonical file names.',
argnames is ['Relative', 'Absolute', 'URL'],
exceptions is [
'None of the arguments is instantiated' - instantiation_error,
'Relative is neither a variable nor a relative path' - type_error(relative_file_name, 'Relative'),
'Absolute is neither a variable nor a absolute path' - type_error(absolute_path, 'Absolute'),
'Relative is neither a variable nor a relative file name' - type_error(relative_file_name, 'Relative'),
'Absolute is neither a variable nor a absolute file name' - type_error(absolute_file_name, 'Absolute'),
'URL is neither a variable nor a file name URL' - type_error(url_file_name, 'URL')]]).
:- public(relative_file_name/1).
@ -269,7 +280,7 @@
:- public(url_file_name/2).
:- mode(url_file_name(+atom, ?atom), zero_or_one).
:- info(url_file_name/2, [
comment is 'Expands a file name into a URL.',
comment is 'Expands a file name into a URL file name.',
argnames is ['File', 'URL'],
exceptions is [
'File is not instantiated' - instantiation_error,
@ -277,7 +288,7 @@
'URL is neither a variable nor a valid file name URL' - type_error(file_name, 'URL')]]).
:- public(file_name_part/2).
:- mode(file_name_part(+atom, ?nonvar), zero_or_more).
:- mode(file_name_part(+atom, ?compound), zero_or_more).
:- info(file_name_part/2, [
comment is 'File name parts.',
argnames is ['File', 'Part'],
@ -288,14 +299,14 @@
'Part is neither a variable nor a file name part' - type_error(file_name_part, 'Port')]]).
:- public(file_name_parts/2).
:- mode(file_name_parts(+atom, -list), one).
:- mode(file_name_parts(-atom, +list), zero_or_one).
:- mode(file_name_parts(+atom, -list(compound)), one).
:- mode(file_name_parts(-atom, +list(compound)), zero_or_one).
:- info(file_name_parts/2, [
comment is 'Converts between a file name and its constituent parts (represented as a list of compound terms).',
argnames is ['File', 'Parts'],
exceptions is [
'None of the arguments are instantiated' - instantiation_error,
'File is neither a variable nor a valid file name' - type_error(file_name, 'File'),
'Parts is neither a variable nor a list' - type_error(list, 'Parts')]]).
'Parts is neither a variable nor a list' - type_error(list(compound), 'Parts')]]).
:- end_protocol.

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.18.0
Release 2.19.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
@ -12,5 +12,5 @@ file:
| ?- logtalk_load(types_loader).
These objects implement predicates over common Prolog terms and
structures like lists, diffrence lists, binary trees, dictionaries,
and queues.
structures such as lists, difference lists, binary trees, queues,
dictionaries, and sets.

View File

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

View File

@ -34,7 +34,7 @@
<dd><dl>
<dt class="glossary"><strong>abstract class</strong><a name="abstractclass"></a></dt>
<dd>A class that can not be instantiated. Usually used to store common predicates that are inherited by other classes.</dd>
<dd>A class that cannot be instantiated. Usually used to store common predicates that are inherited by other classes.</dd>
<dt class="glossary"><strong>metaclass</strong><a name="metaclass"></a></dt>
<dd>The class of a class, when we see it as an object. Metaclass instances are themselves classes. In a reflexive system any metaclass is also an object.</dd>
@ -43,7 +43,7 @@
<dd>A class that is a specialization, direct or indirectly, of another class.</dd>
<dt class="glossary"><strong>superclass</strong><a name="superclass"></a></dt>
<dd>A class from each another class is a specialization (direct or indirectly, via another class).</dd>
<dd>A class from each another class is a specialization (directly or indirectly via another class).</dd>
</dl></dd>
@ -64,7 +64,7 @@
<dd>The hiding of an object implementation. This promotes software reuse by isolating users from implementation details.</dd>
<dt class="glossary"><strong>entity</strong><a name="entity"></a></dt>
<dd>Generic name for Logtalk compilation units: objects, categories and protocols.</dd>
<dd>Generic name for Logtalk compilation units: objects, categories, and protocols.</dd>
<dt class="glossary"><strong>event</strong><a name="event"></a></dt>
<dd>The sending of a message to an object. An event can be expressed as an ordered tuple: <code>(Event, Object, Message, Sender)</code>. Logtalk distinguish between the sending of a message - <code>before</code> event - and the return of control to the sender - <code>after</code> event.</dd>
@ -177,7 +177,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 7, 2004</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 22, 2004</span></p>
</div>
</body>
</html>

View File

@ -8,7 +8,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Logtalk 2.18.0 Documentation</title>
<title>Logtalk 2.19.0 Documentation</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
</head>
@ -18,7 +18,7 @@
&nbsp;
</div>
<h1>Logtalk 2.18.0 Documentation</h1>
<h1>Logtalk 2.19.0 Documentation</h1>
<ul>
<li><h2><a href="userman/index.html">User Manual</a></h2></li>
@ -37,7 +37,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 8, 2004</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>

View File

@ -50,7 +50,10 @@
<h4>Examples</h4>
<blockquote>
<pre>| ?- forall(member(X, [1, 2, 3]), write(X)).</pre>
<pre>| ?- forall(member(X, [1, 2, 3]), write(X)).
123
yes</pre>
</blockquote>
<div class="navbottom">
@ -62,7 +65,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 22, 2004</span></p>
</div>
</body>
</html>

View File

@ -25,12 +25,13 @@
<blockquote>
<pre>logtalk_compile(Entity)
logtalk_compile(Entities)</pre>
logtalk_compile(Entities)
logtalk_compile(Metafile)</pre>
<p>
Compiles to disk an entity or 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.
Compiles to disk an entity or 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> for entity source files and <code>.mlgt</code> for source metafiles) 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 the 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.
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 contains syntax errors.
</p>
</blockquote>
@ -74,7 +75,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>
</html>

View File

@ -25,15 +25,16 @@
<blockquote>
<pre>logtalk_compile(Entity, Options)
logtalk_compile(Entities, Options)</pre>
logtalk_compile(Entities, Options)
logtalk_compile(Metafile, Options)</pre>
<p>
Compiles to disk an 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. In other words, the files must exist in your current working directory.
Compiles to disk an entity, a list of entities (objects, protocols, or categories), or a source metafile using a list of options. The Logtalk file name extension (by default, <code>.lgt</code> for entity source files and <code>.mlgt</code> for source metafiles) should be omitted. Note that the first argument is a list of entity/file names, not file paths. In other words, the files must exist in the current working directory.
</p>
<p>
For a description of the available compiler options, please <a href="../../userman/installing.html#options">consult</a> the User Manual.
For a description of the available compiler options, please <a href="../../userman/running.html#options">consult</a> the User Manual.
</p>
<p>
Note that only the errors related to problems in the predicate arguments are listed below. Other exceptions may be thrown by the compiler if any of the compiled entities contain errors.
Note that only the errors related to problems in the predicate arguments are listed below. Other exceptions may be thrown by the compiler if any of the compiled entities contains syntax errors.
</p>
</blockquote>
@ -83,7 +84,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>
</html>

View File

@ -25,12 +25,13 @@
<blockquote>
<pre>logtalk_load(Entity)
logtalk_load(Entities)</pre>
logtalk_load(Entities)
logtalk_load(Metafile)</pre>
<p>
Compiles to disk and then loads to memory an entity or 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.
Compiles to disk and then loads to memory an entity, a list of entities (objects, protocols or categories), or a source metafile using the default compiler options specified in the Logtalk configuration file. The Logtalk file name extension (by default, <code>.lgt</code> for entity source files and <code>.mlgt</code> for source metafiles) 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 the 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 loaded entities contain errors.
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 loaded entities contains syntax errors.
</p>
</blockquote>
@ -74,7 +75,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>
</html>

View File

@ -25,15 +25,16 @@
<blockquote>
<pre>logtalk_load(Entity, Options)
logtalk_load(Entities, Options)</pre>
logtalk_load(Entities, Options)
logtalk_load(Metafile, Options)</pre>
<p>
Compiles to disk and then loads to memory an 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. In other words, the files must exist in your current working directory.
Compiles to disk and then loads to memory an entity, a list of entities (objects, protocols or categories), or a source metafile using a list of options. The Logtalk file name extension (by default, <code>.lgt</code> for entity source files and <code>.mlgt</code> for source metafiles) should be omitted. Note that the first argument is a list of entity/file names, not file paths. In other words, the files must exist in the current working directory.
</p>
<p>
For a description of the available compiler options, please <a href="../../userman/installing.html#options">consult</a> the User Manual.
For a description of the available compiler options, please <a href="../../userman/running.html#options">consult</a> the User Manual.
</p>
<p>
Note that only the errors related to problems in the predicate arguments are listed below. Other exceptions may be thrown by the compiler if any of the loaded entities contain errors.
Note that only the errors related to problems in the predicate arguments are listed below. Other exceptions may be thrown by the compiler if any of the loaded entities contains syntax errors.
</p>
</blockquote>
@ -83,7 +84,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>
</html>

View File

@ -64,7 +64,13 @@ Sends a message to an object. The message argument must match a public predicate
<h4>Examples</h4>
<blockquote>
<pre>| ?- list::member(X, [1, 2, 3]).</pre>
<pre>| ?- list::member(X, [1, 2, 3]).
X = 1 ;
X = 2 ;
X = 3
yes
</pre>
</blockquote>
<div class="navbottom">
@ -76,7 +82,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 22, 2004</span></p>
</div>
</body>
</html>

View File

@ -26,7 +26,7 @@
<blockquote>
<pre>op(Precedence, Associativity, Operator)</pre>
<p>
Declares operators.
Declares operators. Operators declared inside objects and categories have local scope.
</p>
</blockquote>
@ -55,7 +55,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: February 11, 2004</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>
</html>

View File

@ -24,9 +24,9 @@
<h4>Description</h4>
<blockquote>
<pre>private(Predicate)
private(Predicate1, Predicate2, ...)
private([Predicate1, Predicate2, ...])</pre>
<pre>private(Functor/Arity)
private(Functor1/Arity1, Functor2/Arity2, ...)
private([Functor1/Arity1, Functor2/Arity2, ...])</pre>
<p>
Declares private predicates. A private predicate can only be called from the object containing the private directive.
</p>
@ -57,7 +57,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>
</html>

View File

@ -24,9 +24,9 @@
<h4>Description</h4>
<blockquote>
<pre>protected(Predicate)
protected(Predicate1, Predicate2, ...)
protected([Predicate1, Predicate2, ...])</pre>
<pre>protected(Functor/Arity)
protected(Functor1/Arity1, Functor2/Arity2, ...)
protected([Functor1/Arity1, Functor2/Arity2, ...])</pre>
<p>
Declares protected predicates. A protected predicate can only be called from the object containing the declaration or from an object that inherits the declaration.
</p>
@ -58,7 +58,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>
</html>

View File

@ -24,9 +24,9 @@
<h4>Description</h4>
<blockquote>
<pre>public(Predicate)
public(Predicate1, Predicate2, ...)
public([Predicate1, Predicate2, ...])</pre>
<pre>public(Functor/Arity)
public(Functor1/Arity1, Functor2/Arity2, ...)
public([Functor1/Arity1, Functor2/Arity2, ...])</pre>
<p>
Declares public predicates. A public predicate can be called from any object.
</p>
@ -58,7 +58,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 23, 2004</span></p>
</div>
</body>
</html>

View File

@ -250,7 +250,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 7, 2004</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 22, 2004</span></p>
</div>
</body>
</html>

View File

@ -49,7 +49,6 @@ When defining category predicates, we need to remember that a category can be im
<pre>
:- category(attributes).
:- public(set_attribute/2).
:- mode(set_attribute(+nonvar, +nonvar), one).
@ -66,24 +65,19 @@ When defining category predicates, we need to remember that a category can be im
:- mode(attribute_(?nonvar, ?nonvar), zero_or_more).
:- dynamic(attribute_/2).
set_attribute(Attribute, Value):-
::retractall(attribute_(Attribute, _)),
::assertz(attribute_(Attribute, Value)).
get_attribute(Attribute, Value):-
::attribute_(Attribute, Value).
del_attribute(Attribute, Value):-
::retract(attribute_(Attribute, Value)).
del_attributes(Attribute, Value):-
::retractall(attribute_(Attribute, Value)).
:- end_category.
</pre>
<p>
@ -136,13 +130,13 @@ After compiling and loading this object and our category, we can now try queries
<h2>Summary<a name="summary"></a></h2>
<ul>
<li>Categories are similar to objects: we just put our predicate directives and definitions bracketed by opening and ending category directives.</li>
<li>Categories are similar to objects: we just write our predicate directives and definitions bracketed by opening and ending category directives.</li>
</ul>
<ul>
<li>An object reuses a category by importing it. The imported predicates behave as if they have been defined in the object itself.</li>
</ul>
<ul>
<li>When do we use a category instead of an object? Whenever we have a set of closely related predicates that we want to reuse in several, unrelated, objects.</li>
<li>When do we use a category instead of an object? Whenever we have a set of closely related predicates that we want to reuse in several, unrelated, objects. Categories can be interpreted as object building components.</li>
</ul>
<div class="navbottom">
@ -154,7 +148,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 22, 2004</span></p>
</div>
</body>
</html>

View File

@ -61,7 +61,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: April 25, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 22, 2004</span></p>
</div>
</body>
</html>

View File

@ -39,35 +39,26 @@ We will start by defining an object, <code>list</code>, containing predicate def
<pre>
:- object(list).
:- public(append/3).
:- public(length/2).
:- public(member/2).
append([], List, List).
append([Head| Tail], List, [Head| Tail2]) :-
append(Tail, List, Tail2).
length(List, Length) :-
length(List, 0, Length).
length([], Length, Length).
length([_| Tail], Acc, Length) :-
Acc2 is Acc + 1,
length(Tail, Acc2, Length).
member(Element, [Element| _]).
member(Element, [_| List]) :-
member(Element, List).
:- end_object.
</pre>
<p>
@ -77,7 +68,7 @@ What is different here from a regular Prolog program? The definitions of the lis
After we copy the object code to a text file and saved it under the name <code>list.lgt</code>, we need to change the Prolog working directory to the one used to save our file (consult your Prolog compiler reference manual). Then, after starting Logtalk (see the <a title="Consult user manual" href="../userman/installing.html#running">Installing and running Logtalk</a> session on the User Manual), we can compile and load the object using the <a title="Consult reference manual" href="../refman/builtins/logtalk_load1.html"><code>logtalk_load/1</code></a> Logtalk built-in predicate:
</p>
<pre>
| ?- logtalk_load([list]).
| ?- logtalk_load(list).
object list loaded
yes
@ -103,7 +94,7 @@ or:
yes
</pre>
<p>
The infix operator <a title="Consult reference manual" href="../refman/control/to_object2.html"><code>::/2</code></a> is used in Logtalk to send a message to an object. The message must match a public object predicate. If we try to call a non-public predicate like the <code>length/3</code> auxiliar predicate an exeption will be generated:
The infix operator <a title="Consult reference manual" href="../refman/control/to_object2.html"><code>::/2</code></a> is used in Logtalk to send a message to an object. The message must match a public object predicate. If we try to call a non-public predicate such as the <code>length/3</code> auxiliary predicate an exception will be generated:
</p>
<pre>
| ?- list::length([1, 2, 3], 0, L).
@ -115,23 +106,21 @@ The infix operator <a title="Consult reference manual" href="../refman/control/t
user)
</pre>
<p>
The error term describes the type of error, the message that caused the exeption, and the sender of the message (in this case, the pseudo-object <code>user</code> because we are sending the message from the top-level interpreter).
The error term describes the type of error, the message that caused the exception, and the sender of the message (in this case, the pseudo-object <code>user</code> because we are sending the message from the top-level interpreter).
</p>
<h2>Defining a list protocol<a name="protocol"></a></h2>
<p>
As we saw in the above example, a Logtalk object may contain predicate directives and predicate definitions. The set of predicate directives defines what we call the object's <em>protocol</em> or interface. An interface may have several implementations. For instance, we may want to define a new object that implements the list predicates using difference lists. However, we do not want to repeat the predicate directives in the new object. Therefore, what we need is to split the object's protocol from the object's predicate definitions by defining a new Logtalk entity called a protocol. Logtalk protocols are compilations units, at the same level as objects and categories. That said, let us define a <code>listp</code> protocol:
As we saw in the above example, a Logtalk object may contain predicate directives and predicate definitions (clauses). The set of predicate directives defines what we call the object's <em>protocol</em> or interface. An interface may have several implementations. For instance, we may want to define a new object that implements the list predicates using difference lists. However, we do not want to repeat the predicate directives in the new object. Therefore, what we need is to split the object's protocol from the object's implementation by defining a new Logtalk entity known as a protocol. Logtalk protocols are compilations units, at the same level as objects and categories. That said, let us define a <code>listp</code> protocol:
</p>
<pre>
:- protocol(listp).
:- public(append/3).
:- public(length/2).
:- public(member/2).
:- end_protocol.
</pre>
<p>
@ -140,7 +129,6 @@ Similar to what we have done for objects, we use the directives <a title="Consul
<pre>
:- protocol(listp).
:- public(append/3).
:- mode(append(?list, ?list, ?list), zero_or_more).
@ -150,25 +138,21 @@ Similar to what we have done for objects, we use the directives <a title="Consul
:- public(member/2).
:- mode(member(?term, ?list), zero_or_more).
:- end_protocol.
</pre>
<p>
Now we need to change our definition of the <code>list</code> object. We remove the predicate directives and state that the object implements the <code>listp</code> protocol:
We now need to change our definition of the <code>list</code> object by removing the predicate directives and by declaring that the object implements the <code>listp</code> protocol:
</p>
<pre>
:- object(list,
implements(listp)).
append([], List, List).
append([Head| Tail], List, [Head| Tail2]) :-
append(Tail, List, Tail2).
...
:- end_object.
</pre>
<p>
@ -178,12 +162,9 @@ The protocol declared in <code>listp</code> may now be alternatively implemented
:- object(difflist,
implements(listp).
append(L1-X, X-L2, L1-L2).
...
:- end_object.
</pre>
@ -205,7 +186,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 22, 2004</span></p>
</div>
</body>
</html>

View File

@ -80,10 +80,8 @@ Our profiler will be named <code>stop_watch</code>. It must define event handler
<pre>
:- object(stop_watch).
:- uses(time).
before(Object, Message, Sender) :-
write(Object), write(' &lt;-- '), writeq(Message),
write(' from '), write(Sender), nl, write('STARTING at '),
@ -94,7 +92,6 @@ Our profiler will be named <code>stop_watch</code>. It must define event handler
write(' from '), write(Sender), nl, write('ENDING at '),
time::cpu_time(Seconds), write(Seconds), write(' seconds'), nl.
:- end_object.
</pre>
<p>
@ -162,7 +159,7 @@ Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a
</div>
<div class="footer">
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: December 23, 2003</span></p>
<p><span class="bleft"><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span><span class="bright">Last updated on: July 22, 2004</span></p>
</div>
</body>
</html>

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