Logtalk 2.28.2 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1712 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura 2006-11-07 18:11:49 +00:00
parent 36a326908c
commit 2d7ccc1278
168 changed files with 3143 additions and 1018 deletions

View File

@ -6,6 +6,27 @@
}
@inproceedings{pmoura06,
author = "Paulo Moura and Vincent Marchetti",
title = "Logtalk Processing of STEP Part 21 Files",
crossref = "iclp06",
pages = "453--454",
}
@proceedings{iclp06,
title = "International Conference on Logic Programming 2006",
booktitle = "International Conference on Logic Programming 2006",
series = "Lecture Notes in Computer Science",
publisher = "Springer-Verlag",
address = "Berlin Heidelberg",
editor = "S. Etalle and M. Truszczy\'nski",
number = 4079,
month = aug,
year = 2006
}
@phdthesis{pmoura03,
author = "Paulo Moura",
title = "{Logtalk - Design of an Object-Oriented Logic Programming Language}",

62
Logtalk/CUSTOMIZE.txt Normal file
View File

@ -0,0 +1,62 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
This file contains detailed instructions for customizing your Logtalk
installation and working environment. Customization is mostly done on
a per-user basis by editing files on the Logtalk user folder (whose
path is sorted on the LOGTALKUSER environment variable).
1. 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.
Inside your Logtalk user folder, you will find a "libpaths" folder containing
a sample file which, when loaded, defines the library paths for the Logtalk
standard library and for all the supplied examples. This file may need to be
edited to match both your Logtalk installation and your Prolog compiler and
operating-system requirements. For details, see the file "libpaths/NOTES".
2. CUSTOMIZING PROLOG CONFIGURATION FILES
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" file for Prolog specific notes; some Prolog compilers
do not support the whole range of compilation flag values.
3. CUSTOMIZING DOCUMENTATION PROCESSING SCRIPTS AND SUPPORTING FILES
Inside your Logtalk user folder, you will find a "xml" folder containing a
set of shell scripts, CSS and XSLT style-sheets, and DTD and XML Schema files
for processing the XML documenting files that are automatically generated
when you compile source files. You may want to customize the CSS and XSLT
files to modify the layout or style of the resulting PDF/(X)HTML files or to
write new scripts and transformations to generate other formats. You may also
edit the file "custom.ent" in order to specify XML entities for your personal
data that can be used on Logtalk documenting directives. For details, see the
file "xml/NOTES".
4. ADDING SUPPORT FOR EDITING LOGTALK SOURCE FILES TO TEXT EDITORS
Inside your Logtalk user folder, you will find a "wenv" folder, containing
configuration files for several text editors, which add support for syntax
coloring and other editing services of Logtalk source files. For details,
see the file "wenv/NOTES".

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -162,41 +162,7 @@ This assumes that your favorite Prolog compilers are supported by the
the steps described in the "QUICK_START" file.
5. SETTING LIBRARY PATHS
5. CUSTOMIZING LOGTALK
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. Assuming that you have used the "scripts/cplgtdirs.*" shell
scripts for making a copy of the user-modifiable Logtalk files, you will find
in the "$LOGTALKUSER/libpaths" directory a sample file which, when loaded,
defines the library paths for the Logtalk standard library and for all the
supplied examples. This file may need to be edited to match your Logtalk
installation and your Prolog compiler and operating-system requirements. For
more details, see the file "$LOGTALKUSER/libpaths/NOTES".
6. CUSTOMIZING PROLOG CONFIGURATION FILES
Logtalk interfaces with a specific Prolog compiler via a configuration file
that can be found on the "$LOGTALKUSER/configs" directory. 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 are:
"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 "$LOGTALKUSER/configs/NOTES"
file for Prolog specific notes; some Prolog compilers do not support the whole
range of compilation flag values.
7. CUSTOMIZING DOCUMENTATION PROCESSING SCRIPTS AND SUPPORTING FILES
Logtalk provides, in the "$LOGTALKUSER/xml" directory, a set of shell scripts,
CSS and XSLT style-sheets, and DTD and XML Schema files for processing the XML
documenting files that are automatically generated when you compile source
files. You may want to customize these CSS and XSLT files to modify the layout
or style of the resulting PDF/(X)HTML files or to write new scripts and
transformations to generate other formats. For more details, see the file
"$LOGTALKUSER/xml/NOTES".
Please see the file "CUSTOMIZE.txt" for details on how to customize your
Logtalk installation and working environment.

View File

@ -1,214 +0,0 @@
The Artistic License
Version 2.0beta5, October 2001
Copyright (C) 2000, 2001 Larry Wall, Bradley M. Kuhn.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
This copyright license states the terms under which a given free software
Package may be copied, modified and/or redistributed, while the
Originator(s) maintain some artistic control over the future development of
that Package (at least as much artistic control as can be given under
copyright law while still making the Package open source and free software).
This license is bound by copyright law, and thus it legally applies only to
works which the copyright holder has permitted copying, distribution or
modification under the terms of the Artistic License, Version 2.0.
You are reminded that You are always permitted to make arrangements wholly
outside of a given copyright license directly with the copyright holder(s)
of a given Package. If the terms of this license impede your ability to
make full use of the Package, You are encouraged to contact the copyright
holder(s) and seek a different licensing arrangement.
Definitions
"Package" refers to the collection of files distributed by the
Originator(s), and derivatives of that collection of files created
through textual modification.
"Standard Version" refers to the Package if it has not been modified, or has
been modified only in ways suggested by the
Originator(s).
"Modified Version" refers to the Package, if it has been changed by You via
textual modification of the source code, and such changes
were not suggested by the Originator(s).
"Originator" refers to the author(s) and/or copyright holder(s) of the
Standard Version of the Package.
"You" and "Your" refers to any person who would like to copy, distribute, or
modify the Package.
"Distribution Fee" is any fee that You charge for providing a copy of this
Package to another party. It does not refer to licensing
fees.
"Freely Available" means that:
(a) no fee is charged for the right to use the item (though a
Distribution Fee may be charged).
(b) recipients of the item may redistribute it under the same
conditions they received it.
(c) If the item is a binary, object code, bytecode, the complete
corresponding machine-readable source code is included with the
item.
Permission for Use and Modification Without Redistribution
(1) You are permitted to use the Standard Version and create and use
Modified Versions for any purpose without restriction, provided that
you do not redistribute the Modified Version to others outside of your
company or organization.
Permissions for Redistribution of the Standard Version
(2) You may make available verbatim copies of the source code of the
Standard Version of this Package in any medium without restriction,
either gratis or for a Distribution Fee, provided that you duplicate
all of the original copyright notices and associated disclaimers. At
Your discretion, such verbatim copies may or may not include compiled
bytecode, object code or binary versions of the corresponding source
code in the same medium.
(3) You may apply any bug fixes, portability changes, and other
modifications made available from any of the Originator(s). The
resulting modified Package will still be considered the Standard
Version, and may be copied, modified and redistributed under the terms
of the original license of the Standard Version as if it were the
Standard Version.
Permissions for Redistribution of Modified Versions of the Package as Source
(4) You may modify your copy of the source code of this Package in any way
and distribute that Modified Version (either gratis or for a
Distribution Fee, and with or without a corresponding binary, bytecode
or object code version of the Modified Version) provided that You
clearly indicate what changes You made to the Package, and provided
that You do at least ONE of the following:
(a) make the Modified Version available to the Originator(s) of the
Standard Version, under the exact license of the Standard
Version, so that the Originator(s) may include your modifications
into the Standard Version (at their discretion).
(b) modify any installation scripts and procedures so that
installation of the Modified Version will never conflict with an
installation of the Standard Version, include for each program
installed by the Modified Version clear documentation describing
how it differs from the Standard Version, and rename your
Modified Version so that the name is substantially different from
the Standard Version.
(c) permit and encourage anyone who receives a copy of the Modified
Version to make your modifications Freely Available in some
specific way.
If Your Modified Version is in turn derived from a Modified Version
made by a third party, then You are still required to ensure that Your
Modified Version complies with the requirements of this license.
Permissions for Redistribution of Non-Source Versions of Package
(5) You may distribute binary, object code, bytecode or other non-source
versions of the Standard Version of the Package, provided that you
include complete instructions on where to get the source code of the
Standard Version. Such instructions must be valid at the time of Your
distribution. If these instructions, at any time while You are
carrying our such distribution, become invalid, you must provide new
instructions on demand or cease further distribution. If You cease
distribution within thirty days after You become aware that the
instructions are invalid, then You do not forfeit any of Your rights
under this license.
(6) You may distribute binary, object code, bytecode or other non-source
versions of a Modified Version provided that You do at least ONE of
the following:
(a) include a copy of the corresponding source code for the Modified
Version under the terms indicated in (4).
(b) ensure that the installation of Your non-source Modified Version
does not conflict in any way with an installation of the Standard
Version, include for each program installed by the Modified
Version clear documentation describing how it differs from the
Standard Version, and rename your Modified Version so that the
name is substantially different from the Standard Version.
(c) ensure that the Modified Version includes notification of the
changes made from the Standard Version, and offer to provide
machine-readable source code (under a license that permits making
that source code Freely Available) of the Modified Version via
mail order.
Permissions for Inclusion of the Package in Aggregate Works
(7) You may aggregate this Package (either the Standard Version or
Modified Version) with other packages and distribute the resulting
aggregation provided that You do not charge a licensing fee for the
Package. Distribution Fees are permitted, and licensing fees for
other packages in the aggregation are permitted. Your permission to
distribute Standard or Modified Versions of the Package is still
subject to the other terms set forth in other sections of this
license.
(8) In addition to the permissions given elsewhere by this license, You
are also permitted to link Modified and Standard Versions of this
Package with other works and distribute the result without
restriction, provided You have produced binary program(s) that do not
overtly expose the interfaces of the Package. This includes
permission to embed the Package in a larger work of your own without
exposing a direct interface to the Package. This also includes
permission to build stand-alone binary or bytecode versions of your
scripts that require the Package, but do not otherwise give the casual
user direct access to the Package itself.
Items That are Never Considered Part of a Modified Version Package
(9) Works (including, but not limited to, subroutines and scripts) that
you have linked or aggregated with the Package that merely extend or
make use of the Package, but are not intended to cause the Package to
operate differently from the Standard Version, do not, by themselves,
cause the Package to be a Modified Version. In addition, such works
are not considered parts of the Package itself, and are not bound by
the terms of the Package's license.
Acceptance of License and Disclaimer of Warranty
(10) You are not required to accept this License, since you have not signed
it. However, nothing else grants you permission to copy, modify or
distribute the Standard or Modified Versions of the Package. These
actions are prohibited by copyright law if you do not accept this
License. Therefore, by copying, modifying or distributing Standard
and Modified Versions of the Package, you indicate your acceptance of
the license of the Package.
(11) Disclaimer of Warranty:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT UNLESS REQUIRED BY
LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER OR CONTRIBUTOR
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

201
Logtalk/LICENSE.txt Normal file
View File

@ -0,0 +1,201 @@
The Artistic License 2.0
Copyright (c) 2000-2006, The Perl Foundation.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
This license establishes the terms under which a given free software
Package may be copied, modified, distributed, and/or redistributed.
The intent is that the Copyright Holder maintains some artistic
control over the development of that Package while still keeping the
Package available as open source and free software.
You are always permitted to make arrangements wholly outside of this
license directly with the Copyright Holder of a given Package. If the
terms of this license do not permit the full use that you propose to
make of the Package, you should contact the Copyright Holder and seek
a different licensing arrangement.
Definitions
"Copyright Holder" means the individual(s) or organization(s)
named in the copyright notice for the entire Package.
"Contributor" means any party that has contributed code or other
material to the Package, in accordance with the Copyright Holder's
procedures.
"You" and "your" means any person who would like to copy,
distribute, or modify the Package.
"Package" means the collection of files distributed by the
Copyright Holder, and derivatives of that collection and/or of
those files. A given Package may consist of either the Standard
Version, or a Modified Version.
"Distribute" means providing a copy of the Package or making it
accessible to anyone else, or in the case of a company or
organization, to others outside of your company or organization.
"Distributor Fee" means any fee that you charge for Distributing
this Package or providing support for this Package to another
party. It does not mean licensing fees.
"Standard Version" refers to the Package if it has not been
modified, or has been modified only in ways explicitly requested
by the Copyright Holder.
"Modified Version" means the Package, if it has been changed, and
such changes were not explicitly requested by the Copyright
Holder.
"Original License" means this Artistic License as Distributed with
the Standard Version of the Package, in its current version or as
it may be modified by The Perl Foundation in the future.
"Source" form means the source code, documentation source, and
configuration files for the Package.
"Compiled" form means the compiled bytecode, object code, binary,
or any other form resulting from mechanical transformation or
translation of the Source form.
Permission for Use and Modification Without Distribution
(1) You are permitted to use the Standard Version and create and use
Modified Versions for any purpose without restriction, provided that
you do not Distribute the Modified Version.
Permissions for Redistribution of the Standard Version
(2) You may Distribute verbatim copies of the Source form of the
Standard Version of this Package in any medium without restriction,
either gratis or for a Distributor Fee, provided that you duplicate
all of the original copyright notices and associated disclaimers. At
your discretion, such verbatim copies may or may not include a
Compiled form of the Package.
(3) You may apply any bug fixes, portability changes, and other
modifications made available from the Copyright Holder. The resulting
Package will still be considered the Standard Version, and as such
will be subject to the Original License.
Distribution of Modified Versions of the Package as Source
(4) You may Distribute your Modified Version as Source (either gratis
or for a Distributor Fee, and with or without a Compiled form of the
Modified Version) provided that you clearly document how it differs
from the Standard Version, including, but not limited to, documenting
any non-standard features, executables, or modules, and provided that
you do at least ONE of the following:
(a) make the Modified Version available to the Copyright Holder
of the Standard Version, under the Original License, so that the
Copyright Holder may include your modifications in the Standard
Version.
(b) ensure that installation of your Modified Version does not
prevent the user installing or running the Standard Version. In
addition, the Modified Version must bear a name that is different
from the name of the Standard Version.
(c) allow anyone who receives a copy of the Modified Version to
make the Source form of the Modified Version available to others
under
(i) the Original License or
(ii) a license that permits the licensee to freely copy,
modify and redistribute the Modified Version using the same
licensing terms that apply to the copy that the licensee
received, and requires that the Source form of the Modified
Version, and of any works derived from it, be made freely
available in that license fees are prohibited but Distributor
Fees are allowed.
Distribution of Compiled Forms of the Standard Version
or Modified Versions without the Source
(5) You may Distribute Compiled forms of the Standard Version without
the Source, provided that you include complete instructions on how to
get the Source of the Standard Version. Such instructions must be
valid at the time of your distribution. If these instructions, at any
time while you are carrying out such distribution, become invalid, you
must provide new instructions on demand or cease further distribution.
If you provide valid instructions or cease distribution within thirty
days after you become aware that the instructions are invalid, then
you do not forfeit any of your rights under this license.
(6) You may Distribute a Modified Version in Compiled form without
the Source, provided that you comply with Section 4 with respect to
the Source of the Modified Version.
Aggregating or Linking the Package
(7) You may aggregate the Package (either the Standard Version or
Modified Version) with other packages and Distribute the resulting
aggregation provided that you do not charge a licensing fee for the
Package. Distributor Fees are permitted, and licensing fees for other
components in the aggregation are permitted. The terms of this license
apply to the use and Distribution of the Standard or Modified Versions
as included in the aggregation.
(8) You are permitted to link Modified and Standard Versions with
other works, to embed the Package in a larger work of your own, or to
build stand-alone binary or bytecode versions of applications that
include the Package, and Distribute the result without restriction,
provided the result does not expose a direct interface to the Package.
Items That are Not Considered Part of a Modified Version
(9) Works (including, but not limited to, modules and scripts) that
merely extend or make use of the Package, do not, by themselves, cause
the Package to be a Modified Version. In addition, such works are not
considered parts of the Package itself, and are not subject to the
terms of this license.
General Provisions
(10) Any use, modification, and distribution of the Standard or
Modified Versions is governed by this Artistic License. By using,
modifying or distributing the Package, you accept this license. Do not
use, modify, or distribute the Package, if you do not accept this
license.
(11) If your Modified Version has been derived from a Modified
Version made by someone other than you, you are nevertheless required
to ensure that your Modified Version complies with the requirements of
this license.
(12) This license does not grant you the right to use any trademark,
service mark, tradename, or logo of the Copyright Holder.
(13) This license includes the non-exclusive, worldwide,
free-of-charge patent license to make, have made, use, offer to sell,
sell, import and otherwise transfer the Package with respect to any
patent claims licensable by the Copyright Holder that are necessarily
infringed by the Package. If you institute patent litigation
(including a cross-claim or counterclaim) against any party alleging
that the Package constitutes direct or contributory patent
infringement, then this Artistic License to you shall terminate on the
date that such litigation is filed.
(14) Disclaimer of Warranty:
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -13,11 +13,12 @@ CONTENTS
3. Registration
4. Support
5. Installation
6. Quick start
7. Documentation
8. Upgrading
9. Citations
10. Contributions
6. Customization
7. Quick start
8. Documentation
9. Upgrading
10. Citations
11. Contributions
1. LICENSE
@ -33,7 +34,7 @@ stated.
The latest release of the Logtalk package is always available at the URL:
http://www.logtalk.org/
http://logtalk.org/
At this address you can also find additional documentation and information
about Logtalk.
@ -58,9 +59,9 @@ platforms (mac, pc, unix,...) (optional)
Logtalk support is available for registered users via email to
support@logtalk.org.
At the URL http://www.logtalk.org/bugs.html you can find a list of known
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://www.logtalk.org/news.html.
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
@ -78,11 +79,9 @@ with just the word "help" in the subject or in the message body.
5. INSTALLATION
Installing Logtalk is just a matter of uncompressing/unpacking the
distribution archive file for your operating system and running a
few shell scripts. You may install Logtalk in any directory that
you find convenient. See the file INSTALL for detailed instructions
on how to customize your working environment.
Logtalk can be installed either from sources by running a few shell scripts
or by using one of the provided installers, depending on your operating
system. See the file "INSTALL.txt" for detailed 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
@ -90,36 +89,43 @@ and for using instructions (to read the user manual open the file
using four-space tabs.
6. QUICK START
6. CUSTOMIZATION
The file QUICK_START provides quick instructions for those of you in a hurry
to run Logtalk, provided that your favorite Prolog compiler is supported.
The file "CUSTOMIZE.txt" provides detailed instructions for customizing the
Logtalk installation and working environment.
7. DOCUMENTATION
7. QUICK START
The file "QUICK_START.txt" provides quick instructions for those of you in
a hurry to run Logtalk, provided that your favorite Prolog compiler is
supported.
8. DOCUMENTATION
The reference and user manuals and the tutorial are provided in XHTML format
and can be found in the "manuals" directory.
The file RELEASE_NOTES contains descriptions of all Logtalk updates since the
first public version. Read it carefully if you have been using a previous
Logtalk version.
The file "RELEASE_NOTES.txt" contains descriptions of all Logtalk updates
since the first public version. Read it carefully if you have been using a
previous Logtalk version.
8. UPGRADING
9. UPGRADING
If you are upgrading from a previous Logtalk version, please check the file
UPGRADING for instructions on how to upgrade your programs or your custom
configuration files to run under this new version.
"UPGRADING.txt" for instructions on how to upgrade your programs or your
custom configuration files to run under this new version.
9. CITATIONS
10. CITATIONS
If you want to cite Logtalk in your publications, please consult the file
BIBLIOGRAPHY for bibliographic references in BibTeX format.
"BIBLIOGRAPHY.bib" for bibliographic references in BibTeX format.
10. CONTRIBUTIONS
11. CONTRIBUTIONS
Contributions, constructive criticisms, code, and suggestions are always
welcome. If you want to contribute to this project, drop me a line to the

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -10,6 +10,173 @@ RELEASE NOTES
=============
2.28.2 - November 6, 2006
Corrected a compiler bug where unknown entities will not be report when
compiling a source file whenever an entity with the same name but of a
different type is already known.
Added a XPCE hook file ("configs/xpcehook.pl") supporting Logtalk message
sending goals as XPCE call-back goals. The XPCE library is now loaded by
default by the SWI-Prolog integration scripts.
Added support for generating single PDF files of the User and Reference
Manuals. Removed the PDF versions of the individual manual XHTML pages.
The ECLiPSe config files now require release 5.10#26 or a later version.
Added support for listing Logtalk entity names (objects, categories, and
protocols) in the SubEthaEdit symbols menu.
Added a Vim dictionary file for Logtalk keyword completion and support
for automatic indentation.
Added basic support for the MacOS X Smultron text editor. Added basic
support for the Notepad++, SuperEdi, and ConTEXT Windows text editors.
2.28.1 - October 10, 2006
Added support for using XML entities using the notation "{entity name}"
in info/1 documenting directives for the "author", "copyright", and
"license" keywords. The XML entities are defined on a "custom.ent" file.
Updated Logtalk bibliographic references (in file "BIBLIOGRAPHY.bib").
Added a "lgt_uninstall.sh" shell script for uninstalling Logtalk on POSIX
operating systems.
Improved RPM install-time messages on the defined Logtalk environment
variables.
Updated the ECLiPSe integration scripts and config files to work with
and require version 5.10 (the first open source version of ECLiPSe).
Corrected a typo on the "logtalk.dtd" file that prevents validation of
XML documenting files that use a local reference to the DTD.
2.28.0 - September 28, 2006
Updated the Logtalk license to the final version of the "The Artistic
License 2.0" (see http://www.perlfoundation.org/legal/ for details).
Added experimental support for multi-threading programming on selected
Prolog compilers. Added a new object directive, threaded/0, a new
predicate directive, atomic/1, and four new built-in predicates,
threaded_call/1-2 and threaded_exit/1-2. Added a new set of examples,
"threads". Thanks to Paulo Nunes for helping developing and testing
these new features.
Expanded support for meta-predicates by allowing the declaration of meta-
arguments as closures instead of goals.
Added the generalized call/N predicate as a built-in method. This built-in
method must be used in the implementation of meta-predicates which work
with closures instead of goals.
The metapredicate/1 directive should be considered deprecated. Use the
meta_predicate/1 directive instead.
Updated the Logtalk compiler to generate an error whenever a non-variable
meta-argument is found in a clause head of a user-defined meta-predicate.
Improved compilation of meta-predicate meta-arguments. Corrected a bug
in the compilation of user meta-predicates that allowed illegal calls
to non-public predicates on the caller object to be made from the object
defining the meta-predicates. Thanks to Rémy Haemmerlé and François
Fages for reporting the problem.
Improved performance for non-cached messages, notably when running with
YAP, GNU Prolog, and SWI-Prolog on all operating systems and with SICStus
Prolog 4.0 on POSIX operating systems.
Updated the Logtalk compiler to generate an error whenever a predicate
directive appears in a source file after predicate clauses that call the
predicate specified in the directive.
Added support for "copyright" and "license" keys to the info/1 entity
documenting directive.
Improved compiler error messages to also report source file line number
for selected Prolog compilers.
Added PDF versions of all the manual XHTML pages. Added links to all the
manual XHTML pages to the corresponding PDF versions.
Corrected a bug (introduced in version 2.27.0) in the built-in predicates
abolish_object/1, abolish_protocol/1, and abolish_category/1 that resulted
in some clauses not being retracted when an object is abolished (thanks to
Neng-Fa Zhou for the bug report).
Corrected a bug (introduced in version 2.27.1) in the processing of the
term_expansion/2 predicate.
Corrected a bug in the compilation of redefined built-in predicates with
no clauses.
Added an experimental config file for CxProlog 0.93.1.
Updated the SWI-Prolog config and hook files in order to support the
edit/1 and make/0 development predicates.
Changed the Logtalk - SWI-Prolog integration scripts to load the hook
file "swihook.pl" after the other files in order to avoid some possible
errors at startup.
Updated the config file for the forthcoming SICStus Prolog 4.0 version
to work in the current beta version. Modified the "make_sicstuslgt.*"
shell scripts to work with both SICStus Prolog 3.12 and 4.0 versions.
Updated the config file for YAP to workaround a problem on the Windows
version where testing for directory existence fails if the path ends with
a slash (or a double backslash); this problem prevents the use of library
notation to load source files (problem already fixed in the current YAP
CVS version).
Updated the config file for B-Prolog to match (and require) the new 6.9
version; added integration shell scripts (for both Windows and POSIX
systems).
Updated the config files and the integration scripts for ECLiPSe in order
to workaround bugs on the predicates abolish/1 and canonical_path_name/2.
Modified the "make_eclipselgt.js" script to work with both ECLiPSe 5.8
and 5.9 versions.
Dropped support for versions of XSB older than 3.0. Added support for
smart compilation of source files to the XSB config file.
Updated the config file for IF/Prolog 5.1 by adding a missing definition
for predicate retractall/1 and avoiding some harmless singleton warnings.
Add a ".txt" extension to all "NOTES" and "SCRIPT" files.
Extended "dcgs", "parametric", and "metainterpreters" examples.
Added Inno Setup GUI Windows installer script.
Update all the JScript scripts to check if a compatible version of WSH
is installed and to workaround some problems with spaces in file paths.
Updated the "lgt_install.js" JScript script to copy the scripts/*.bat and
the xml/*.bat batch scripts to the system's Windows directory instead of
modifying the PATH environment variable.
Updated the "cplgtdirs.*" shell scripts to make a backup copy of any
previous LOGTALKUSER directory.
Added post-install scripts to the LINUX RPM "logtalk.spec" file for
setting the environment variable LOGTALKHOME for all users, defining
a default value for the environment variable LOGTALKUSER, and running
the Prolog integration scripts.
Split the installation and customization instructions in two files,
"INSTALL.txt" and "CUSTOMIZE.txt".
Added shell scripts for converting the manual XHTML pages into PDF files
using CSSToXSLFO.
2.27.1 - March 27, 2006
Allow calls to the built-in method parameter/2 with the first argument

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -19,6 +19,10 @@ translation examples.
Upgrading from a previous Logtalk 2.x versions
==============================================
Changes in the Logtalk compiler between releases may render Prolog config
files from older versions incompatible with new ones. You may need to update
your local Logtalk user files by running e.g. the "cplgtdirs" shell script.
If your Logtalk programs depend on some of the example files, it is
advisable that you check your code against the new version before
throwing away the older release.
@ -128,3 +132,13 @@ declaration linking clauses, resulting in small performance improvements and
in space savings for the Prolog code generated when compiling Logtalk entities.
Recompilation of all objects, protocols, and categories is necessary in order
to take advantage of this optimizations.
Logtalk 2.28.0 changes representation of meta-predicates, implying the
recompilation of all objects, protocols, and categories that define them.
In addition, in order to close some security holes where meta-predicates
could be used to bypass predicate scope declarations, meta-predicates that
use closures must be re-implemented to use the new call/N Logtalk built-in
predicate. The directive metapredicate/1 is now deprecated, the directive
meta_predicate/1 should be used instead. There are also changes to the
config files that render the Logtalk runtime imcompatible with the config
files of previous versions.

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -27,7 +27,9 @@ code or from known Prolog text books and are copyrighted by the respective
authors.
These are programming examples, meaning that you should study the source
files to fully understand them.
files to fully understand them. However, note that some examples purpose
is to illustrate general principles rather than being adequate, efficient
solutions for deployment code.
All examples are formatted using four spaces tabs.
@ -109,10 +111,11 @@ lpa
examples adopted from the LPA Prolog++ system
metapredicates
example of using metapredicates in Logtalk objects
example of using meta-predicates in Logtalk objects
metainterpreters
some examples of simple metainterpreters
some examples of simple meta-interpreters defined as categories which
may be imported by "database" objects
mi
multi-inheritance examples
@ -177,5 +180,8 @@ symdiff
example of using parametric objects to implement symbolic expression
differentiation and simplification
threads
several simple examples of multi-threading programming
viewpoints
example on how to implement property and value sharing with prototypes

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -20,6 +20,13 @@ Result = -9
yes
% Recognize MAC addresses:
| ?- macaddr::valid("00:1e:4a:ef:72:8b").
yes
% solve a cellphone keypad encoded enigma:
| ?- enigma::solve("4 96853 5683 86 4283 346637 9484 968 8664448", Message).

View File

@ -0,0 +1,17 @@
:- object(macaddr).
:- public(valid/1).
valid(Address) :-
phrase(mac, Address).
mac --> digits, ":", digits, ":", digits, ":", digits, ":", digits, ":", digits.
digits --> digit, digit.
digit --> [C], {0'0 =< C, C =< 0'9}.
digit --> [C], {0'a =< C, C =< 0'f}.
digit --> [C], {0'A =< C, C =< 0'F}.
:- end_object.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -9,7 +9,7 @@ Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
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:
in Logtalk categories:
solver
simple meta-interpreter for pure Prolog
@ -21,3 +21,6 @@ in Logtalk objects:
tracer
simple meta-interpreter for pure Prolog that traces proof
construction
To use a meta-interpreter with an object, simply import the corresponding
category.

View File

@ -1,113 +0,0 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
% start by loading the example:
| ?- logtalk_load(metainterpreters(loader)).
...
% solver - a simple meta-interpreter for pure Prolog:
| ?- solver::assertz(member_of(H, [H| _])).
H = _G178
yes
| ?- solver::assertz((member_of(H, [_| T]) :- member_of(H, T))).
H = _G181
T = _G179
yes
| ?- solver::solve(member_of(2, [1,2,3])).
yes
| ?- solver::solve(member_of(X, [1,2,3])).
X = 1 ;
X = 2 ;
X = 3
yes
% proof_tree - a simple meta-interpreter for pure Prolog that
% construct a proof tree:
| ?- proof_tree::assertz(member_of(H, [H| _])).
H = _G178
yes
| ?- proof_tree::assertz((member_of(H, [_| T]) :- member_of(H, T))).
H = _G181
T = _G179
yes
| ?- proof_tree::solve(member_of(2, [1,2,3]), Tree).
Tree = member_of(2, [1, 2, 3]):- (member_of(2, [2, 3]):-true)
yes
% tracer - a simple meta-interpreter for tracing goal proofs
% using pure Prolog:
| ?- tracer::assertz(member_of(H, [H| _])).
H = _G178
yes
| ?- tracer::assertz((member_of(H, [_| T]) :- member_of(H, T))).
H = _G181
T = _G179
yes
| ?- tracer::trace(member_of(3, [1,2,3])).
1 call: member_of(3, [1, 2, 3])
2 call: member_of(3, [2, 3])
3 call: member_of(3, [3])
3 exit: member_of(3, [3])
2 exit: member_of(3, [2, 3])
1 exit: member_of(3, [1, 2, 3])
yes
| ?- tracer::trace(member_of(X, [1,2,3])).
1 call: member_of(_G187, [1, 2, 3])
1 exit: member_of(1, [1, 2, 3])
X = 1 ;
1 redo: member_of(1, [1, 2, 3])
2 call: member_of(_G187, [2, 3])
2 exit: member_of(2, [2, 3])
1 exit: member_of(2, [1, 2, 3])
X = 2 ;
1 redo: member_of(2, [1, 2, 3])
2 redo: member_of(2, [2, 3])
3 call: member_of(_G187, [3])
3 exit: member_of(3, [3])
2 exit: member_of(3, [2, 3])
1 exit: member_of(3, [1, 2, 3])
X = 3 ;
1 redo: member_of(3, [1, 2, 3])
2 redo: member_of(3, [2, 3])
3 redo: member_of(3, [3])
4 call: member_of(_G187, [])
4 fail: member_of(_G187, [])
3 fail: member_of(_G187, [3])
2 fail: member_of(_G187, [2, 3])
1 fail: member_of(_G187, [1, 2, 3])
no

View File

@ -0,0 +1,100 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
% start by loading the example:
| ?- logtalk_load(metainterpreters(loader)).
...
% direct call of p/1:
| ?- ?- database::p(X).
X = 1 ;
X = 2
yes
% solver - a simple meta-interpreter for pure Prolog:
| ?- database::solve(p(X)).
X = 1 ;
X = 2
yes
| ?- database::proof_tree(p(X), Tree).
X = 1
Tree = p(1):- (q(1, a):- (s(1):-true), (t(1, a):-true)), (r(a):-true) ;
X = 2
Tree = p(2):- (q(2, b):- (s(2):-true), (t(2, b):-true)), (r(b):-true)
yes
% tracer - a simple meta-interpreter for tracing goal proofs using pure Prolog:
| ?- database::trace(p(X)).
1 call: p(_G180)
2 call: q(_G180, _G316)
3 call: s(_G180)
3 exit: s(1)
3 call: t(1, _G316)
3 exit: t(1, a)
2 exit: q(1, a)
2 call: r(a)
2 exit: r(a)
1 exit: p(1)
X = 1 ;
1 redo: p(1)
2 redo: r(a)
2 fail: r(a)
2 redo: q(1, a)
3 redo: t(1, a)
3 fail: t(1, _G316)
3 redo: s(1)
3 exit: s(2)
3 call: t(2, _G316)
3 exit: t(2, b)
2 exit: q(2, b)
2 call: r(b)
2 exit: r(b)
1 exit: p(2)
X = 2 ;
1 redo: p(2)
2 redo: r(b)
2 fail: r(b)
2 redo: q(2, b)
3 redo: t(2, b)
3 fail: t(2, _G316)
3 redo: s(2)
3 exit: s(3)
3 call: t(3, _G316)
3 fail: t(3, _G316)
3 redo: s(3)
3 fail: s(_G180)
2 fail: q(_G180, _G316)
1 fail: p(_G180)
no
% another example: expert system rules:
| rules::prove(weather(Wheather)).
Wheather = raining
yes
| ?- rules::prove(goto(Where)).
Where = cinema
yes

View File

@ -0,0 +1,23 @@
:- object(database,
imports(solver, proof_tree, tracer)).
:- public(p/1).
:- private(q/2, r/1, s/1, t/2).
:- dynamic(p/1, q/2, r/1, s/1, t/2).
p(X) :- q(X, Y), r(Y).
q(X, Y) :- s(X), t(X, Y).
r(a).
r(b).
s(1).
s(2).
s(3).
t(1, a).
t(2, b).
:- end_object.

View File

@ -0,0 +1,48 @@
:- category(engine).
:- public(prove/1).
:- public(if/1).
:- dynamic(if/1).
:- op(200, fx, if).
:- op(100, xfx, then).
prove(true) :-
!.
prove([]) :-
!.
prove([Cond| Conds]) :-
!,
prove(Cond),
prove(Conds).
prove(Fact) :-
::clause(Fact, true).
prove(Conclusion) :-
::clause(if Conds then Conclusion, true),
prove(Conds).
:- end_category.
:- object(rules,
imports(engine)).
:- public([weather/1, weekday/1, time/1, goto/1]).
:- dynamic([weather/1, weekday/1, time/1, goto/1]).
:- op(200, fx, if).
:- op(100, xfx, then).
if [weather(sunny), weekday(weekend), time(day)] then goto(beach).
if [weather(raining), weekday(weekend), time(night)] then goto(cinema).
if [weekday(workday), time(day)] then goto(work).
weather(raining).
weekday(weekend).
time(night).
:- end_object.

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -8,7 +8,7 @@ Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
To load this example and for sample queries, please see the SCRIPT file.
This example shows the use of metapredicates in Logtalk. Metapredicates are
This example shows the use of meta-predicates in Logtalk. Meta-predicates are
predicates whose head contains arguments that will be called as goals in the
body of the predicate definition.
@ -20,5 +20,5 @@ This example defines two objects:
of the elements being sorted
tracer
this object implements a metapredicate that is used by sort(_) to
this object implements a meta-predicate that is used by sort(_) to
trace the sorting algorithm steps

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,12 +0,0 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
To load this example and for sample queries, please see the SCRIPT file.
This folder contains three examples of parametric objects, the first two
dealing with time and date values and the third one representing rectangles.

View File

@ -0,0 +1,12 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
To load this example and for sample queries, please see the SCRIPT file.
This folder contains some examples of parametric objects, dealing with
lists, time and date values, and rectangles.

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -12,6 +12,30 @@ Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
...
% some queries using the list parametric object:
| ?- [1, 2, 3]::member(X).
X = 1 ;
X = 2 ;
X = 3 ;
no
| ?- [1, 2, 3]::last(X).
X = 3
yes
| ?- [1, 2, 3]::nextto(2, Y).
Y = 3
yes
| ?- []::member(X)
no
% some queries using the time and date parametric objects:
| ?- date(Year, Month, Day)::today.
@ -19,14 +43,12 @@ Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
Year = 2000
Month = 8
Day = 15
Yes
yes
| ?- date(Year, _, _)::(today, \+ leap_year).
Year = 2002
yes
@ -35,8 +57,7 @@ yes
Hours = 13
Mins = 52
Secs = 42
Yes
yes
| ?- R = rectangle(W, H, X, Y), R::init, R::move(3, 4, NR), NR::position(X2, Y2).
@ -49,5 +70,4 @@ Y = 0
NR = rectangle(2, 1, 3, 4)
X2 = 3
Y2 = 4
Yes
yes

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Release 2.28.2
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
@ -9,6 +9,9 @@ Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
This directory contains two versions, one prototype-based and the
other one class-based, of a very simple geometric shapes hierarchy.
The aim of this example is to compare the pros and cons of using
either prototypes or classes for defining object hierarchies.
ph
prototype-based version

View File

@ -1,14 +0,0 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.27.1
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
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,
you may load the library all_loader file to load all library entities.

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