Logtalk 2.30.1 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1903 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura 2007-06-12 10:39:47 +00:00
parent 84f478c301
commit 6b4bde14e1
475 changed files with 6213 additions and 6424 deletions

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
This file contains detailed instructions for customizing your Logtalk
@ -31,14 +31,14 @@ operating-system requirements. For details, see the "libpaths/NOTES.txt" file.
Logtalk interfaces with a specific Prolog compiler via a configuration file
that can be found on the "configs" folder inside your Logtalk user folder.
These configuration files can be customized by changing the values of the
default flags that are used by Logtalk when compiling source files. For a
full description of these default flags, consult the "Running and debugging
Logtalk programs" section of the User Manual. Some of the default flags that
you may want to change include: "smart_compilation", "startup_message",
"portability", "underscore_vars", "altdirs", and the set of documentation-
related flags ("xmldocs", "xslfile", "xmlspec", and "xmlsref"). Be sure to
read the "configs/NOTES.txt" file for Prolog specific notes; some Prolog
These configuration files can be customized by changing the default values
of the flags that are used by Logtalk when compiling source files. For a
full description of these flags, consult the "Running and debugging Logtalk
programs" section of the User Manual. Some of the default flags that you may
want to change include: "smart_compilation", "startup_message", "altdirs",
"tmpdir", "portability", "underscore_vars", and the documentation-related
flags ("xmldocs", "xmldir", "xslfile", "xmlspec", and "xmlsref"). Be sure
to read the "configs/NOTES.txt" file for Prolog specific notes; some Prolog
compilers do not support the whole range of compilation flag values.

View File

