Logtalk 2.22.0 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1191 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
2feba3d528
commit
d6bbeaa734
108
Logtalk/INSTALL
108
Logtalk/INSTALL
@ -1,65 +1,90 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
This file contains detailed instruction for installing and configuring
|
||||
Logtalk.
|
||||
|
||||
|
||||
1. LOGTALK INSTALLATION
|
||||
|
||||
Installing Logtalk is just a matter of decompressing the downloaded archive
|
||||
and copying the resulting directory to a suitable location.
|
||||
|
||||
The Logtalk directory can reside in any user accessible location.
|
||||
This location depends on the working environment and on the number of users.
|
||||
The "misc" sub-directory contains some shell scripts for easy installation
|
||||
of Logtalk on Windows, Unix, and Unix-like operating systems (for details,
|
||||
see the misc/NOTES file).
|
||||
The Logtalk directory can reside in any user accessible location. This
|
||||
location depends on the working environment and on the number of users.
|
||||
|
||||
|
||||
INSTALLING FOR A SINGLE USER
|
||||
* Installing for a single user:
|
||||
|
||||
In the case of a single user, the Logtalk directory may simply be copied to
|
||||
the user home directory.
|
||||
the user home directory. In alternative, assuming a user with administrative
|
||||
rights, the same setup described below for multiple users may be applied.
|
||||
This has the advantage of allowing the user to freely try and modify the
|
||||
provided examples, library, and configuration files with the option of, at
|
||||
any time, restoring the files to its original state by simply running one of
|
||||
the provided scripts.
|
||||
|
||||
|
||||
INSTALLING FOR MULTIPLE USERS
|
||||
* 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 (assuming that copying the
|
||||
Logtalk directory to each user home directory is not feasible or desired).
|
||||
Logtalk directory to each user home directory is, for some reason, not
|
||||
feasible or desired).
|
||||
|
||||
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
|
||||
sub-directories (and possibly the compiler sub-directory, depending on the
|
||||
chosen Prolog compiler) must be user writable as compiling Logtalk source
|
||||
files generates intermediate Prolog files, which are written to the same
|
||||
location as the source files. However, making directories world-writable is a
|
||||
security risk. One solution is to copy the Logtalk xml, examples, and library
|
||||
directories to each user home directory (the "misc" sub-directory contains
|
||||
some scripts which may be called by the end-users for making these copies).
|
||||
The "misc" sub-directory contains shell scripts for easy installation of
|
||||
Logtalk on Windows, Unix, and Unix-like operating systems (for details,
|
||||
see the misc/NOTES file). These scripts make all files read-only in order
|
||||
to avoid user tempering. However, Logtalk directories such as "library"
|
||||
or "examples" must be user-writable as compiling Logtalk source files
|
||||
generates intermediate Prolog files, which are written to the same location
|
||||
as the source files. In addition, it is convenient that directories such as
|
||||
"configs", "libpaths", and "xml" be user-writable in order to allow each
|
||||
user to customize Logtalk to its needs. Given that making directories
|
||||
world-writable is a security risk, one solution is to copy the directories
|
||||
that need to be user-writable to each user home directory. The "misc" sub-
|
||||
directory contains shell scripts (named "cplgtdirs.*") which may be called
|
||||
by the end-users for making such copies. This is the preferred setup for a
|
||||
computer lab. When used with one of the Prolog compilers for which an
|
||||
integration script is provided on the "misc" directory, this setup allows
|
||||
end-users to independently customize default compilation options and
|
||||
library paths.
|
||||
|
||||
|
||||
ENVIRONMENT VARIABLES
|
||||
2. LOGTALK CONFIGURATION
|
||||
|
||||
It is recommended that you define an environment variable named LOGTALKHOME
|
||||
pointing to the Logtalk installation directory for use with your Prolog
|
||||
compilers. In addition, you may want to add the Logtalk sub-directory "xml",
|
||||
which contains useful scripts for processing XML documenting files, to your
|
||||
execution path.
|
||||
2.1 Setting environment variables
|
||||
|
||||
You need to set two environment variables, LOGTALKHOME and LOGTALKUSER. The
|
||||
environment variable LOGTALKHOME should point 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 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,
|
||||
you may want to add the Logtalk sub-directory "xml", which contains useful
|
||||
scripts for processing XML documenting files, to your execution path.
|
||||
|
||||
* Unix and Unix-like systems:
|
||||
|
||||
If you use a csh shell, add the following line to your ~/.cshrc file:
|
||||
|
||||
setenv LOGTALKHOME /your/installation/directory/lgt2216
|
||||
setenv LOGTALKHOME /your/logtalk/installation/directory
|
||||
setenv LOGTALKUSER $HOME/logtalk
|
||||
setenv PATH $PATH:$LOGTALKHOME/xml:$LOGTALKHOME/misc
|
||||
|
||||
If you use a bash shell, add the following lines to your ~/.profile file:
|
||||
|
||||
LOGTALKHOME=/your/installation/directory/lgt2216
|
||||
export LOGTALKHOME
|
||||
LOGTALKHOME=/your/logtalk/installation/directory
|
||||
LOGTALKUSER=$HOME/logtalk
|
||||
PATH=$PATH:$LOGTALKHOME/xml:$LOGTALKHOME/misc
|
||||
export PATH
|
||||
export PATH LOGTALKHOME LOGTALKUSER
|
||||
|
||||
When using the provided shell script for installing Logtalk, a symbolic link
|
||||
to the Logtalk installation directory is automatically created. The link is
|
||||
@ -68,20 +93,33 @@ environment variable in order to avoid breaking it when upgrading Logtalk.
|
||||
|
||||
* Windows systems:
|
||||
|
||||
In Windows 95/98/ME, environment variables are defined in the autoexec.bat
|
||||
In Windows 95/98/ME, environment variables are defined in the "autoexec.bat"
|
||||
file (you will need to reboot after editing the file):
|
||||
|
||||
SET LOGTALKHOME=C:\your\installation\folder\
|
||||
SET LOGTALKUSER=%HOMEPATH%\logtalk
|
||||
|
||||
In Windows NT/2000/XP, environment variables are defined using the System
|
||||
properties control panel (if you are a system administrator, you should use
|
||||
the JScript install script provided in the "misc" sub-directory).
|
||||
the JScript install script provided in the "misc" sub-directory; this script
|
||||
sets both the LOGTALKHOME and the LOGTALKUSER environment variables).
|
||||
|
||||
|
||||
CUSTOMIZING PROLOG CONFIGURATION FILES
|
||||
2.2 Setting library paths
|
||||
|
||||
In Logtalk, a library is simply a directory containing source files. Library
|
||||
paths can be declared using a dynamic predicate. This allows compiling and
|
||||
loading of libraries and library files to be performed without worries about
|
||||
library paths. In the "libpaths" directory you will find a sample file which
|
||||
you can copy and edit to match your Logtalk installation and your Prolog
|
||||
compiler and operating-system requirements. See the "libpaths/NOTES" file for
|
||||
more details.
|
||||
|
||||
|
||||
2.3 Customizing prolog configuration files
|
||||
|
||||
Logtalk interfaces with a specific Prolog compiler via a configuration file
|
||||
that can be found on the $LOGTALKHOME/configs directory. These configuration
|
||||
that can be found on the "$LOGTALKUSER/configs" directory. These configuration
|
||||
files can be customized by changing the values of the default flags and
|
||||
compiler options which are used by Logtalk when compiling source files. For
|
||||
a full description of these default flags and compiler options, consult the
|
||||
@ -89,7 +127,7 @@ a full description of these default flags and compiler options, consult the
|
||||
the default flags that you may want to change are: "portability", "altdirs",
|
||||
"underscore_vars", "startup_message", "smart_compilation", and the set of
|
||||
documentation-related flags ("xml", "xsl", "xmlspec", and "doctype"). Be sure
|
||||
to read the $LOGTALKHOME/configs/NOTES file for Prolog specific notes; some
|
||||
to read the "$LOGTALKUSER/configs/NOTES" file for Prolog specific notes; some
|
||||
Prolog compilers do not support the whole range of compilation flags.
|
||||
|
||||
|
||||
@ -100,5 +138,5 @@ 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 "misc" sub-directory contains several scripts
|
||||
for automating the creation of these initialization files for some Prolog
|
||||
compilers. In addition, be sure to read the configs/NOTES file notes on the
|
||||
compilers. In addition, be sure to read the "configs/NOTES" file notes on the
|
||||
Prolog compilers that you intend to use.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -10,40 +10,46 @@ Quick start
|
||||
===========
|
||||
|
||||
|
||||
1. Open the manuals/index.html file with a web browser.
|
||||
1. Install Logtalk by following the instructions on the "INSTALL" file.
|
||||
|
||||
2. Select the Tutorial link. This will provide you with a basic understanding
|
||||
2. Open the "manuals/index.html" file with a web browser.
|
||||
|
||||
3. Select the "Tutorial" link. This will provide you with a basic understanding
|
||||
of the main Logtalk concepts.
|
||||
|
||||
3. Go back to the index.html file and select the User Manual link and then
|
||||
4. Go back to the "index.html" file and select the "User Manual" link and then
|
||||
the Installing and running Logtalk links. This will provide you with a basic
|
||||
understanding of how to start Logtalk and compile and load Logtalk code.
|
||||
|
||||
|
||||
Assuming that Logtalk supports your Prolog compiler:
|
||||
|
||||
1. Read the NOTES file in the configs sub-directory to check if any patch
|
||||
1. Read the "NOTES" file in the "configs" sub-directory to check if any patch
|
||||
or workaround is needed for your compiler.
|
||||
|
||||
2. Start your Prolog compiler.
|
||||
|
||||
3. Change the current working directory of your Prolog session to the Logtalk
|
||||
installation directory. If you don't know which predicate to use, check the
|
||||
configs/NOTES file or your Prolog reference manual.
|
||||
"configs/NOTES" file or your Prolog compiler reference manual.
|
||||
|
||||
4. Compile and load the config file for your Prolog compiler.
|
||||
|
||||
5. Compile and load the Logtalk pre-processor/runtime found in the compiler
|
||||
5. Compile and load the Logtalk compiler/runtime found on the "compiler"
|
||||
sub-directory.
|
||||
|
||||
Note that both the configuration files and the compiler/preprocessor files
|
||||
are Prolog files. The predicate called to load these files depends on your
|
||||
Prolog compiler (consult your Prolog compiler documentation or take a look
|
||||
at the definition of the predicate '$lgt_load_prolog_code'/1 in the config
|
||||
file. For most command-line compilers, you could type at the Prolog prompt
|
||||
something like:
|
||||
6. Adapt, if needed, the file "libpaths/libpaths.pl" to match your Logtalk
|
||||
installation, Prolog compiler, and operating-system, and then compile and
|
||||
load it.
|
||||
|
||||
| ?- ['configs/foo.config', 'compiler/logtalk.pl'].
|
||||
Note that both the configuration files, the compiler/runtime files, and the
|
||||
library paths file are Prolog files. The predicate used to load these files
|
||||
depends on your Prolog compiler (consult your Prolog compiler documentation
|
||||
or take a look at the definition of the predicate '$lgt_load_prolog_code'/1
|
||||
in the config file. For most command-line compilers, you could type at the
|
||||
Prolog prompt something like:
|
||||
|
||||
| ?- ['configs/foo.config', 'compiler/logtalk.pl', 'libpaths/libpaths.pl'].
|
||||
|
||||
Replace the file name foo.config with the appropriated config file name for
|
||||
your compiler.
|
||||
@ -51,45 +57,24 @@ your compiler.
|
||||
|
||||
Now you may try some of the included examples:
|
||||
|
||||
1. Change the working directory of your Prolog compiler to the library
|
||||
directory and then type at the Prolog prompt the following query:
|
||||
|
||||
| ?- logtalk_load(all_loader).
|
||||
|
||||
This will load all the library entities that you will need in order to run
|
||||
the Logtalk examples.
|
||||
|
||||
2. Open the examples sub-directory. There you find several sub-directories
|
||||
1. Open the examples sub-directory. There you find several sub-directories
|
||||
with ready to run examples and a NOTES file containing general instructions
|
||||
and a brief description of each example. Select and open one of the examples
|
||||
sub-directory.
|
||||
|
||||
3. Read the example NOTES file. Some examples are dependent on other examples
|
||||
or on library objects (already loaded on step one). You may need to load
|
||||
additional files before running the chosen example.
|
||||
2. Read the example NOTES file for a description of the example.
|
||||
|
||||
4. Change the working directory of your Prolog compiler to the example
|
||||
directory.
|
||||
|
||||
5. Compile and load the loader file for the example as described in the NOTES
|
||||
and SCRIPT files. For most examples, the loader file is named loader.lgt.
|
||||
Therefore, you will need to type the query:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
This will compile and load all the example files.
|
||||
|
||||
6. Open the example SCRIPT file, which contains sample queries that you
|
||||
may try by copying-and-pasting or dragging-and-droping them on your Prolog
|
||||
interpreter top-level.
|
||||
3. Open SCRIPT file for instructions on how to load the example and for sample
|
||||
queries that you may try by copying-and-pasting or dragging-and-droping them
|
||||
on your Prolog interpreter top-level.
|
||||
|
||||
|
||||
Ready to start writing your own programs?
|
||||
|
||||
1. Read the User Manual sections on Programming in Logtalk and Running and
|
||||
debugging Logtalk programs.
|
||||
1. Read the User Manual sections on "Programming in Logtalk" and "Running and
|
||||
debugging Logtalk programs".
|
||||
|
||||
2. Take a look at the wenv sub-directory. There you will find syntax
|
||||
2. Take a look at the "wenv" sub-directory. There you will find syntax
|
||||
configuration files for popular text editors that enable syntax coloring
|
||||
when editing Logtalk source files.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -84,7 +84,7 @@ for further instructions.
|
||||
|
||||
See the user manual for a description of the source files organization
|
||||
and for using instructions (to read the user manual open the file
|
||||
manuals/index.html with a web browser). Most files are formatted using
|
||||
"manuals/index.html" with a web browser). Most files are formatted using
|
||||
four-space tabs.
|
||||
|
||||
|
||||
@ -104,9 +104,9 @@ from the Logtalk web site. The PDF files include page numbers, index and a
|
||||
table of contents and are available for printing in both A4 and US Letter
|
||||
paper formats.
|
||||
|
||||
The file RELEASE_NOTES contains descriptions of the changes made in
|
||||
Logtalk since the first public version. Read it carefully if you have
|
||||
been using a previous Logtalk version.
|
||||
The file RELEASE_NOTES contains descriptions of the changes made in Logtalk
|
||||
since the first public version. Read it carefully if you have been using a
|
||||
previous Logtalk version.
|
||||
|
||||
|
||||
8. UPGRADING
|
||||
@ -118,7 +118,7 @@ instructions on how to upgrade your programs to run under this new version.
|
||||
9. CITATIONS
|
||||
|
||||
If you want to cite Logtalk in your publications, please consult the file
|
||||
BIBLIOGRAPHY for BibTeX bibliographic references.
|
||||
BIBLIOGRAPHY for bibliographic references in BibTeX format.
|
||||
|
||||
|
||||
10. CONTRIBUTIONS
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -10,6 +10,34 @@ RELEASE NOTES
|
||||
=============
|
||||
|
||||
|
||||
2.22.0 - November 29, 2004
|
||||
|
||||
Implemented a notion of library as simply a directory containing source
|
||||
files. Added a new dynamic predicate, logtalk_library_path/2, for
|
||||
specifying library paths. Added a sample file (libpaths/libpaths.pl) for
|
||||
setting library paths for the Logtalk standard library and for all the
|
||||
supplied examples.
|
||||
|
||||
Added support for using the notation <library>(<entity>) with the built-in
|
||||
predicates logtalk_compile/1-2 and logtalk_load/1-2 for compiling and
|
||||
loading source files contained on a library, without the need to first
|
||||
change the current working directory.
|
||||
|
||||
Changed the library and the examples loading instructions to use the new
|
||||
notation <library>(<entity>).
|
||||
|
||||
Improved installation instructions and installation scripts. Added a new
|
||||
environment variable, LOGTALKUSER, for defining the location of the copies
|
||||
of the user-modifiable Logtalk files in a multiple users setup environment.
|
||||
|
||||
Added utility predicates to most configuration files for querying and
|
||||
changing the current working directory (needed for the <library>(<entity>)
|
||||
notation to work).
|
||||
|
||||
Corrected a bug in the code that checks for file existence when compiling
|
||||
or loading source files and source metafiles.
|
||||
|
||||
|
||||
2.21.6 - November 15, 2004
|
||||
|
||||
Added support for using alternative directories for storing the Prolog files
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -89,3 +89,9 @@ order to ensure compatibility with the new uses/2 predicate directive).
|
||||
Logtalk version 2.21.2 adds a new clause to the code generated when compiling
|
||||
entity in order to support the new alias/1 predicate property, implying
|
||||
recompilation of all objects, protocols, and categories.
|
||||
|
||||
Logtalk version 2.22.0 adds support for using the notation <library>(<file>)
|
||||
when compiling and loading source files. Logtalk applications using this new
|
||||
notation will need to be modified in order to run in previous Logtalk versions.
|
||||
In addition, the exceptions generated by the predicates logtalk_compile/1-2
|
||||
and logtalk_load/1-2 have been updated to take into account this new feature.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -11,12 +11,13 @@ description of each example is included below.
|
||||
|
||||
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.
|
||||
contain a SCRIPT file with instructions on how to load the example and
|
||||
sample queries for your to try.
|
||||
|
||||
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).
|
||||
defined in the Logtalk standard library or in other examples. See the NOTES
|
||||
files inside the library folder and the NOTES and SCRIPT files inside each
|
||||
example folder).
|
||||
|
||||
Some examples may redefine objects already loaded from other examples.
|
||||
You may want to restart Logtalk after trying each example.
|
||||
|
@ -1,18 +1,13 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
or, in alternative, compile and load the example metafile:
|
||||
|
||||
| ?- logtalk_load(aliases).
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
||||
For a description of this example, please see the comments in the
|
||||
aliases.mlgt metafile.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(aliases(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
If your Prolog compiler does not support a module system, then edit the
|
||||
loader.lgt file and comment out the directive that loads the module code.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(benchmarks(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,19 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will also need to also load the library/hierarchies_loader file.
|
||||
Alternatively, you may load the library loader file to load all
|
||||
library entities.
|
||||
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains an example of a bird identification expert system
|
||||
adopted with permission from the book "Adventure in Prolog" by Amzi! inc.
|
||||
@ -63,5 +56,3 @@ order
|
||||
swan
|
||||
trumpeter_swan
|
||||
whistling_swan
|
||||
|
||||
|
||||
|
@ -1,14 +1,21 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library support files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(library(hierarchies_loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(birds(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,16 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will need to load the objects in the roots and relations examples.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
You will also need to load the following files in the library directory:
|
||||
events_loader, types_loader, metapredicates_loader, and hierarchies_loader.
|
||||
|
@ -1,14 +1,27 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library and support example files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(library(all_loader)).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(roots(loader)).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(relations(loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(bricks(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains an example that shows how to implement class variables
|
||||
as defined in Smalltalk. The name shared instance variables is however much
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(classvars(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains the following examples of using DCGs inside
|
||||
objects and categories:
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(dcgs(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
||||
This example illustrates some variants of the "diamond problem"
|
||||
(multi-inheritance conflicts and ambiguities) and its respective
|
||||
solutions on Logtalk.
|
||||
@ -45,12 +48,3 @@ using prototype hierarchies:
|
||||
diamond3
|
||||
presents a solution which allows both inherited definitions to be
|
||||
used in D
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
To load only a specific variant, compile and load the respective metafile.
|
||||
For example:
|
||||
|
||||
| ?- logtalk_load(diamond2).
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(diamonds(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains examples of using some of the built-in database
|
||||
handling methods. Two hierarchies are provided, one prototype-based,
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(dynpred(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,18 +1,13 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
or, in alternative, compile and load the example metafile:
|
||||
|
||||
| ?- logtalk_load(engines).
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
||||
For a description of this example, please see the comments in the
|
||||
engines.mlgt metafile.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(engines(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,17 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
The entities on this example are divided in two sets. To load the two
|
||||
sets of entities, compile and load the corresponding loader files:
|
||||
|
||||
| ?- logtalk_load(warnings_loader).
|
||||
|
||||
| ?- logtalk_load(errors_loader).
|
||||
To load this example, please see the SCRIPT file.
|
||||
|
||||
This folder contains examples of objects, categories, and protocols
|
||||
containing errors that will trigger Logtalk compiler warnings and
|
||||
|
@ -1,10 +1,13 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
||||
No self-respected programming language could do without a "Hello
|
||||
World" example!
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,5 +8,5 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% just load the example and check the output message:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(hello_world(loader)).
|
||||
...
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains examples of public, protected, and private inheritance,
|
||||
for both prototype-based and class-based hierarchies.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(inheritance(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains an example of instance defined methods. When using
|
||||
classes and instances, methods must be declared in a class but the method
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(instmethods(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
The examples in this folder are adopted from the Logic&Objects system
|
||||
by Francis G. McCabe. Detailed descriptions and the original source code
|
||||
can be found on the book "Logic and Objects" by the author published by
|
||||
|
@ -1,12 +1,10 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(lo_planner(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(lo_travellers(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
||||
This folder contains an object which implements a translator from
|
||||
logic propositions to a set of clauses in conjunctive normal form.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(logic(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,18 +1,13 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will also need to load the library file hierarchies_loader.
|
||||
Alternatively, you may load the library all_loader file to load all
|
||||
library entities.
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
||||
This example is an adaptation of a LPA Prolog++ example that is
|
||||
described in the LPA Prolog++ Reference Manual. This manual can
|
||||
|
@ -1,14 +1,21 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library support files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(library(hierarchies_loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(lpa(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This example contains simple meta-interpreters for pure Prolog encapsulated
|
||||
in Logtalk objects:
|
||||
@ -17,8 +15,9 @@ in Logtalk objects:
|
||||
simple meta-interpreter for pure Prolog
|
||||
|
||||
proof_tree
|
||||
simple meta-interpreter for pure Prolog returning the proof tree
|
||||
for successful queries
|
||||
simple meta-interpreter for pure Prolog returning the proof
|
||||
tree for successful queries
|
||||
|
||||
tracer
|
||||
simple meta-interpreter for pure Prolog that traces proof construction
|
||||
simple meta-interpreter for pure Prolog that traces proof
|
||||
construction
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(metainterpreters(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,17 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will also need to load the library types_loader file. Alternatively,
|
||||
you may load the library all_loader file to load all library entities.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This example shows the use of metapredicates in Logtalk. Metapredicates are
|
||||
predicates whose head contains arguments that will be called as goals in the
|
||||
|
@ -1,14 +1,21 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library support files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(library(types_loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(metapredicates(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
There are two examples in this folder. The first one is an adoption of a
|
||||
multi-inheritance C++ example found on the D. M. Capper book "Introducing
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(mi(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,17 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will also need to load the library types_loader file. Alternatively, you
|
||||
may load the library all_loader file to load all library entities.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
hanoi.lgt
|
||||
Towers of Hanoi example
|
||||
|
@ -1,14 +1,21 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library support files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(library(types_loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(miscellaneous(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
If you need more than one message recorder, just create a new prototype
|
||||
as an extension of the object msglog.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(msglog(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains examples of the used of operators inside objects
|
||||
and categories:
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(operators(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains two examples of parametric objects dealing with
|
||||
time and date values.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(parametric(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,26 +1,17 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will need to load the objects in the roots and relations examples.
|
||||
|
||||
You will also need to load the following files in the library directory:
|
||||
events_loader, types_loader, metapredicates_loader, and hierarchies_loader.
|
||||
Alternatively, you may load the library all_loader file to load all library
|
||||
entities.
|
||||
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
You can find the original description of this example (and a solution using
|
||||
SICStus Objects) at the URL:
|
||||
http://www.sics.se/ps/sicstus/sicstus_32.html#SEC254
|
||||
|
||||
http://www.sics.se/ps/sicstus/sicstus_32.html#SEC254
|
||||
|
||||
Suppose you wish to represent points in a two-dimensional space. The
|
||||
protocol you will have to define consists on the operation move/2, which
|
||||
|
@ -1,14 +1,27 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library and support example files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load([library(events_loader), library(types_loader), library(metapredicates_loader), library(hierarchies_loader)]).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(roots(loader)).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(relations(loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(points(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,21 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will need to load the objects in the roots and relations examples.
|
||||
|
||||
You will also need to consult the following files in the library directory:
|
||||
events_loader, types_loader, metapredicates_loader, and hierarchies_loader.
|
||||
Alternatively, you may load the library all_loader file to load all library
|
||||
entities.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
In this example we have several types of polygons that can be concentric.
|
||||
This is represented by a concentric binary relation ensuring that whenever
|
||||
|
@ -1,14 +1,27 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library and support example files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load([library(events_loader), library(types_loader), library(metapredicates_loader), library(hierarchies_loader)]).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(roots(loader)).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(relations(loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(polygons(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
You will also need to load the following files in the library directory:
|
||||
types_loader, events_loader, metapredicates_loader, and dates_loader.
|
||||
|
@ -1,14 +1,21 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library support files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(library(all_loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(profiling(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
||||
This folder contains examples of Logtalk implementations for popular
|
||||
logical puzzles. The description of each puzzle can be found on the
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(puzzles(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,9 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
Run this example with no other examples loaded at the same time.
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains an example that shows how to implement a reflective
|
||||
class-based system. There are three main classes:
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(reflection(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,16 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will also need to also load the objects in the roots example.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains rewritten versions of some of the objects provided
|
||||
with previous, 1.x versions, of the Logtalk system. They are intended to
|
||||
|
@ -1,14 +1,24 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library and support example files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load([library(events_loader), library(types_loader), library(hierarchies_loader)]).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(roots(loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(relations(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,24 +1,18 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will need to consult the following files in the library directory:
|
||||
events_loader, types_loader, and hierarchies_loader. Alternatively, you
|
||||
may simply load the library all_loader file to load all library entities.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains rewritten versions of some of the objects provided
|
||||
with previous, 1.x versions, of the Logtalk system. They are intended to
|
||||
help the conversion of applications from Logtalk 1.x to 2.x and to
|
||||
support most of the other examples provided with the current Logtalk
|
||||
package.
|
||||
distribution.
|
||||
|
||||
Short description of each example entity:
|
||||
|
||||
|
@ -1,14 +1,21 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library support files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load([library(events_loader), library(types_loader), library(hierarchies_loader)]).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(roots(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,16 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will need to also load the objects in the roots example.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
You will also need to load the following files in the library directory:
|
||||
dates_loader, types_loader, events_loader, metapredicates_loader, and
|
||||
|
@ -1,14 +1,24 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library and support example files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(library(all_loader)).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(roots(loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(searching(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,16 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will need to also load the objects in the roots example.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
You will need to load the following files in the library directory:
|
||||
events_loader, types_loader, and hierarchies_loader. Alternatively,
|
||||
|
@ -1,14 +1,24 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library and support example files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(library(all_loader)).
|
||||
...
|
||||
|
||||
| ?- logtalk_load(roots(loader)).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(shapes_ch(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT
|
||||
file.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(shapes_ph(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,11 +8,4 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
The examples in this folder are adopted from the SICStus Prolog manual.
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will also need to load the following files in library directory:
|
||||
hierarchies_loader and types_loader. Alternatively, you may load the
|
||||
library all_loader file to load all library entities.
|
||||
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
@ -1,14 +1,21 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
% start by loading the necessary library support files (if not
|
||||
% already loaded):
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load([library(hierarchies_loader), library(types_loader)]).
|
||||
...
|
||||
|
||||
|
||||
% now you are ready for loading the example:
|
||||
|
||||
| ?- logtalk_load(sicstus(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,18 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
You will also need to load the library hierarchies_loader file.
|
||||
Alternatively, you may load the library all_loader file to load
|
||||
all library entities.
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
This folder contains an example of using parametric objects to implement
|
||||
symbolic expression differentiation and simplification.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(symdiff(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
To load this example and for sample queries, please see the SCRIPT file.
|
||||
|
||||
Example adopted from the paper "Classifying Prototype-Based Programming
|
||||
Languages" by Christophe Dony, Jacques Malenfant and Daniel Bardou.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -8,7 +8,7 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
| ?- logtalk_load(viewpoints(loader)).
|
||||
...
|
||||
|
||||
|
||||
|
26
Logtalk/libpaths/NOTES
Normal file
26
Logtalk/libpaths/NOTES
Normal file
@ -0,0 +1,26 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
This folder contains a Prolog file, "libpaths.pl", which defines the
|
||||
library paths for the Logtalk standard library and for all the supplied
|
||||
examples.
|
||||
|
||||
In order to easily compile and load library and example source files
|
||||
using the notation <library>(<entity>), you will need to load the
|
||||
"libpaths.pl" into your Prolog compiler after loading the Logtalk
|
||||
compiler/runtime. You might need to edit the "libpaths.pl" file in
|
||||
order to adapt it to reflect your Logtalk installation and your Prolog
|
||||
compiler and operating-system requirements. As defined, the provided
|
||||
"libpaths.pl" file is already compatible with some of the most popular
|
||||
Prolog compilers, running on both on Windows, Unix, and Unix-like
|
||||
operating-systems. The Prolog integration scripts found on the "misc"
|
||||
directory generate scripts and shortcuts that automatically load the
|
||||
copy of the "libpaths.pl" file from the Logtalk end-user directory
|
||||
created by the "misc/cplgtdirs.*" scripts. See the "INSTALL" and the
|
||||
"misc/NOTES" files for more details. Note that a few Prolog compilers
|
||||
do not support the <library>(<entity>) notation. See the "configs/NOTES"
|
||||
file for details.
|
50
Logtalk/libpaths/libpaths.pl
Normal file
50
Logtalk/libpaths/libpaths.pl
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
% Logtalk - Object oriented extension to Prolog
|
||||
% Release 2.22.0
|
||||
%
|
||||
% Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
:- initialization(
|
||||
(assertz(logtalk_library_path(library, '$LOGTALKUSER/library/')),
|
||||
assertz(logtalk_library_path(aliases, '$LOGTALKUSER/examples/aliases/')),
|
||||
assertz(logtalk_library_path(benchmarks, '$LOGTALKUSER/examples/benchmarks/')),
|
||||
assertz(logtalk_library_path(birds, '$LOGTALKUSER/examples/birds/')),
|
||||
assertz(logtalk_library_path(bricks, '$LOGTALKUSER/examples/bricks/')),
|
||||
assertz(logtalk_library_path(classvars, '$LOGTALKUSER/examples/classvars/')),
|
||||
assertz(logtalk_library_path(dcgs, '$LOGTALKUSER/examples/dcgs/')),
|
||||
assertz(logtalk_library_path(diamonds, '$LOGTALKUSER/examples/diamonds/')),
|
||||
assertz(logtalk_library_path(dynpred, '$LOGTALKUSER/examples/dynpred/')),
|
||||
assertz(logtalk_library_path(engines, '$LOGTALKUSER/examples/engines/')),
|
||||
assertz(logtalk_library_path(errors, '$LOGTALKUSER/examples/errors/')),
|
||||
assertz(logtalk_library_path(hello_world, '$LOGTALKUSER/examples/hello_world/')),
|
||||
assertz(logtalk_library_path(inheritance, '$LOGTALKUSER/examples/inheritance/')),
|
||||
assertz(logtalk_library_path(instmethods, '$LOGTALKUSER/examples/instmethods/')),
|
||||
assertz(logtalk_library_path(lo_planner, '$LOGTALKUSER/examples/lo/planner/')),
|
||||
assertz(logtalk_library_path(lo_travellers, '$LOGTALKUSER/examples/lo/travellers/')),
|
||||
assertz(logtalk_library_path(logic, '$LOGTALKUSER/examples/logic/')),
|
||||
assertz(logtalk_library_path(lpa, '$LOGTALKUSER/examples/lpa/')),
|
||||
assertz(logtalk_library_path(metainterpreters, '$LOGTALKUSER/examples/metainterpreters/')),
|
||||
assertz(logtalk_library_path(metapredicates, '$LOGTALKUSER/examples/metapredicates/')),
|
||||
assertz(logtalk_library_path(mi, '$LOGTALKUSER/examples/mi/')),
|
||||
assertz(logtalk_library_path(miscellaneous, '$LOGTALKUSER/examples/miscellaneous/')),
|
||||
assertz(logtalk_library_path(msglog, '$LOGTALKUSER/examples/msglog/')),
|
||||
assertz(logtalk_library_path(operators, '$LOGTALKUSER/examples/operators/')),
|
||||
assertz(logtalk_library_path(parametric, '$LOGTALKUSER/examples/parametric/')),
|
||||
assertz(logtalk_library_path(poem, '$LOGTALKUSER/examples/poem/')),
|
||||
assertz(logtalk_library_path(points, '$LOGTALKUSER/examples/points/')),
|
||||
assertz(logtalk_library_path(polygons, '$LOGTALKUSER/examples/polygons/')),
|
||||
assertz(logtalk_library_path(profiling, '$LOGTALKUSER/examples/profiling/')),
|
||||
assertz(logtalk_library_path(puzzles, '$LOGTALKUSER/examples/puzzles/')),
|
||||
assertz(logtalk_library_path(reflection, '$LOGTALKUSER/examples/reflection/')),
|
||||
assertz(logtalk_library_path(relations, '$LOGTALKUSER/examples/relations/')),
|
||||
assertz(logtalk_library_path(roots, '$LOGTALKUSER/examples/roots/')),
|
||||
assertz(logtalk_library_path(searching, '$LOGTALKUSER/examples/searching/')),
|
||||
assertz(logtalk_library_path(shapes_ch, '$LOGTALKUSER/examples/shapes/ch/')),
|
||||
assertz(logtalk_library_path(shapes_ph, '$LOGTALKUSER/examples/shapes/ph/')),
|
||||
assertz(logtalk_library_path(sicstus, '$LOGTALKUSER/examples/sicstus/')),
|
||||
assertz(logtalk_library_path(symdiff, '$LOGTALKUSER/examples/symdiff/')),
|
||||
assertz(logtalk_library_path(viewpoints, '$LOGTALKUSER/examples/viewpoints/')))).
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
@ -9,10 +9,15 @@ Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
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
|
||||
and load the corresponding loader utility file. Currently, there are
|
||||
eight groups of entities defined, each one with a loader and a notes
|
||||
file:
|
||||
either change your Prolog working directory to this folder and then
|
||||
compile and load the corresponding loader utility file or simply use
|
||||
the notation library(<loader file>) as argument for the compiling and
|
||||
loading predicates. For example:
|
||||
|
||||
| ?- logtalk_load(library(random_loader)).
|
||||
|
||||
Currently, there are eight groups of entities defined, each one with
|
||||
a loader and a notes file:
|
||||
|
||||
dates
|
||||
dates_loader.lgt
|
||||
@ -47,12 +52,9 @@ file:
|
||||
types.notes
|
||||
|
||||
There is also a file named all_loader.lgt that will load all entities in the
|
||||
groups listed above.
|
||||
groups listed above. Simply type the goal:
|
||||
|
||||
To compile and load the loader files type you may use the Logtalk built-in
|
||||
predicate logtalk_load/1. For example:
|
||||
|
||||
| ?- logtalk_load(all_loader).
|
||||
| ?- logtalk_load(library(all_loader)).
|
||||
|
||||
Specific notes about each group of objects, categories, and protocols can be
|
||||
found in the corresponding *.notes files.
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
|
||||
working_directory(Directory) :-
|
||||
{curdir(Directory, Directory)}.
|
||||
{curdir(Directory)}.
|
||||
|
||||
|
||||
directory_exists(Directory) :-
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
working_directory(Directory) :-
|
||||
{fail}.
|
||||
{system(pwd, Directory)}.
|
||||
|
||||
|
||||
directory_exists(Directory) :-
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
working_directory(Directory) :-
|
||||
{fail}.
|
||||
{absolute_file_name('.', Directory)}.
|
||||
|
||||
|
||||
directory_exists(Directory) :-
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -40,7 +40,7 @@
|
||||
'Directory does not exists' - existence_error(directory, 'Directory')]]).
|
||||
|
||||
:- public(working_directory/1).
|
||||
:- mode(working_directory(?atom), one).
|
||||
:- mode(working_directory(?atom), zero_or_one).
|
||||
:- info(working_directory/1, [
|
||||
comment is 'Current working directory (as an absolute file name).',
|
||||
argnames is ['Directory'],
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
@ -1,6 +1,6 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.21.6
|
||||
Release 2.22.0
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user