From a920e364c32268d1a057f9d16ca60c6ae8d5f221 Mon Sep 17 00:00:00 2001 From: pmoura Date: Thu, 13 Jan 2005 12:22:42 +0000 Subject: [PATCH] Logtalk 2.22.4 files. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1232 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- Logtalk/INSTALL | 91 +++++++----- Logtalk/QUICK_START | 9 +- Logtalk/README | 4 +- Logtalk/RELEASE_NOTES | 31 +++- Logtalk/UPGRADING | 4 +- Logtalk/examples/NOTES | 7 +- Logtalk/examples/aliases/NOTES | 4 +- Logtalk/examples/aliases/SCRIPT | 4 +- Logtalk/examples/assignvars/NOTES | 20 +++ Logtalk/examples/assignvars/SCRIPT | 75 ++++++++++ Logtalk/examples/assignvars/fsm3.lgt | 63 ++++++++ Logtalk/examples/assignvars/loader.lgt | 5 + Logtalk/examples/assignvars/rectangle3.lgt | 52 +++++++ Logtalk/examples/benchmarks/NOTES | 8 +- Logtalk/examples/benchmarks/SCRIPT | 4 +- Logtalk/examples/birds/NOTES | 4 +- Logtalk/examples/birds/SCRIPT | 4 +- Logtalk/examples/bricks/NOTES | 4 +- Logtalk/examples/bricks/SCRIPT | 4 +- Logtalk/examples/classvars/NOTES | 4 +- Logtalk/examples/classvars/SCRIPT | 4 +- Logtalk/examples/dcgs/NOTES | 4 +- Logtalk/examples/dcgs/SCRIPT | 4 +- Logtalk/examples/diamonds/NOTES | 4 +- Logtalk/examples/diamonds/SCRIPT | 4 +- Logtalk/examples/dynpred/NOTES | 4 +- Logtalk/examples/dynpred/SCRIPT | 4 +- Logtalk/examples/engines/NOTES | 4 +- Logtalk/examples/engines/SCRIPT | 4 +- Logtalk/examples/errors/NOTES | 4 +- Logtalk/examples/hello_world/NOTES | 4 +- Logtalk/examples/hello_world/SCRIPT | 4 +- Logtalk/examples/inheritance/NOTES | 4 +- Logtalk/examples/inheritance/SCRIPT | 4 +- Logtalk/examples/instmethods/NOTES | 4 +- Logtalk/examples/instmethods/SCRIPT | 4 +- Logtalk/examples/lo/NOTES | 4 +- Logtalk/examples/lo/planner/NOTES | 4 +- Logtalk/examples/lo/planner/SCRIPT | 4 +- Logtalk/examples/lo/travellers/NOTES | 4 +- Logtalk/examples/lo/travellers/SCRIPT | 4 +- Logtalk/examples/logic/NOTES | 4 +- Logtalk/examples/logic/SCRIPT | 4 +- Logtalk/examples/lpa/NOTES | 4 +- Logtalk/examples/lpa/SCRIPT | 4 +- Logtalk/examples/metainterpreters/NOTES | 4 +- Logtalk/examples/metainterpreters/SCRIPT | 4 +- Logtalk/examples/metapredicates/NOTES | 4 +- Logtalk/examples/metapredicates/SCRIPT | 4 +- Logtalk/examples/mi/NOTES | 4 +- Logtalk/examples/mi/SCRIPT | 4 +- Logtalk/examples/miscellaneous/NOTES | 4 +- Logtalk/examples/miscellaneous/SCRIPT | 4 +- Logtalk/examples/msglog/NOTES | 4 +- Logtalk/examples/msglog/SCRIPT | 4 +- Logtalk/examples/operators/NOTES | 4 +- Logtalk/examples/operators/SCRIPT | 4 +- Logtalk/examples/parametric/NOTES | 4 +- Logtalk/examples/parametric/SCRIPT | 4 +- Logtalk/examples/points/NOTES | 4 +- Logtalk/examples/points/SCRIPT | 4 +- Logtalk/examples/polygons/NOTES | 4 +- Logtalk/examples/polygons/SCRIPT | 4 +- Logtalk/examples/profiling/NOTES | 4 +- Logtalk/examples/profiling/SCRIPT | 4 +- Logtalk/examples/puzzles/NOTES | 4 +- Logtalk/examples/puzzles/SCRIPT | 4 +- Logtalk/examples/reflection/NOTES | 4 +- Logtalk/examples/reflection/SCRIPT | 4 +- Logtalk/examples/relations/NOTES | 4 +- Logtalk/examples/relations/SCRIPT | 4 +- Logtalk/examples/roots/NOTES | 4 +- Logtalk/examples/roots/SCRIPT | 4 +- Logtalk/examples/searching/NOTES | 4 +- Logtalk/examples/searching/SCRIPT | 4 +- Logtalk/examples/shapes/NOTES | 4 +- Logtalk/examples/shapes/ch/NOTES | 4 +- Logtalk/examples/shapes/ch/SCRIPT | 4 +- Logtalk/examples/shapes/ph/NOTES | 4 +- Logtalk/examples/shapes/ph/SCRIPT | 4 +- Logtalk/examples/sicstus/NOTES | 4 +- Logtalk/examples/sicstus/SCRIPT | 4 +- Logtalk/examples/symdiff/NOTES | 4 +- Logtalk/examples/symdiff/SCRIPT | 4 +- Logtalk/examples/viewpoints/NOTES | 4 +- Logtalk/examples/viewpoints/SCRIPT | 4 +- Logtalk/libpaths/NOTES | 4 +- Logtalk/libpaths/libpaths.pl | 5 +- Logtalk/library/NOTES | 4 +- Logtalk/library/SCRIPT | 4 +- Logtalk/library/all.notes | 4 +- Logtalk/library/assignvars.lgt | 114 +++++++++++++++ Logtalk/library/dates.notes | 4 +- Logtalk/library/debugging.notes | 4 +- Logtalk/library/dependents.notes | 4 +- Logtalk/library/events.notes | 4 +- Logtalk/library/experimental/NOTES | 4 +- Logtalk/library/hierarchies.notes | 4 +- Logtalk/library/metapredicates.notes | 4 +- Logtalk/library/random.notes | 4 +- Logtalk/library/types.notes | 4 +- Logtalk/manuals/NOTES | 4 +- Logtalk/manuals/index.html | 6 +- Logtalk/manuals/refman/directives/op3.html | 4 +- Logtalk/manuals/refman/index.html | 2 +- Logtalk/manuals/userman/index.html | 2 +- Logtalk/manuals/userman/predicates.html | 4 +- Logtalk/misc/NOTES | 4 +- Logtalk/misc/cplgtdirs.js | 4 +- Logtalk/misc/cplgtdirs.sh | 4 +- Logtalk/misc/debian/control | 2 +- Logtalk/misc/lgt_install.js | 4 +- Logtalk/misc/lgt_install.sh | 26 ++-- Logtalk/misc/logtalk.spec | 62 ++++---- Logtalk/misc/make_ciaolgt.js | 4 +- Logtalk/misc/make_ciaolgt.sh | 4 +- Logtalk/misc/make_eclipselgt.js | 4 +- Logtalk/misc/make_eclipselgt.sh | 4 +- Logtalk/misc/make_gplgt.js | 4 +- Logtalk/misc/make_gplgt.sh | 4 +- Logtalk/misc/make_qplgt.sh | 4 +- Logtalk/misc/make_sicstuslgt.js | 4 +- Logtalk/misc/make_sicstuslgt.sh | 4 +- Logtalk/misc/make_swilgt.js | 4 +- Logtalk/misc/make_swilgt.sh | 4 +- Logtalk/misc/make_xsblgt.sh | 4 +- Logtalk/misc/make_yaplgt.js | 4 +- Logtalk/misc/make_yaplgt.sh | 4 +- Logtalk/wenv/NOTES | 4 +- Logtalk/wenv/bbedit/NOTES | 4 +- Logtalk/wenv/crimson/NOTES | 4 +- Logtalk/wenv/emacs/NOTES | 4 +- Logtalk/wenv/jedit/NOTES | 4 +- Logtalk/wenv/kate/NOTES | 4 +- Logtalk/wenv/nedit/NOTES | 4 +- Logtalk/wenv/subethaedit/NOTES | 4 +- Logtalk/wenv/subethaedit2/NOTES | 4 +- Logtalk/wenv/tests/NOTES | 4 +- Logtalk/wenv/textmate/NOTES | 4 +- Logtalk/wenv/textpad/NOTES | 4 +- Logtalk/wenv/vim/NOTES | 4 +- Logtalk/wenv/xcode/NOTES | 4 +- Logtalk/xml/NOTES | 4 +- Logtalk/xml/html.sh | 4 +- Logtalk/xml/ie50.xsl | 4 +- Logtalk/xml/lgt2html.js | 4 +- Logtalk/xml/lgt2html.sh | 4 +- Logtalk/xml/lgt2pdf.js | 4 +- Logtalk/xml/lgt2pdf.sh | 4 +- Logtalk/xml/lgthtml.xsl | 4 +- Logtalk/xml/lgtpdfa4.xsl | 4 +- Logtalk/xml/lgtpdfus.xsl | 4 +- Logtalk/xml/lgtxhtml.xsl | 4 +- Logtalk/xml/lgtxml.xsl | 4 +- Logtalk/xml/logtalk.dtd | 4 +- Logtalk/xml/logtalk.xsd | 4 +- Logtalk/xml/pdf.sh | 4 +- Logtalk/xml/xhtml.sh | 4 +- library/logtalk/logtalk.pl | 161 ++++++++++----------- library/logtalk/yap.config | 2 +- 160 files changed, 838 insertions(+), 465 deletions(-) create mode 100644 Logtalk/examples/assignvars/NOTES create mode 100644 Logtalk/examples/assignvars/SCRIPT create mode 100644 Logtalk/examples/assignvars/fsm3.lgt create mode 100644 Logtalk/examples/assignvars/loader.lgt create mode 100644 Logtalk/examples/assignvars/rectangle3.lgt create mode 100644 Logtalk/library/assignvars.lgt diff --git a/Logtalk/INSTALL b/Logtalk/INSTALL index 9371e82c9..1a4e08994 100644 --- a/Logtalk/INSTALL +++ b/Logtalk/INSTALL @@ -1,36 +1,38 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= This file contains detailed instruction for installing and configuring -Logtalk. +Logtalk. You should also consult the "misc/NOTES" file for a description +of a set of shell scripts that might be used for Logtalk installation on +some operating-systems and for easy Logtalk integration with popular +Prolog compilers. 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. +Installing Logtalk can be as simple as decompressing the downloaded archive +and copying the resulting directory to a suitable location. This location +depends on the working environment and on the number of users. The Logtalk +directory can reside in any user accessible location. Whenever possible, it +is recommended that Logtalk be installed by a user with administrative rights, +as described below. This leads to a setup where each Logtalk user may 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 a single user: +* Installing for a single user with no administrative rights: -In the case of a single user, the Logtalk directory may simply be copied to -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. +In the case of a single user with no administrative rights, the Logtalk +directory may simply be copied to the user home directory. -* Installing for multiple users: +* Installing for one or more users by a user with administrative rights: 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 @@ -39,20 +41,26 @@ feasible or desired). 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 +see the "misc/NOTES" file). After running the appropriated script for your +operating-system, the second step will be to run the Prolog integration +scripts that you find on the "misc" sub-directory, assuming that your +favorite Prolog compilers are supported (if that is not the case, don't +worry: just follow the steps described in the "QUICK_START" file). The third +step is for each user to make a local copy of the Logtalk user-modifiable +files to its home directory. This allows each user to easily customize +Logtalk to its needs. These copies can be easily made by instructing end-users +to simply run the shell command "cplgtdirs" (the corresponding scripts are +described in the "misc/NOTES" file). + +The "misc/lgt_install.*" installation scripts make all files read-only in +order to avoid user tempering. This is a convenient setup for computer labs, +given that making directories world-writable is a security risk. Of course, +the local copies made by the "cplgtdirs" scripts have both read and write +permissions for the user running the script. + +When used with one of the Prolog compilers for which an integration script +is provided on the "misc" directory, this setup as the advantage of allowing +each end-user to independently customize default compilation options and library paths. @@ -89,14 +97,15 @@ If you use a bash shell, add the following lines to your ~/.profile file: When using the provided shell script for installing Logtalk, a symbolic link to the Logtalk installation directory is automatically created. The link is named "logtalk". In this case, you may use this symbolic link to define the -environment variable in order to avoid breaking it when upgrading Logtalk. +LOGTALKHOME 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" file (you will need to reboot after editing the file): - SET LOGTALKHOME=C:\your\installation\folder\ + SET LOGTALKHOME=C:\your\logtalk\installation\folder\ SET LOGTALKUSER=%HOMEPATH%\logtalk In Windows 2000/XP, environment variables are defined using the System @@ -112,11 +121,13 @@ script). 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 "$LOGTALKUSER/libpaths" directory you will find 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". +library paths. Assuming that you have used the "misc/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". 2.3 Customizing Prolog configuration files @@ -152,5 +163,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 -Prolog compilers that you intend to use. +compilers. In addition, be sure to read the "configs/NOTES" file notes on +the Prolog compilers that you intend to use. diff --git a/Logtalk/QUICK_START b/Logtalk/QUICK_START index 4b7571df7..f95300519 100644 --- a/Logtalk/QUICK_START +++ b/Logtalk/QUICK_START @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= @@ -10,7 +10,10 @@ Quick start =========== -1. Install Logtalk by following the instructions on the "INSTALL" file. +1. Install Logtalk by following the instructions on the "INSTALL" file. +Depending on your operating-system, working environment, and favorite +Prolog compiler, you may already have a shortcut installed for easily +running Logtalk. 2. Open the "manuals/index.html" file with a web browser. diff --git a/Logtalk/README b/Logtalk/README index c3f1a2e32..d733f3afd 100644 --- a/Logtalk/README +++ b/Logtalk/README @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/RELEASE_NOTES b/Logtalk/RELEASE_NOTES index 5548bbd17..7ee71c3c7 100644 --- a/Logtalk/RELEASE_NOTES +++ b/Logtalk/RELEASE_NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= @@ -10,6 +10,33 @@ RELEASE NOTES ============= +2.22.4 - January 12, 2005 + + Simplified method lookup cache tables, resulting in a small message + sending performance speedup. Improved method lookup caching for + parametric objects. Added support for caching method lookups for + parametric objects whose parameters contain cyclic terms. + + Added a new category, "assignvars", to the Logtalk standard library, + containing an adaptation of the implementation of logical assignable + variables developed by Nobukuni Kino. Added a new example, "assignvars", + illustrating some possible uses of assignable variables in the context + of parametric objects. + + Simplified compilation of op/3 directives: there is no longer need to + repeat the directives both before and inside an entity in order to make + the operators global and also use them in the compilation process. + + Simplified installation instructions. + + Corrected a compiler bug in the code that checks and prints a warning + when redefined parametric objects. + + Corrected a bug in the built-in predicate abolish_category/1, which + failed to delete import relation clauses between the category being + abolished and other categories. + + 2.22.3 - December 30, 2004 Added a configuration file for XSB 2.7. diff --git a/Logtalk/UPGRADING b/Logtalk/UPGRADING index 091203696..e2ba3ce90 100644 --- a/Logtalk/UPGRADING +++ b/Logtalk/UPGRADING @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/NOTES b/Logtalk/examples/NOTES index 32c811385..969ea3547 100644 --- a/Logtalk/examples/NOTES +++ b/Logtalk/examples/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= @@ -43,6 +43,9 @@ aliases example of using the alias/3 predicate directive to provide alternative names to inherited predicates in order to improve readability +assignvars + example of using assignable variables in the context of parametric objects + benchmarks simple benchmarks for for helping measuring performance of Logtalk message seding between Prolog compilers and for comparing message sending with diff --git a/Logtalk/examples/aliases/NOTES b/Logtalk/examples/aliases/NOTES index fd395ebde..11538d34a 100644 --- a/Logtalk/examples/aliases/NOTES +++ b/Logtalk/examples/aliases/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/aliases/SCRIPT b/Logtalk/examples/aliases/SCRIPT index bb4e3dba4..25c5051dd 100644 --- a/Logtalk/examples/aliases/SCRIPT +++ b/Logtalk/examples/aliases/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/assignvars/NOTES b/Logtalk/examples/assignvars/NOTES new file mode 100644 index 000000000..50f9acb36 --- /dev/null +++ b/Logtalk/examples/assignvars/NOTES @@ -0,0 +1,20 @@ +================================================================= +Logtalk - Object oriented extension to Prolog +Release 2.22.4 + +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. +================================================================= + + +To load this example and for sample queries, please see the SCRIPT file. + +This example illustrates the use of assignable variables and parametric +objects as alternative implementation to dynamic object predicates for +storing (backtracable) object state. For more information on assignable +variables please consult the URL: + + http://www.kprolog.com/en/logical_assignment/ + +The objects in this example make use of the library category "assignvars". +This category contains an adaptation of the pure logical subset implementation +of assignable variables by Nobukuni Kino, which can be found on the URL above. diff --git a/Logtalk/examples/assignvars/SCRIPT b/Logtalk/examples/assignvars/SCRIPT new file mode 100644 index 000000000..778c758aa --- /dev/null +++ b/Logtalk/examples/assignvars/SCRIPT @@ -0,0 +1,75 @@ +================================================================= +Logtalk - Object oriented extension to Prolog +Release 2.22.4 + +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. +================================================================= + + +% start by loading the "assignvars" category: + +| ?- logtalk_load(library(assignvars)). +... + + +% now you are ready for loading the example: + +| ?- logtalk_load(assignvars(loader)). +... + + +% rectangle example: + +?- rectangle(2, 3, _)::(init, position(X0, Y0), move(3, 7), position(X1, Y1), move(2, 5), position(X2, Y2)). + +X0 = 0 +Y0 = 0 +X1 = 3 +Y1 = 7 +X2 = 2 +Y2 = 5 + +Yes + + +% finite state machine example: + +| ?- fsm(T, I, F), fsm(T, I, F)::recognise([0,1,1,2,1,2,0]). + +red-0-red +red-1-green +green-1-yellow +yellow-2-red +red-1-green +green-2-red +red-0-red + +T = [red-0-red, red-1-green, red-2-red, yellow-0-red, yellow-1-green, yellow-2-red, green-0-yellow, ... -... -yellow, ... -...] +I = red +F = [red] + +Yes + + +% finite state machine example: + +| ?- fsm(T, I, F), !, fsm(T, I, F)::recognise([0,1,1,2,1,2,1,0]). + +red-0-red +red-1-green +green-1-yellow +yellow-2-red +red-1-green +green-2-red +red-1-green +green-0-yellow +backtracking... +backtracking... +backtracking... +backtracking... +backtracking... +backtracking... +backtracking... +backtracking... + +No diff --git a/Logtalk/examples/assignvars/fsm3.lgt b/Logtalk/examples/assignvars/fsm3.lgt new file mode 100644 index 000000000..217991ca9 --- /dev/null +++ b/Logtalk/examples/assignvars/fsm3.lgt @@ -0,0 +1,63 @@ + + +% fsm(Transitions, Initial, Final) +% +% fsm(-list, -nonvar, -list) + +fsm([red-0-red, red-1-green, red-2-red, % a simple finite state machine example + yellow-0-red, yellow-1-green, yellow-2-red, + green-0-yellow, green-1-yellow, green-2-red], + red, + [red]). + + +:- object(fsm(_transitions, _initial, _final), + imports(private::assignvars)). + + :- info([ + version is 1.0, + author is 'Paulo Moura', + date is 2005/1/8, + comment is 'A simple implementation of finite-state machines using assignable variables and parametric objects. Adapted from a similar example by Nobukuni Kino.', + parnames is ['Transitions', 'Initial state', 'Final states']]). + + :- public(recognise/1). + :- mode(recognise(+list), zero_or_more). + :- info(recognise/1, + [comment is 'Recognise a list of events.', + argnames is ['Events']]). + + recognise(Events) :- + parameter(2, Initial), + ::assignable(Current, Initial), + recognise(Events, Current). + + recognise([], State) :- + ::State => Current, + final_state(Current). + recognise([Event| Events], State) :- + ::State => Current, + transition(Event, Current, Next), + (write(Current-Event-Next), nl + ; + write('backtracking...'), nl, fail), + ::State <= Next, + recognise(Events, State). + + transition(Event, Current, Next) :- + parameter(1, Transitions), + transition(Transitions, Event, Current, Next). + + transition([Current-Event-Next| _], Event, Current, Next). + transition([_| Transitions], Event, Current, Next):- + transition(Transitions, Event, Current, Next). + + final_state(State) :- + parameter(3, Final), + final_state(Final, State). + + final_state([State| _], State). + final_state([_| States], State) :- + final_state(States, State). + +:- end_object. diff --git a/Logtalk/examples/assignvars/loader.lgt b/Logtalk/examples/assignvars/loader.lgt new file mode 100644 index 000000000..a9016d7d5 --- /dev/null +++ b/Logtalk/examples/assignvars/loader.lgt @@ -0,0 +1,5 @@ + +:- initialization( + logtalk_load([ + fsm3, + rectangle3])). diff --git a/Logtalk/examples/assignvars/rectangle3.lgt b/Logtalk/examples/assignvars/rectangle3.lgt new file mode 100644 index 000000000..8130f3d15 --- /dev/null +++ b/Logtalk/examples/assignvars/rectangle3.lgt @@ -0,0 +1,52 @@ + +:- object(rectangle(_width, _height, _position), + imports(private::assignvars)). + + :- info([ + version is 1.0, + author is 'Paulo Moura', + date is 2005/1/8, + comment is 'A simple implementation of a geometric rectangle using assignable variables and parametric objects.', + parnames is ['Width', 'Height', 'Position']]). + + :- public(init/0). + :- mode(init, one). + :- info(init/0, + [comment is 'Initialize rectangle position.']). + + :- public(area/1). + :- mode(area(-integer), one). + :- info(area/1, + [comment is 'Rectangle area.', + argnames is ['Area']]). + + :- public(move/2). + :- mode(move(+integer, +integer), one). + :- info(move/2, [ + comment is 'Moves a rectangle to a new position.', + argnames is ['X', 'Y']]). + + :- public(position/2). + :- mode(position(?integer, ?integer), zero_or_one). + :- info(position/2, [ + comment is 'Rectangle current position.', + argnames is ['X', 'Y']]). + + init :- + parameter(3, Position), + ::assignable(Position, (0, 0)). + + area(Area) :- + parameter(1, Width), + parameter(2, Height), + Area is Width*Height. + + move(X, Y) :- + parameter(3, Position), + ::Position <= (X, Y). + + position(X, Y) :- + parameter(3, Position), + ::Position => (X, Y). + +:- end_object. diff --git a/Logtalk/examples/benchmarks/NOTES b/Logtalk/examples/benchmarks/NOTES index 039aa5099..afa9514d3 100644 --- a/Logtalk/examples/benchmarks/NOTES +++ b/Logtalk/examples/benchmarks/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= @@ -32,3 +32,7 @@ This example is made of four source files: contains the same definition of a list length predicate encapsulated in an object +The Prolog files above are loaded (from the loader.lgt file) by using +ensure_loaded/1 directives. If this directive is not supported on your +Prolog compiler, replace them by calls to the built-in predicate used +by your compiler to load Prolog code. diff --git a/Logtalk/examples/benchmarks/SCRIPT b/Logtalk/examples/benchmarks/SCRIPT index eb22ed534..8f3d4ae51 100644 --- a/Logtalk/examples/benchmarks/SCRIPT +++ b/Logtalk/examples/benchmarks/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/birds/NOTES b/Logtalk/examples/birds/NOTES index e9194c059..2a90b1917 100644 --- a/Logtalk/examples/birds/NOTES +++ b/Logtalk/examples/birds/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/birds/SCRIPT b/Logtalk/examples/birds/SCRIPT index 61ac2623b..b453f1139 100644 --- a/Logtalk/examples/birds/SCRIPT +++ b/Logtalk/examples/birds/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/bricks/NOTES b/Logtalk/examples/bricks/NOTES index 076356ae0..e7680deb4 100644 --- a/Logtalk/examples/bricks/NOTES +++ b/Logtalk/examples/bricks/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/bricks/SCRIPT b/Logtalk/examples/bricks/SCRIPT index ff9713a92..31dc1aff3 100644 --- a/Logtalk/examples/bricks/SCRIPT +++ b/Logtalk/examples/bricks/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/classvars/NOTES b/Logtalk/examples/classvars/NOTES index 35e79a31d..e4baf0623 100644 --- a/Logtalk/examples/classvars/NOTES +++ b/Logtalk/examples/classvars/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/classvars/SCRIPT b/Logtalk/examples/classvars/SCRIPT index e7310de71..2ae51eb74 100644 --- a/Logtalk/examples/classvars/SCRIPT +++ b/Logtalk/examples/classvars/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/dcgs/NOTES b/Logtalk/examples/dcgs/NOTES index f40dc5b7c..1101525a4 100644 --- a/Logtalk/examples/dcgs/NOTES +++ b/Logtalk/examples/dcgs/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/dcgs/SCRIPT b/Logtalk/examples/dcgs/SCRIPT index 761dc7e39..9718c4ed7 100644 --- a/Logtalk/examples/dcgs/SCRIPT +++ b/Logtalk/examples/dcgs/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/diamonds/NOTES b/Logtalk/examples/diamonds/NOTES index 672b7d4f4..7122ec50b 100644 --- a/Logtalk/examples/diamonds/NOTES +++ b/Logtalk/examples/diamonds/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/diamonds/SCRIPT b/Logtalk/examples/diamonds/SCRIPT index abe30a511..a4f4cef42 100644 --- a/Logtalk/examples/diamonds/SCRIPT +++ b/Logtalk/examples/diamonds/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/dynpred/NOTES b/Logtalk/examples/dynpred/NOTES index 2bb889f3c..4b7c684cd 100644 --- a/Logtalk/examples/dynpred/NOTES +++ b/Logtalk/examples/dynpred/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/dynpred/SCRIPT b/Logtalk/examples/dynpred/SCRIPT index dbd75e415..cdfb2daa4 100644 --- a/Logtalk/examples/dynpred/SCRIPT +++ b/Logtalk/examples/dynpred/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/engines/NOTES b/Logtalk/examples/engines/NOTES index b30badb5d..509ee8368 100644 --- a/Logtalk/examples/engines/NOTES +++ b/Logtalk/examples/engines/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/engines/SCRIPT b/Logtalk/examples/engines/SCRIPT index 7bb7cf398..a25dfca3c 100644 --- a/Logtalk/examples/engines/SCRIPT +++ b/Logtalk/examples/engines/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/errors/NOTES b/Logtalk/examples/errors/NOTES index 2a001f967..3b22ef6e8 100644 --- a/Logtalk/examples/errors/NOTES +++ b/Logtalk/examples/errors/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/hello_world/NOTES b/Logtalk/examples/hello_world/NOTES index 24bff9805..118f31948 100644 --- a/Logtalk/examples/hello_world/NOTES +++ b/Logtalk/examples/hello_world/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/hello_world/SCRIPT b/Logtalk/examples/hello_world/SCRIPT index b6198937b..9fda8ae72 100644 --- a/Logtalk/examples/hello_world/SCRIPT +++ b/Logtalk/examples/hello_world/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/inheritance/NOTES b/Logtalk/examples/inheritance/NOTES index 46f9148fa..6956c13ed 100644 --- a/Logtalk/examples/inheritance/NOTES +++ b/Logtalk/examples/inheritance/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/inheritance/SCRIPT b/Logtalk/examples/inheritance/SCRIPT index 13001c0a3..849329806 100644 --- a/Logtalk/examples/inheritance/SCRIPT +++ b/Logtalk/examples/inheritance/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/instmethods/NOTES b/Logtalk/examples/instmethods/NOTES index ea0eec5d7..7ff97647c 100644 --- a/Logtalk/examples/instmethods/NOTES +++ b/Logtalk/examples/instmethods/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/instmethods/SCRIPT b/Logtalk/examples/instmethods/SCRIPT index 64b23b51d..1e87f6ffe 100644 --- a/Logtalk/examples/instmethods/SCRIPT +++ b/Logtalk/examples/instmethods/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/lo/NOTES b/Logtalk/examples/lo/NOTES index 1dde01c5d..2409efbcf 100644 --- a/Logtalk/examples/lo/NOTES +++ b/Logtalk/examples/lo/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/lo/planner/NOTES b/Logtalk/examples/lo/planner/NOTES index 0c853d150..5edc3c47c 100644 --- a/Logtalk/examples/lo/planner/NOTES +++ b/Logtalk/examples/lo/planner/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/lo/planner/SCRIPT b/Logtalk/examples/lo/planner/SCRIPT index cec11bbe3..94722072e 100644 --- a/Logtalk/examples/lo/planner/SCRIPT +++ b/Logtalk/examples/lo/planner/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/lo/travellers/NOTES b/Logtalk/examples/lo/travellers/NOTES index 0c853d150..5edc3c47c 100644 --- a/Logtalk/examples/lo/travellers/NOTES +++ b/Logtalk/examples/lo/travellers/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/lo/travellers/SCRIPT b/Logtalk/examples/lo/travellers/SCRIPT index 8054e49ec..3cf81677a 100644 --- a/Logtalk/examples/lo/travellers/SCRIPT +++ b/Logtalk/examples/lo/travellers/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/logic/NOTES b/Logtalk/examples/logic/NOTES index 4b36c2b75..6eabab848 100644 --- a/Logtalk/examples/logic/NOTES +++ b/Logtalk/examples/logic/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/logic/SCRIPT b/Logtalk/examples/logic/SCRIPT index 096c59b25..df4ca85c5 100644 --- a/Logtalk/examples/logic/SCRIPT +++ b/Logtalk/examples/logic/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/lpa/NOTES b/Logtalk/examples/lpa/NOTES index d86773ae4..fe2ca6f4a 100644 --- a/Logtalk/examples/lpa/NOTES +++ b/Logtalk/examples/lpa/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/lpa/SCRIPT b/Logtalk/examples/lpa/SCRIPT index b743f1ace..f34aa7c96 100644 --- a/Logtalk/examples/lpa/SCRIPT +++ b/Logtalk/examples/lpa/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/metainterpreters/NOTES b/Logtalk/examples/metainterpreters/NOTES index 5dc844fdc..82f832498 100644 --- a/Logtalk/examples/metainterpreters/NOTES +++ b/Logtalk/examples/metainterpreters/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/metainterpreters/SCRIPT b/Logtalk/examples/metainterpreters/SCRIPT index 05aa9fcf9..b5b546fd6 100644 --- a/Logtalk/examples/metainterpreters/SCRIPT +++ b/Logtalk/examples/metainterpreters/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/metapredicates/NOTES b/Logtalk/examples/metapredicates/NOTES index 97f710e99..10c81f525 100644 --- a/Logtalk/examples/metapredicates/NOTES +++ b/Logtalk/examples/metapredicates/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/metapredicates/SCRIPT b/Logtalk/examples/metapredicates/SCRIPT index 3d8f05d28..fca71a93b 100644 --- a/Logtalk/examples/metapredicates/SCRIPT +++ b/Logtalk/examples/metapredicates/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/mi/NOTES b/Logtalk/examples/mi/NOTES index 284b99ea2..620a67da9 100644 --- a/Logtalk/examples/mi/NOTES +++ b/Logtalk/examples/mi/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/mi/SCRIPT b/Logtalk/examples/mi/SCRIPT index fd0976d52..e9e28d0c1 100644 --- a/Logtalk/examples/mi/SCRIPT +++ b/Logtalk/examples/mi/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/miscellaneous/NOTES b/Logtalk/examples/miscellaneous/NOTES index cf96a58f3..e5ed32570 100644 --- a/Logtalk/examples/miscellaneous/NOTES +++ b/Logtalk/examples/miscellaneous/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/miscellaneous/SCRIPT b/Logtalk/examples/miscellaneous/SCRIPT index 1c1fc4db7..3be2ed4e8 100644 --- a/Logtalk/examples/miscellaneous/SCRIPT +++ b/Logtalk/examples/miscellaneous/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/msglog/NOTES b/Logtalk/examples/msglog/NOTES index 804157325..44d0d95b1 100644 --- a/Logtalk/examples/msglog/NOTES +++ b/Logtalk/examples/msglog/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/msglog/SCRIPT b/Logtalk/examples/msglog/SCRIPT index 98c1c93bb..8f7fa732e 100644 --- a/Logtalk/examples/msglog/SCRIPT +++ b/Logtalk/examples/msglog/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/operators/NOTES b/Logtalk/examples/operators/NOTES index 50c3db842..4cae58793 100644 --- a/Logtalk/examples/operators/NOTES +++ b/Logtalk/examples/operators/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/operators/SCRIPT b/Logtalk/examples/operators/SCRIPT index 3a3334340..fc98f87df 100644 --- a/Logtalk/examples/operators/SCRIPT +++ b/Logtalk/examples/operators/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/parametric/NOTES b/Logtalk/examples/parametric/NOTES index d7cb378b9..359609ec1 100644 --- a/Logtalk/examples/parametric/NOTES +++ b/Logtalk/examples/parametric/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/parametric/SCRIPT b/Logtalk/examples/parametric/SCRIPT index f37f28651..7a76004df 100644 --- a/Logtalk/examples/parametric/SCRIPT +++ b/Logtalk/examples/parametric/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/points/NOTES b/Logtalk/examples/points/NOTES index 43193529f..e005b5cf3 100644 --- a/Logtalk/examples/points/NOTES +++ b/Logtalk/examples/points/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/points/SCRIPT b/Logtalk/examples/points/SCRIPT index a28f977bf..4f2ecceb1 100644 --- a/Logtalk/examples/points/SCRIPT +++ b/Logtalk/examples/points/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/polygons/NOTES b/Logtalk/examples/polygons/NOTES index 2d4da35bc..17fbaeb04 100644 --- a/Logtalk/examples/polygons/NOTES +++ b/Logtalk/examples/polygons/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/polygons/SCRIPT b/Logtalk/examples/polygons/SCRIPT index 846897cf1..01435f361 100644 --- a/Logtalk/examples/polygons/SCRIPT +++ b/Logtalk/examples/polygons/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/profiling/NOTES b/Logtalk/examples/profiling/NOTES index afd84e7b4..ea743d697 100644 --- a/Logtalk/examples/profiling/NOTES +++ b/Logtalk/examples/profiling/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/profiling/SCRIPT b/Logtalk/examples/profiling/SCRIPT index 174b1f8ab..ebecc3c60 100644 --- a/Logtalk/examples/profiling/SCRIPT +++ b/Logtalk/examples/profiling/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/puzzles/NOTES b/Logtalk/examples/puzzles/NOTES index 59c5df387..5788ddfc8 100644 --- a/Logtalk/examples/puzzles/NOTES +++ b/Logtalk/examples/puzzles/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/puzzles/SCRIPT b/Logtalk/examples/puzzles/SCRIPT index 6c383a59d..b848ca0e7 100644 --- a/Logtalk/examples/puzzles/SCRIPT +++ b/Logtalk/examples/puzzles/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/reflection/NOTES b/Logtalk/examples/reflection/NOTES index be834d4f2..bda92e5ec 100644 --- a/Logtalk/examples/reflection/NOTES +++ b/Logtalk/examples/reflection/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/reflection/SCRIPT b/Logtalk/examples/reflection/SCRIPT index 52d4051e9..88efb72fc 100644 --- a/Logtalk/examples/reflection/SCRIPT +++ b/Logtalk/examples/reflection/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/relations/NOTES b/Logtalk/examples/relations/NOTES index eb7c43e61..334b53fff 100644 --- a/Logtalk/examples/relations/NOTES +++ b/Logtalk/examples/relations/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/relations/SCRIPT b/Logtalk/examples/relations/SCRIPT index 447b8b64d..e4040c01c 100644 --- a/Logtalk/examples/relations/SCRIPT +++ b/Logtalk/examples/relations/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/roots/NOTES b/Logtalk/examples/roots/NOTES index ead034f28..5be714195 100644 --- a/Logtalk/examples/roots/NOTES +++ b/Logtalk/examples/roots/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/roots/SCRIPT b/Logtalk/examples/roots/SCRIPT index 64cb4fa36..20d946ed1 100644 --- a/Logtalk/examples/roots/SCRIPT +++ b/Logtalk/examples/roots/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/searching/NOTES b/Logtalk/examples/searching/NOTES index 40ecec657..aa920ec4b 100644 --- a/Logtalk/examples/searching/NOTES +++ b/Logtalk/examples/searching/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/searching/SCRIPT b/Logtalk/examples/searching/SCRIPT index b2e2153ba..4ff021e66 100644 --- a/Logtalk/examples/searching/SCRIPT +++ b/Logtalk/examples/searching/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/shapes/NOTES b/Logtalk/examples/shapes/NOTES index 5c9d5d556..ce636506b 100644 --- a/Logtalk/examples/shapes/NOTES +++ b/Logtalk/examples/shapes/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/shapes/ch/NOTES b/Logtalk/examples/shapes/ch/NOTES index 43961b700..52cd2186a 100644 --- a/Logtalk/examples/shapes/ch/NOTES +++ b/Logtalk/examples/shapes/ch/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/shapes/ch/SCRIPT b/Logtalk/examples/shapes/ch/SCRIPT index 407c75ba1..f1e9e6ae8 100644 --- a/Logtalk/examples/shapes/ch/SCRIPT +++ b/Logtalk/examples/shapes/ch/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/shapes/ph/NOTES b/Logtalk/examples/shapes/ph/NOTES index 0c853d150..5edc3c47c 100644 --- a/Logtalk/examples/shapes/ph/NOTES +++ b/Logtalk/examples/shapes/ph/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/shapes/ph/SCRIPT b/Logtalk/examples/shapes/ph/SCRIPT index 2a2d99477..f43291a1a 100644 --- a/Logtalk/examples/shapes/ph/SCRIPT +++ b/Logtalk/examples/shapes/ph/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/sicstus/NOTES b/Logtalk/examples/sicstus/NOTES index 867ca2cdb..45f2da65c 100644 --- a/Logtalk/examples/sicstus/NOTES +++ b/Logtalk/examples/sicstus/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/sicstus/SCRIPT b/Logtalk/examples/sicstus/SCRIPT index 9f99b4ecd..10a253583 100644 --- a/Logtalk/examples/sicstus/SCRIPT +++ b/Logtalk/examples/sicstus/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/symdiff/NOTES b/Logtalk/examples/symdiff/NOTES index a94377f89..49ca3fcbd 100644 --- a/Logtalk/examples/symdiff/NOTES +++ b/Logtalk/examples/symdiff/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/symdiff/SCRIPT b/Logtalk/examples/symdiff/SCRIPT index 03ea98f99..fa8924d2d 100644 --- a/Logtalk/examples/symdiff/SCRIPT +++ b/Logtalk/examples/symdiff/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/viewpoints/NOTES b/Logtalk/examples/viewpoints/NOTES index 2944f9dc5..4765e66f7 100644 --- a/Logtalk/examples/viewpoints/NOTES +++ b/Logtalk/examples/viewpoints/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/examples/viewpoints/SCRIPT b/Logtalk/examples/viewpoints/SCRIPT index 8d84dd6f8..d3eac7ed9 100644 --- a/Logtalk/examples/viewpoints/SCRIPT +++ b/Logtalk/examples/viewpoints/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/libpaths/NOTES b/Logtalk/libpaths/NOTES index d53e5bd18..7d7e9a8b4 100644 --- a/Logtalk/libpaths/NOTES +++ b/Logtalk/libpaths/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= This folder contains a Prolog file, "libpaths.pl", which, when loaded, diff --git a/Logtalk/libpaths/libpaths.pl b/Logtalk/libpaths/libpaths.pl index efd5f7f85..1c5dbe5f2 100644 --- a/Logtalk/libpaths/libpaths.pl +++ b/Logtalk/libpaths/libpaths.pl @@ -2,15 +2,16 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Logtalk - Object oriented extension to Prolog -% Release 2.22.3 +% Release 2.22.4 % -% Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +% Copyright (c) 1998-2005 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(assignvars, '$LOGTALKUSER/examples/assignvars/')), assertz(logtalk_library_path(benchmarks, '$LOGTALKUSER/examples/benchmarks/')), assertz(logtalk_library_path(birds, '$LOGTALKUSER/examples/birds/')), assertz(logtalk_library_path(bricks, '$LOGTALKUSER/examples/bricks/')), diff --git a/Logtalk/library/NOTES b/Logtalk/library/NOTES index 1e8d0b0f4..3efab50c3 100644 --- a/Logtalk/library/NOTES +++ b/Logtalk/library/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/SCRIPT b/Logtalk/library/SCRIPT index d9eff59d3..4583310d6 100644 --- a/Logtalk/library/SCRIPT +++ b/Logtalk/library/SCRIPT @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/all.notes b/Logtalk/library/all.notes index 8aaeb8303..db758d058 100644 --- a/Logtalk/library/all.notes +++ b/Logtalk/library/all.notes @@ -1,9 +1,9 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/assignvars.lgt b/Logtalk/library/assignvars.lgt new file mode 100644 index 000000000..3f2dc0e74 --- /dev/null +++ b/Logtalk/library/assignvars.lgt @@ -0,0 +1,114 @@ + +/* +This file contains an adaptation to Logtalk of code for logical assignment +of Prolog terms developed by Nobukuni Kino. For more information, please +consult the URL http://www.kprolog.com/en/logical_assignment/ + +As a derivative work, this file is licensed under the Open Software License +version 2.1 (http://opensource.org/licenses/osl-2.1.php). +*/ + + +:-op(100, xfx, '<='). +:-op(100, xfx, '=>'). + + +:- category(assignvars). + + + :- info([ + version is 1.0, + author is 'Nobukuni Kino and Paulo Moura', + date is 2005/1/7, + comment is 'Assignable variables (supporting logical, backtracable assignement of non-variable terms).']). + + + :- public(assignable/1). + :- mode(assignable(-assignvar), one). + :- info(assignable/1, [ + comment is 'Makes Variable an assignable variable. Initial state will be empty.', + argnames is ['Variable'], + exceptions is [ + 'Variable is not a variable' - type_error(variable, 'Variable')]]). + + :- public(assignable/2). + :- mode(assignable(-assignvar, @nonvar), one). + :- info(assignable/2, [ + comment is 'Makes Variable an assignable variable and sets its initial state to Value.', + argnames is ['Variable', 'Value'], + exceptions is [ + 'Variable is not a variable' - type_error(variable, 'Variable'), + 'Value is not instantiated' - instantiation_error]]). + + :- public((<=)/2). + :- mode(<=(?assignvar, @nonvar), one). + :- info((<=)/2, [ + comment is 'Sets the state of the assignable variable Variable to Value (initializing the variable if needed).', + argnames is ['Variable', 'Value'], + exceptions is [ + 'Value is not instantiated' - instantiation_error]]). + + :- public((=>)/2). + :- mode(=>(+assignvar, ?nonvar), zero_or_one). + :- info((=>)/2, [ + comment is 'Unifies Value with the current state of the assignable variable Variable.', + argnames is ['Variable', 'Value'], + exceptions is [ + 'Variable is not instantiated' - instantiation_error]]). + + + :-op(100, xfx, <=). + :-op(100, xfx, =>). + + + assignable(Assig) :- + nonvar(Assig), + self(Self), + sender(Sender), + throw(error(type_error(variable, Assig), Self::assignable(Assig), Sender)). + + assignable([_| _]). + + + assignable(Assig, Init) :- + nonvar(Assig), + self(Self), + sender(Sender), + throw(error(type_error(variable, Assig), Self::assignable(Assig, Init), Sender)). + + assignable(Assig, Init) :- + var(Init), + self(Self), + sender(Sender), + throw(error(instantiation_error, Self::assignable(Assig, Init), Sender)). + + assignable([_, Init| _], Init). + + + Assig <= Value :- + var(Value), + self(Self), + sender(Sender), + throw(error(instantiation_error, Self::Assig <= Value, Sender)). + + [_| Tail] <= Value :- + nonvar(Tail) -> + Tail <= Value + ; + Tail = [Value| _]. + + + Assig => Value :- + var(Assig), + self(Self), + sender(Sender), + throw(error(instantiation_error, Self::Assig => Value, Sender)). + + [Current| Tail] => Value :- + nonvar(Tail) -> + Tail => Value + ; + Current = Value. + + +:- end_category. diff --git a/Logtalk/library/dates.notes b/Logtalk/library/dates.notes index 24d3aa8a0..be5b893af 100644 --- a/Logtalk/library/dates.notes +++ b/Logtalk/library/dates.notes @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/debugging.notes b/Logtalk/library/debugging.notes index 85be4322b..70f4de28a 100644 --- a/Logtalk/library/debugging.notes +++ b/Logtalk/library/debugging.notes @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/dependents.notes b/Logtalk/library/dependents.notes index 1f4c09863..85dcb9923 100644 --- a/Logtalk/library/dependents.notes +++ b/Logtalk/library/dependents.notes @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/events.notes b/Logtalk/library/events.notes index 91f2ee8cc..af99de9b8 100644 --- a/Logtalk/library/events.notes +++ b/Logtalk/library/events.notes @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/experimental/NOTES b/Logtalk/library/experimental/NOTES index 19a528c04..dac69123e 100644 --- a/Logtalk/library/experimental/NOTES +++ b/Logtalk/library/experimental/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= This folder contains objects, categories, and protocols whose diff --git a/Logtalk/library/hierarchies.notes b/Logtalk/library/hierarchies.notes index 7364acf92..2866a64a7 100644 --- a/Logtalk/library/hierarchies.notes +++ b/Logtalk/library/hierarchies.notes @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/metapredicates.notes b/Logtalk/library/metapredicates.notes index 2ad669392..dda3b141d 100644 --- a/Logtalk/library/metapredicates.notes +++ b/Logtalk/library/metapredicates.notes @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/random.notes b/Logtalk/library/random.notes index 14b285062..fa79b6636 100644 --- a/Logtalk/library/random.notes +++ b/Logtalk/library/random.notes @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/library/types.notes b/Logtalk/library/types.notes index 58a176e09..98264975d 100644 --- a/Logtalk/library/types.notes +++ b/Logtalk/library/types.notes @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= diff --git a/Logtalk/manuals/NOTES b/Logtalk/manuals/NOTES index 6e71259b5..efee06a3e 100644 --- a/Logtalk/manuals/NOTES +++ b/Logtalk/manuals/NOTES @@ -1,8 +1,8 @@ ================================================================= Logtalk - Object oriented extension to Prolog -Release 2.22.3 +Release 2.22.4 -Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved. +Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved. ================================================================= To consult the Logtalk documentation open the file index.html with a diff --git a/Logtalk/manuals/index.html b/Logtalk/manuals/index.html index f403571b4..720b1b817 100644 --- a/Logtalk/manuals/index.html +++ b/Logtalk/manuals/index.html @@ -8,7 +8,7 @@ - Logtalk 2.22.3 Documentation + Logtalk 2.22.4 Documentation @@ -18,7 +18,7 @@   -

Logtalk 2.22.3 Documentation

+

Logtalk 2.22.4 Documentation