@ -1,17 +1,18 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
The recommended way of installing Logtalk is to use, whenever possible, one
of the provided installers. This file contains detailed instructions for
manual installation and configuration of Logtalk. You should also consult
the "scripts/NOTES.txt" file for a description of a set of shell scripts
that might be used for Logtalk installation on some operating-systems and
for easy Logtalk integration with popular Prolog compilers.
the "scripts/NOTES.txt" and "integration/NOTES.txt" files for a description
of a set of shell scripts that might be used for Logtalk installation on
some operating-systems and for easy Logtalk integration with popular Prolog
compilers.
Note that the broad compatibility of Logtalk, both with Prolog compilers and
operating-systems, together with all the possible user scenarios, means that
@ -47,21 +48,13 @@ directory can be copied to any location that its accessible by all the users
for some reason, not feasible or desired).
The "scripts" sub-directory contains shell scripts for easy installation of
Logtalk on MacOS X, Windows, Linux, and Unix-like (POSIX) operating systems
(see the "scripts/NOTES.txt" file for details).
>> POSIX systems installation (starting from the Logtalk directory):
Logtalk on POSIX operating systems (see the "scripts/NOTES.txt" file for
details). Starting from the Logtalk directory, type:
% cd scripts
% sudo ./lgt_install.sh
% sudo ./install.sh
>> Windows installation (starting from the Logtalk directory):
C:\logtalk> cd scripts
C:\logtalk> cscript lgt_install.js
RESTART
The "scripts/lgt_install.*" installation scripts make all files read-only in
This installation script makes all files read-only for non-admin users in
order to avoid user tempering. This is a convenient setup for computer labs,
given that making directories world-writable is a security risk.
@ -69,10 +62,10 @@ given that making directories world-writable is a security risk.
2. SETTING LOGTALK ENVIRONMENT VARIABLES
You need to set two environment variables, LOGTALKHOME and LOGTALKUSER. The
environment variable LOGTALKHOME should point to the Logtalk installation
environment variable LOGTALKHOME should be set to the Logtalk installation
directory. The environment variable LOGTALKUSER should point to a directory
in your home directory where you want to store the user-specific Logtalk files
(for example, ~/logtalk). Both environment variables may be set for all users
(by default, ~/logtalk). Both environment variables may be set for all users
by a user with administration privileges. The two environment variables can
have the same value if you are the only Logtalk user on your computer and if
you have full permissions to the Logtalk installation directory. In addition,
@ -103,13 +96,13 @@ Logtalk.
>> Windows systems:
In Windows 2000/XP, environment variables are defined using the System
properties control panel. If you are a system administrator, the "scripts/
lgt_install.js" JScript install script sets the LOGTALKHOME environment
variable for all users and also sets the LOGTALKUSER environment variable
for the administrator user running the script.
properties control panel. If you are a system administrator, the Windows
GUI installer sets the LOGTALKHOME environment variable for all users and
also sets the LOGTALKUSER environment variable for the administrator user
running the installer.
3. COPYING THE LOGTALK USER-MODIFIABLE FILES TO USERS HOME DIRECTORIES
3. END-USER SETUP (COPYING LOGTALK USER-MODIFIABLE FILES TO USERS HOME DIRS)
If you installed Logtalk on your home directory, then skip this step if you
have set both Logtalk environment variables (LOGTALKHOME and LOGTALKUSER) to
@ -131,36 +124,27 @@ in the "scripts/NOTES.txt" file).
The local copies made by the "cplgtdirs" scripts have both read and write
permissions for the user running the script. When used with one of the
Prolog compilers for which an integration script is provided on the "scripts"
directory, this setup as the advantage of allowing each end-user to
independently customize default compilation options and library paths.
back-end Prolog compilers for which an integration script is provided on
the "integration" directory, this setup as the advantage of allowing each
end-user to independently customize default compilation options and library
paths.
Windows (non-admin) users may also use the Logtalk GUI installer to setup
their Logtalk user folder and the LOGTALKUSER environment variable.
4. CREATING NEW PROLOG TOP-LEVELS FOR AUTOMATIC LOADING OF LOGTALK
Most Prolog compilers allows the user to define an initialization file that
is automatically consulted at startup. This initialization file may contain
directives for loading other files, such as the Logtalk configuration file
and the Logtalk compiler. The "$LOGTALKHOME/scripts" sub-directory contains
several scripts (named "make_*lgt.*") for automating the creation of these
initialization files for some Prolog compilers. In addition, be sure to read
the "configs/NOTES.txt" file notes on the Prolog compilers that you intend to
use. There are also "makeall_lgt.*" scripts that try to run all the individual
"make_*lgt.*" scripts:
>> POSIX systems:
% cd $LOGTALKHOME/scripts
% sudo ./makeall_lgt.sh
>> Windows:
C:\> cd %LOGTALKHOME%\scripts
C:\> cscript makeall_lgt.js
This assumes that your favorite Prolog compilers are supported by the
"make_*lgt.*" scripts. If that is not the case, don't worry: just follow
the steps described in the "QUICK_START.txt" file.
Most Prolog compilers allows the user to define an initialization file
that is automatically consulted at startup. These initialization files
may contain directives for loading other files, such as the Logtalk
configuration file and the Logtalk compiler. The "$LOGTALKHOME/integration"
sub-directory contains several pre-made scripts (named "*lgt.*") for running
Logtalk with selected back-end Prolog compilers. You can use these scripts
as examples when creating initialization files for other Prolog compilers.
Be sure to read the "configs/NOTES.txt" file notes on the Prolog compilers
that you intend to use. You may also simply follow the steps described in
the "QUICK_START.txt" file.
5. CUSTOMIZING LOGTALK

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
Quick start
@ -22,6 +22,26 @@ favorite Prolog compiler. In this case, skip the instructions below
for starting up Logtalk and go straight to the instructions on running
the examples.
On POSIX operating-systems, the following shell scripts are installed
by default for running Logtalk with selected back-end Prolog compilers
(which must be properly installed for running the scripts!):
B-Prolog: bplgt (first run must use sudo)
CIAO: ciaolgt (first run must use sudo)
CxProlog: cxlgt
ECLiPSe: eclipselgt
GNU Prolog: gplgt
K-Prolog: plclgt
SICStus Prolog: sicstuslgt
SWI-Prolog: swilgt
XSB: xsblgt (first run must use sudo)
YAP: yaplgt
On Windows systems, shortcuts for running Logtalk with selected back-end
Prolog compilers are created on the "Start Menu/Programs/Logtalk" menu.
If you get an unexpected failure when using one of the Prolog integration
scripts, consult the "configs/NOTES.txt" file for compatibility notes.
2. Open the "manuals/index.html" file with a web browser.
3. Select the "Tutorial" link. This will provide you with a basic
@ -33,7 +53,8 @@ programs" links. This will provide you with a basic understanding of
how to start Logtalk as well as how to compile and load Logtalk code.
Assuming that Logtalk supports your Prolog compiler:
In case a manual installation is necessary, and assuming that Logtalk
supports your Prolog compiler, apply the following steps:
1. Read the "NOTES.txt" file in the "configs" sub-directory to check if
any patch or workaround is needed for your compiler.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
CONTENTS
@ -43,7 +43,8 @@ about Logtalk.
3. REGISTRATION
To register as a Logtalk user either use the registration form found at
the Logtalk web site or send an email message to:
the Logtalk web site, http://logtalk.org/regform.html, or send an email
message to:
registration@logtalk.org
@ -56,25 +57,7 @@ platforms (mac, pc, unix,...) (optional)
4. SUPPORT
Logtalk support is available for registered users via email to
support@logtalk.org.
At the URL http://logtalk.org/bugs.html you can find a list of known
problems and download bug fixes. The latest news about Logtalk are
available at the URL http://logtalk.org/news.html.
There is also a mailing list, "logtalk", used to announce new releases and
bug fixes and for discussion between registered Logtalk users, that you
may subscribe. For instructions on how to subscribe, please visit the web
page:
http://lserv.ci.uc.pt/mailman/listinfo/logtalk
or send an email message to:
logtalk-request@lserv.ci.uc.pt
with just the word "help" in the subject or in the message body.
For support options, please consult the page http://logtalk.org/support.html.
5. INSTALLATION

View File

@ -1,18 +1,185 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
RELEASE NOTES
=============
2.30.1 - June 12, 2007
Added a new, experimental control construct, :/1, for calling imported
category predicates without using message sending mechanisms.
Added preliminary support for static binding when calling imported
category using the new :/1 control construct for categories compiled
and loaded using the compiler option "reload(skip)".
Added a new control construct, <</2, which allows proving a goal within
the context of a specified object. Useful for debugging and for writing
object unit tests.
Improved multi-threading support in order to make the built-in predicate
threaded_exit/1 generate an exception instead of blocking indefinitely
waiting for a reply from a non-existing thread.
Updated the Logtalk compiler to generate an error when compiling from a
source file new definitions for built-in entities.
Updated the Logtalk compiler to generate simpler clauses for the book-
keeping table of local predicate definitions for parametric entities.
Updated the config files for ECLiPSe, Ciao Prolog, SICStus Prolog,
SWI-Prolog, and YAP to use the renamed hook predicates introduced in
Logtalk 2.30.0 for parsing Prolog proprietary directives.
Updated the "benchmarks" example to compare the performance of calls to
imported category predicates when using a message to "self" and a direct
call.
2.30.0 - May 28, 2007
Added preliminary support for static binding when sending messages to
objects compiled and loaded using the compiler option "reload(skip)".
Allow non-instantiated arguments at compile time for the multi-threading
built-in predicate threaded/1.
Simplified and optimized the implementation of Logtalk multi-threading
support. Use a single dispatcher thread for all objects instead of each
object running its own dispatcher in order to minimize the number of
created threads (which can be problematic on 32 bits systems). Updated
the built-in predicate threaded/1 to make it deterministic and opaque to
cuts (similar to once/1).
Updated the Logtalk built-in database methods to always interpret rules
whose body is the control construct true/0 as facts. Corrected a bug when
compiling dynamic predicates that would prevent using of the clause/2
built-in database method. Corrected a bug when using the Logtalk built-in
database method clause/2 with entities compiled in debug mode. Improved
predicate lookup caching when asserting and retracting dynamic facts.
Improved detection and reporting of entity existence errors.
Added a quit option, "q", to the Logtalk built-in debugger. Modified
the debugger behavior to automatically switch to trace mode when a spy
point is found.
Added two new compiler options, "xmldir" and "tmpdir", allowing per
project definition of directories for storing XML documenting files
and for storing intermediate compilation files (e.g. Prolog files).
Removed the config file predicate '$lgt_alt_directory'/2.
Older config files are incompatible with this new Logtalk version.
Added a shortcut to the Logtalk built-in predicate logtalk_load/1, {}/1,
to all config files (defined there in order to be easy to comment it out
in case of conflict with some Prolog native feature or lack of compliance
with the ISO Prolog standard regarding the definition of the {}/1 syntax.
Allow the compiler flag "misspelt" to be set to "error".
Updated the Logtalk compiler to not try to clean-up the dynamic predicates
of redefined entities when reloading source files. Most Prolog compilers
already behave as expected when reloading the intermediate Prolog files
generated by the Logtalk compiler. For those Prolog compilers that do not
replace old definitions for dynamic predicates with the new ones, it is
not possible for Logtalk to implement a workaround that would work
correctly in all cases. Consult the "configs/NOTES.txt" file for more
information.
Corrected a bug that prevents abolishing a dynamic entity loaded from a
source file. Thanks to Victor Noel for the bug report.
Renamed the '$lgt_copy_pl_directive'/1 and '$lgt_rewrite_pl_directive'/2
config files predicates to '$lgt_rewrite_and_copy_pl_directive'/2 and
'$lgt_rewrite_and_recompile_pl_directive'/2.
Updated the config file for B-Prolog to match (and require) the new 7.0
version; updated and simplified the corresponding integration scripts.
Updated the XSB POSIX integration script to automatically detect if we
are running the XSB stable version of the XSB CVS version.
Added basic support for tabling to the config files of B-Prolog, XSB,
and YAP. Added a simple example of using tabling directives within
objects.
Updated the SWI-Prolog and YAP config files to automatically detect if
the Prolog systems have been compiled with multi-threading support and
to set the Logtalk compiler flag "threads" accordingly.
Corrected a bug when running Logtalk with SWI-Prolog that prevented the
use of alternative compilation directories (i.e. turning on the "altdirs"
compiler flag). Corrected a bug when running Logtalk with SWI-Prolog that
can prevent make/0 from recompiling and reloading modified Logtalk source
files. Updated the SWI-Prolog integration script, "swilgt.sh", to more
reliably detect the compiler executable name.
Added a "configs/swi_set_logtalk_context.pl" file defining a useful but
fragile hack implementing a set_logtalk_context/1 built-in predicate for
switching the Logtalk top-level execution context to objects other than
the default pseudo-object "user" (you may use it as a debugging tool).
Updated the CxProlog config file to use the new built-in predicates in
version 0.95. Added a shell script, "cxlgt.sh", for easy integration of
Logtalk with CxProlog on POSIX systems (with the help of Artur Miguel
Dias, CxProlog author).
Updated the Ciao, K-Prolog, and ECLiPSe config files to set the default
value for the compiler flag "underscore_vars" to "dont_care" in order to
avoid spurious warnings with some of the provided examples.
Added a config file and integration scripts for the current XSB CVS
version (3.0.1+), which supports some features needed by Logtalk not
present in the current stable version (namely, expansion of environment
variables).
Added predicates depth/2 and variant/2 to the library object "term".
Much improved "benchmarks" example, updated to allow running tests in
three different scenarios: event support on, event support off, and
using static binding. Moreover, metacalls are no longer used to run
the benchmark goals, resulting in more meaningful and accurate results.
Removed all the "make_*lgt.*" and "makeall_lgt.*" shell scripts, replaced
by pre-made integration scripts that can be found on the new "integration"
directory. Removed the "lgt_install.js" script. Renamed the POSIX install
and uninstall scripts to, respectively, "install.sh" and "uninstall.sh".
Updated the integration, uninstall, and user-setup POSIX shell scripts
to use "$prefix/share/logtalk" as the default installation directory to
better comply with the Filesystem Hierarchy Standard 2.3 for UNIX-like
operating systems.
Updated the integration scripts to automatically call the "cplgtdirs"
script when the Logtalk user directory cannot be located.
Updated the integration, documentation, uninstall, and user-setup POSIX
shell scripts to try to locate the Logtalk installation directory and the
Logtalk user directory when the environment variables LOGTALKHOME and
LOGTALKUSER are not set.
Updated the "install.sh" POSIX shell script to better clean and sanitize
the file permissions on the installation directory.
Updated the "build_release.sh" POSIX shell script to also build a Debian
binary installer package (experimental).
The Windows GUI installer no longer spans command-line shells running
JScript scripts to build the Prolog integration shortcuts. This hopefully
solves issues with security software silently blocking and breaking the
Logtalk installation.
Added basic syntax coloring support for the GNU Nano 2.x text editor.
2.29.5 - March 28, 2007
Added a new built-in predicate, "threaded/1", for proving each goal in
Added a new built-in predicate, threaded/1, for proving each goal in
a conjunction in its own thread, simplifying common multi-threading
tasks that previously required sequences of calls to the built-in
predicates threaded_call/1 and threaded_exit/1.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
Upgrading from Logtalk 1.x
@ -158,3 +158,9 @@ Logtalk 2.29.2 removes the built-in predicate threaded_discard/1.
Logtalk 2.29.5 adds a new compiler option, "reload", whose default value is
defined in the config files. This makes previous config files incompatible
with this new Logtalk version.
Logtalk 2.30.0 adds two new compiler options, "xmldir" and "tmpdir", allowing
a per-project definition of directories for storing XML documenting files and
for storing intermediate compilation files (e.g. Prolog files). Removed from
the config files the predicate '$lgt_alt_directory'/2. Older config files are
incompatible with this new Logtalk version.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
This folder contains code contributions from Logtalk users. Here is
a short description of each included contribution:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
This folder contains a Logtalk version of John Fletcher's Prolog XML

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the necessary library support files (if not

View File

@ -1,13 +1,3 @@
:- initialization(
logtalk_load(xml)).
/*
If you intend to use the FOP XSL:FO processor for generating PDF documenting
files, comment the directive above and uncomment the directive below
:- initialization(
logtalk_load(
xml,
[xmlsref(standalone)])).
*/

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
This folder contains several examples of Logtalk programs. A brief
@ -194,6 +194,9 @@ symdiff
example of using parametric objects to implement symbolic
expression differentiation and simplification
tabling
simple example of using tabling directives within objects
threads
several simple examples of multi-threading programming
(requires Logtalk to be run with either YAP or SWI-Prolog)

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the "assignvars" category and the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.
@ -13,10 +13,20 @@ sending performance with direct predicates calls in plain Prolog.
These benchmarks may also be used for comparing Logtalk message sending
performance across Prolog compilers.
This example is made of five source files:
This example is made of four loader files and five source files:
benchmark.lgt
contains the benchmark predicates
loader_events.lgt
loads all source files with event support turned on
loader_no_events.lgt
loads all source files with event support turned off
loader_static_binding.lgt
loads all source files with event support turned off and using
static binding
loader.lgt
the same as the loader_static_binding.lgt file
benchmarks.lgt
contains the benchmark goals and testing predicates
plain.lgt
contains a definition for a list length predicate and a predicate
for testing performance of the built-in predicates assertz/1 and
@ -24,37 +34,50 @@ This example is made of five source files:
module.pl (not loaded by default; see below)
contains the same definition of a list length predicate
encapsulated in a module
object.lgt
contains the same definition of a list length predicate
encapsulated in an object
objects.lgt
contains an object encapsulating the same definition of a list
length predicate, plus two descendant objects to simulate a small
hierarchy (used for testing calls to imported category predicates)
database.lgt
contains predicates for testing the performance of the built-in
database methods assertz/1 and retract/1
category.lgt
contains a single predicate used when comparing performance of
calls to imported category predicates using direct calls and using
messages to "self"
You may have noticed above that the benchmark predicates and the predicates
for plain Prolog testing are both encapsulated in Logtalk source files. The
Logtalk compiler just copies the plain Prolog code to the generated Prolog
files. The reason for using the .lgt extension for these files is just to
make it possible to load all the example code using a single call to the
logtalk_load/1 predicate.
files. The reason for using the .lgt extension for these files is simply to
make it possible to load all the example code using calls to the predicates
logtalk_load/1-2.
By default, the benchmark tests on the SCRIPT file use a list of 30 elements
as an argument to the list length predicates. Increasing the list length
leads to decreasing performance differences between plain Prolog and Logtalk
as the list length computation time far outweighs the overhead of the message
sending mechanism. Likewise, decreasing the list length leads to increasing
performance differences between plain Prolog and Logtalk (up to the point you
will be measuring the Logtalk message sending mechanism overhead compared to
plain Prolog predicate calls). In real-life applications, only testing can
give you a balanced view on the trade-offs between plain Prolog performance
and Logtalk programming features.
By default, the benchmark tests on the SCRIPT file use a list of 20 elements
as an argument to the list length predicates. When dynamic binding is used,
increasing the list length leads to decreasing performance differences between
plain Prolog and Logtalk as the list length computation time far outweighs the
overhead of the message sending mechanism. Likewise, decreasing the list
length leads to increasing performance differences between plain Prolog and
Logtalk (up to the point you will be measuring the Logtalk message sending
mechanism overhead compared to plain Prolog predicate calls). In real-life
applications, only testing can give you a balanced view on the trade-offs
between plain Prolog performance and Logtalk programming features.
By default, the loader.lgt file used to load the example code does not load
the module.pl file. Edit this file if your Prolog compiler supports a module
By default, the loader files used to load the example code do not load the
module.pl file. Edit these files if your Prolog compiler supports a module
system and you want to run some comparative performance tests between plain
Prolog, Prolog modules, and Logtalk objects. Note that you may need to edit
the code on the module.pl file to make any necessary compatibility changes
for your Prolog compiler module system. For most Prolog module systems, the
performance of module calls is close or even identical to the performance of
plain Prolog calls, specially when using imported predicates as opposed to
using explicit module qualification.
plain Prolog calls when using imported predicates and implicit qualification.
When using explicit module qualification, performance can be significantly
worse.
When static binding is used, messages to objects are, whenever possible,
translated to direct predicate calls. Thus performance should be about the
same as in plain Prolog predicate calls. However, due to the overhead of
three extra arguments per object predicate (used for passing the execution
context), the performance of Logtalk optimized calls might be slightly
worse than the equivalent plain Prolog predicate calls.

View File

@ -1,136 +1,69 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:
% start by loading the example by choosing one of the loader files
% (you must quit and restart Logtalk for each testing scenario):
| ?- logtalk_load(benchmarks(loader)).
% run benchmarks with event support turned on:
| ?- logtalk_load(benchmarks(loader_events)).
...
% run the default set of benchmark tests:
% run benchmarks with event support turned off:
| ?- benchmarks.
| ?- logtalk_load(benchmarks(loader_no_events)).
...
% or run specific benchmark tests individually as exemplified next...
% run benchmarks with event support turned off and using static binding:
| ?- logtalk_load(benchmarks(loader_static_binding)).
...
% call the predicate my_length/0 defined in the Prolog database:
% list all the benchmark tests:
| ?- generate_list(30, List), benchmark(my_length(List, _)).
| ?- benchmarks::benchmark(Id, Goal).
Goal = my_length([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],_)
Id = s1 ? ;
Goal = object::length([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],_)
Id = s2 ? ;
Goal = create_object(xpto,[],[],[]),abolish_object(xpto)
Id = d1 ? ;
Goal = plain_dyndb
Id = d2 ? ;
Goal = database::this_dyndb
Id = d3 ? ;
Goal = database::self_dyndb
Id = d4 ? ;
Goal = database::obj_dyndb
Id = d5
Number of repetitions: 100000
Loop time: 0.03 seconds
Goal time: 0.39 seconds
Average time per call: 3.6e-06 seconds
Number of calls per second: 277777.777777778
List = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] ?
yes
% call the predicate object::length/2 from the top-level:
% run all the benchmark tests the default number of times:
| ?- generate_list(30, List), benchmark(object::length(List, _)).
Number of repetitions: 100000
Loop time: 0.04 seconds
Goal time: 0.79 seconds
Average time per call: 7.5e-06 seconds
Number of calls per second: 133333.333333333
List = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] ?
yes
| ?- benchmarks::run.
...
% compiled call of the predicate object::length/2 (simulates message sending
% from a compiled object to another object; thus with no top-level overhead):
| ?- generate_list(30, List), benchmark('$lgt_send_to_object_nv'(object, length(List, _), user)).
Number of repetitions: 100000
Loop time: 0.0299999999999998 seconds
Goal time: 0.5 seconds
Average time per call: 4.70000000000001e-06 seconds
Number of calls per second: 212765.957446808
List = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] ?
yes
% or run specific benchmark tests individually, for example:
% compiled call of the predicate object::length/2 (simulates message sending
% from a compiled object to another object with event-driven programming
% support switched off and with no top-level overhead):
| ?- generate_list(30, List), benchmark('$lgt_send_to_object_ne_nv'(object, length(List, _), user)).
Number of repetitions: 100000
Loop time: 0.0300000000000002 seconds
Goal time: 0.46 seconds
Average time per call: 4.3e-06 seconds
Number of calls per second: 232558.139534884
List = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] ?
yes
% create and abolish an elementary dynamic object:
| ?- benchmark((create_object(xpto, [], [], []), abolish_object(xpto))).
Number of repetitions: 100000
Loop time: 0.0300000000000011 seconds
Goal time: 51.59 seconds
Average time per call: 0.0005156 seconds
Number of calls per second: 1939.48797517455
yes
% test assertz/1 and retract/1 performance in plain Prolog:
| ?- benchmark(db_test_plain).
Number of repetitions: 100000
Loop time: 0.0299999999999727 seconds
Goal time: 51.07 seconds
Average time per call: 0.0005104 seconds
Number of calls per second: 1959.24764890282
yes
% test assertz/1 and retract/1 performance on "this" database:
| ?- benchmark('$lgt_send_to_object_ne_nv'(database, db_test_this, user)).
Number of repetitions: 100000
Loop time: 0.0299999999999727 seconds
Goal time: 63.37 seconds
Average time per call: 0.0006334 seconds
Number of calls per second: 1578.78118092832
yes
% test assertz/1 and retract/1 performance on "self" database:
| ?- benchmark('$lgt_send_to_object_ne_nv'(database, db_test_self, user)).
Number of repetitions: 100000
Loop time: 0.0299999999999727 seconds
Goal time: 71.3499999999999 seconds
Average time per call: 0.000713199999999999 seconds
Number of calls per second: 1402.13123948402
yes
% test assertz/1 and retract/1 performance on another object database (using ::/2):
| ?- benchmark('$lgt_send_to_object_ne_nv'(database, db_test_obj, user)).
Number of repetitions: 100000
Loop time: 0.0299999999999727 seconds
Goal time: 68.97 seconds
Average time per call: 0.0006894 seconds
Number of calls per second: 1450.53669857847
yes
| ?- benchmarks::run(s1, 1000000).
...

View File

@ -0,0 +1,155 @@
:- object(benchmarks).
:- info([
version is 3.0,
author is 'Paulo Moura',
date is 2007/06/11,
comment is 'Benchmark utility predicates and standard set of benchmarks.']).
:- public(run/0).
:- mode(run, one).
:- info(run/0, [
comment is 'Runs all benchmarks the default number of times.']).
:- public(run/1).
:- mode(run(+integer), one).
:- info(run/1, [
comment is 'Runs all benchmarks the specified number of times.',
argnames is ['N']]).
:- public(run/2).
:- mode(run(+atom, +integer), one).
:- info(run/2, [
comment is 'Runs a specific benchmark the specified number of times.',
argnames is ['Id', 'N']]).
:- public(benchmark/2).
:- mode(move(?atom, -callable), zero_or_more).
:- info(move/2, [
comment is 'Table of benchmark identifiers and benchmark goals.',
argnames is ['Id', 'Goal']]).
% run all benchmarks the default number of times:
run :-
run(1000000).
% run all benchmark tests N times:
run(N) :-
benchmark(Id, Goal),
run(Id, N, Looptime, Goaltime, Average, Speed),
report(Id, Goal, N, Looptime, Goaltime, Average, Speed),
fail.
run(_).
% run a specific benchmark test:
run(Id, N) :-
benchmark(Id, Goal),
run(Id, N, Looptime, Goaltime, Average, Speed),
report(Id, Goal, N, Looptime, Goaltime, Average, Speed).
run(Id, N, Looptime, Goaltime, Average, Speed) :-
{'$lgt_cpu_time'(Seconds1)}, % defined in the config files
do_benchmark(empty_loop, N),
{'$lgt_cpu_time'(Seconds2)},
Looptime is Seconds2 - Seconds1,
{'$lgt_cpu_time'(Seconds3)},
do_benchmark(Id, N),
{'$lgt_cpu_time'(Seconds4)},
Goaltime is Seconds4 - Seconds3,
Average is (Goaltime - Looptime)/N,
Speed is 1.0/Average.
report(Id, Goal, N, Looptime, Goaltime, Average, Speed) :-
write(Id), write(': '),
writeq(Goal), nl,
write('Number of repetitions: '), write(N), nl,
write('Loop time: '), write(Looptime), nl,
write('Goal time: '), write(Goaltime), nl,
write('Average time per call: '), write(Average), nl,
write('Number of calls per second: '), write(Speed), nl,
nl.
% some benchmark tests for static code:
benchmark(s1, my_length(List, _)) :-
{generate_list(20, List)}.
benchmark(s2, object::length(List, _)) :-
{generate_list(20, List)}.
% some benchmark tests for category predicate calls:
benchmark(c1, leaf::ctg_direct).
benchmark(c2, leaf::ctg_self).
% some benchmark tests for dynamic code:
benchmark(d1, (create_object(xpto, [], [], []), abolish_object(xpto))).
benchmark(d2, plain_dyndb(_)).
benchmark(d3, database::this_dyndb(_)).
benchmark(d4, database::self_dyndb(_)).
benchmark(d5, database::obj_dyndb(_)).
% repeat a goal N times without using call/1 and using a failure-driven loop to
% avoid the interference of Prolog compiler memory management mechanism (such as
% garbage collection) on the results
do_benchmark(empty_loop, N) :-
{my_repeat(N)},
fail.
do_benchmark(empty_loop, _).
do_benchmark(s1, N) :-
{generate_list(20, List)},
{my_repeat(N)},
{my_length(List, _)},
fail.
do_benchmark(s1, _).
do_benchmark(s2, N) :-
{generate_list(20, List)},
{my_repeat(N)},
object::length(List, _),
fail.
do_benchmark(s2, _).
do_benchmark(c1, N) :-
{my_repeat(N)},
leaf::ctg_direct,
fail.
do_benchmark(c1, _).
do_benchmark(c2, N) :-
{my_repeat(N)},
leaf::ctg_self,
fail.
do_benchmark(c2, _).
do_benchmark(d1, N) :-
{my_repeat(N)},
create_object(xpto, [], [], []),
abolish_object(xpto),
fail.
do_benchmark(d1, _).
do_benchmark(d2, N) :-
{my_repeat(N)},
{plain_dyndb(N)},
fail.
do_benchmark(d2, _).
do_benchmark(d3, N) :-
{my_repeat(N)},
database::this_dyndb(N),
fail.
do_benchmark(d3, _).
do_benchmark(d4, N) :-
{my_repeat(N)},
database::self_dyndb(N),
fail.
do_benchmark(d4, _).
do_benchmark(d5, N) :-
{my_repeat(N)},
database::obj_dyndb(N),
fail.
do_benchmark(d5, _).
:- end_object.

View File

@ -0,0 +1,14 @@
:- category(category).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2007/06/10,
comment is 'Defines a simple predicate for comparing performance of calls from within an object to imported category predicates.']).
:- public(ctg_pred/0).
ctg_pred.
:- end_category.

View File

@ -1,38 +1,47 @@
:- object(database).
:- public(db_test_this/0, db_test_self/0, db_test_obj/0).
:- info([
version is 2.0,
author is 'Paulo Moura',
date is 2007/04/17,
comment is 'Dynamic database benchmark utility predicates.']).
:- private(pred_this/0, pred_self/0, pred_obj/0).
:- dynamic(pred_this/0, pred_self/0, pred_obj/0).
:- public(this_dyndb/1).
:- mode(this_dyndb(+nonvar), one).
:- info(this_dyndb/1, [
comment is 'Asserts and retracts a predicate in "this".',
argnames is ['Term']]).
db_test_this :-
{repeat(100)},
assertz(pred_this),
fail.
db_test_this :-
retract(pred_this),
fail.
db_test_this.
:- public(self_dyndb/1).
:- mode(self_dyndb(+nonvar), one).
:- info(self_dyndb/1, [
comment is 'Asserts and retracts a predicate using ::/1.',
argnames is ['Term']]).
db_test_self :-
{repeat(100)},
::assertz(pred_self),
fail.
db_test_self :-
::retract(pred_self),
fail.
db_test_self.
:- public(obj_dyndb/1).
:- mode(obj_dyndb(+nonvar), one).
:- info(obj_dyndb/1, [
comment is 'Asserts and retracts a predicate using ::/2.',
argnames is ['Term']]).
:- private([pred_this/1, pred_self/1, pred_obj/1]).
:- dynamic([pred_this/1, pred_self/1, pred_obj/1]).
db_test_obj :-
% direct calls to assertz/1 and retract/1:
this_dyndb(N) :-
assertz(pred_this(N)),
retract(pred_this(N)).
% calls to assertz/1 and retract/1 using ::/1:
self_dyndb(N) :-
::assertz(pred_self(N)),
::retract(pred_self(N)).
% calls to assertz/1 and retract/1 using ::/2:
obj_dyndb(N) :-
this(This),
{repeat(100)},
This::assertz(pred_obj),
fail.
db_test_obj :-
this(This),
This::retract(pred_obj),
fail.
db_test_obj.
This::assertz(pred_obj(N)),
This::retract(pred_obj(N)).
:- end_object.

View File

@ -2,5 +2,7 @@
% uncomment the next line if your Prolog compiler supports modules
%:- ensure_loaded(module).
:- initialization(
logtalk_load([benchmark, plain, object, database])).
:- initialization((
logtalk_load([category], [events(off), reload(skip)]),
logtalk_load([objects, database], [events(off), reload(skip)]),
logtalk_load([plain, benchmarks], [events(off)]))).

View File

@ -0,0 +1,6 @@
% uncomment the next line if your Prolog compiler supports modules
%:- ensure_loaded(module).
:- initialization(
logtalk_load([category, objects, database, plain, benchmarks], [events(on)])).

View File

@ -0,0 +1,6 @@
% uncomment the next line if your Prolog compiler supports modules
%:- ensure_loaded(module).
:- initialization(
logtalk_load([category, objects, database, plain, benchmarks], [events(off)])).

View File

@ -0,0 +1,8 @@
% uncomment the next line if your Prolog compiler supports modules
%:- ensure_loaded(module).
:- initialization((
logtalk_load([category], [events(off), reload(skip)]),
logtalk_load([objects, database], [events(off), reload(skip)]),
logtalk_load([plain, benchmarks], [events(off)]))).

View File

@ -6,11 +6,11 @@
mod_length(List, Length) :-
integer(Length) ->
( integer(Length) ->
Length >= 0,
mod_make_list(Length, List)
;
mod_length(List, 0, Length).
; mod_length(List, 0, Length)
).
mod_make_list(0, []):-

View File

@ -0,0 +1,60 @@
:- object(object,
imports(category)).
:- info([
version is 3.0,
author is 'Paulo Moura',
date is 2007/06/11,
comment is 'Example object for benchmarking library predicate calls and imported category predicate calls.']).
:- public(length/2).
length(List, Length) :-
length(List, 0, Length).
length([], Length, Length).
length([_| Tail], Acc, Length) :-
Acc2 is Acc + 1,
length(Tail, Acc2, Length).
:- public(ctg_self/0).
% call an imported category predicate by sending a message to self;
% performance will depend on the distance between "self" and "this"
% (always uses dynamic binding)
ctg_self :-
::ctg_pred.
:- public(ctg_direct/0).
% call an imported category predicate directly by using the :/1 control construct;
% (static binding may be used, depending on how the category is compiled)
ctg_direct :-
:ctg_pred.
:- end_object.
:- object(descendant,
extends(object)).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2007/04/17,
comment is 'Example object used for simulating a small hierarchy.']).
:- end_object.
:- object(leaf,
extends(descendant)).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2007/04/17,
comment is 'Example object used for simulating a small hierarchy.']).
:- end_object.

View File

@ -1,36 +1,42 @@
my_length(List, Length) :-
integer(Length) ->
Length >= 0,
my_make_list(Length, List)
;
my_length(List, 0, Length).
my_make_list(0, []):-
!.
my_make_list(N, [_| Tail]):-
M is N-1,
my_make_list(M, Tail).
my_length(List, 0, Length).
my_length([], Length, Length).
my_length([_| Tail], Acc, Length) :-
Acc2 is Acc + 1,
my_length(Tail, Acc2, Length).
:- dynamic(pred_plain/0).
:- dynamic(pred_plain/1).
db_test_plain :-
repeat(100),
assertz(pred_plain),
fail.
plain_dyndb(N) :-
assertz(pred_plain(N)),
retract(pred_plain(N)).
db_test_plain :-
retract(pred_plain),
fail.
db_test_plain.
my_between(Lower, _, Lower).
my_between(Lower, Upper, Integer) :-
Lower < Upper,
Next is Lower + 1,
my_between(Next, Upper, Integer).
my_repeat(_).
my_repeat(N) :-
N > 1,
N2 is N - 1,
my_repeat(N2).
% generate a list containing the first N non-negative integers
generate_list(N, List) :-
generate_list(0, N, List).
generate_list(N, N, []) :-
!.
generate_list(M, N, [M| Ms]) :-
M < N,
M2 is M + 1,
generate_list(M2, N, Ms).

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% just load the example, which contains an initialization/1 directive

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
The entities on this example are divided in two sets. The first set

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
No self-respected programming language could do without a "Hello

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% just load the example and check the output message:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
The examples in this folder are adopted from the Logic&Objects system

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
This directory contains examples adapted from the LPA Prolog++
Reference Manual. This manual can be downloaded from the LPA web

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
This example is an adaptation of the LPA Prolog++ faults example.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
This example is an adaptation of the LPA Prolog++ timetables example.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by compiling and loading the Prolog module files as objects:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
Run this example with no other examples loaded at the same time.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
% start by loading the example and the required library files:

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.29.5
================================================================
Logtalk - Open source object-oriented logic programming language
Release 2.30.1
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
=================================================================
================================================================
To load this example and for sample queries, please see the SCRIPT file.

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