Logtalk 2.14.7 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@738 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura 2003-01-09 21:29:22 +00:00
parent cd168fe956
commit 5a0c5b8ce1
87 changed files with 346 additions and 287 deletions

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
@ -10,6 +10,20 @@ RELEASE NOTES
=============
2.14.7 - January 10, 2003
Corrected a bug in the built-in methods asserta/1 and assertz/1 when
asserting predicate rules.
The built-in predicates logtalk_compile/1-2 and logtalk_load/1-2 now
accept both an entity (an atom) or a list of entities (a list of atoms).
Optimized the code generated when compiling or asserting clauses for
dynamic predicates.
Optimized protected inheritance performance on some Prolog compilers.
2.14.6 - December 31, 2002
Corrected a bug where the opening directive of an object that,

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
@ -49,3 +49,6 @@ Logtalk version 2.14.5 changes compiled code in order to correct a bug
where sending messages such as true/0 to an unknown object will succeeded
instead of throwing the expected exception, impliying recompilation of all
objects, protocols, and categories.
Logtalk version 2.14.7 changes compiled code in order to optimize the
code generated by the compilation of dynamic predicate clauses.

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
This folder contains several examples of Logtalk programs. Most of

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the bricks.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the classvars.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all entities in this example consult the warnings.loader and

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the inheritance.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the instmethods.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
The examples in this folder are adopted from the Logic&Objects system

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this library consult the planner.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this library consult the travellers.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
This example is an adaptation of a LPA Prolog++ example that is

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this library consult the metapredicates.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the mi.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this library consult the miscellaneous.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load most objects in this example consult the parametric.loader

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the polygons.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the reflection.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this library consult the relations.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the searching.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
The examples in this folder are adopted from the SICStus Prolog manual.

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the symdiff.loader utility

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To load all objects in this example consult the viewpoints.loader utility
@ -16,7 +16,7 @@ sharing and value sharing in Logtalk by calling the built-in predicate
modification methods asserta/1, assertz/1 and retract/1 either in the
context of "this" or in the context of "self".
In this example we have a prototype named joePerson, containing general data
on joe like its age, name or address, and three descendants/viewpoints named
joeSportsman, joeEmployee, and joeFilmEnthusiast. Each descendant contains
data related to a particular viewpoint about joe.
In this example we have a prototype named joePerson, containing general
data on joe like its age, name or address, and three descendants/viewpoints
named joeSportsman, joeEmployee, joeChessPlayer, and joeFilmEnthusiast. Each
descendant contains data related to a particular viewpoint about joe.

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
@ -23,25 +23,25 @@ Age = 30
yes
% now let's tell joe to grow old:
% now let's tell joe to get older:
| ?- joePerson::growOld.
| ?- joePerson::getOlder.
yes
% we can verify the effect of the above message from any of the viewpoints:
| ?- joeFilmEnthusiast::age(Age).
| ?- joeChessPlayer::age(Age).
Age = 31
yes
% because the growOld/0 and the age/1 predicates are implemented using
% property sharing, we can send the growOld message to any viewpoint:
% property sharing, we can send the getOlder/0 message to any viewpoint:
| ?- joeEmployee::growOld.
| ?- joeEmployee::getOlder.
yes
@ -59,42 +59,38 @@ yes
% descendant, its the predicate age/1 in the parent that got updated
% to illustrate value sharing we use a couple of predicates, counter/1 and
% incCounter/0, defined in joePerson:
% to illustrate value sharing we use a couple of predicates, score/1 and
% setScore/0, defined in joePerson:
| ?- joePerson::counter(Counter).
| ?- joePerson::score(Score).
Counter = 0
Score = 0
yes
% initially, counter/1 is only defined for joePerson, so every descendant
% initially, score/1 is only defined for joePerson, so every descendant
% or viewpoint will share its value/definition:
| ?- joeSportsman::counter(Counter).
| ?- joeEmployee::score(Score).
Counter = 0
Score = 0
yes
% but if we decide to increment the counter by sending the incCounter/0
% but if we decide to increment the counter by sending the setScore/0
% message to a descendant:
| ?- joeFilmEnthusiast::incCounter.
| ?- joeChessPlayer::(setScore(2200), score(Score)).
yes
| ?- joeFilmEnthusiast::counter(Counter).
Counter = 1
Score = 2200
yes
% then the descendant will now have a local definition for counter/1,
% independent of the definition in its parent, joePerson:
| ?- joePerson::counter(Counter).
| ?- joePerson::score(Score).
Counter = 0
yes
@ -103,7 +99,7 @@ yes
% the other descendants/viewpoints will continue to share the definition
% in joePerson:
| ?- joeSportsman::counter(Counter).
| ?- joeSportsman::score(Score).
Counter = 0
yes

View File

@ -2,7 +2,7 @@
:- object(joePerson).
:- public(growOld/0).
:- public(getOlder/0).
:- public(address/1).
@ -13,13 +13,13 @@
:- public(phone/1).
:- public(counter/1).
:- dynamic(counter/1).
:- public(score/1).
:- dynamic(score/1).
:- public(incCounter/0).
:- public(setScore/1).
growOld :-
getOlder :-
retract(age(Old)),
New is Old + 1,
asserta(age(New)).
@ -37,16 +37,12 @@
phone(11-11-11-11).
counter(0).
score(0).
incCounter :-
(::retract(counter(Old)) ->
true
;
Old = 0),
New is Old + 1,
::asserta(counter(New)).
setScore(Score) :-
::retractall(score(_)),
::asserta(score(Score)).
:- end_object.

View File

@ -3,13 +3,14 @@
extends(joePerson)).
:- public(sport/1).
:- public(stamina/1).
:- public(weight/1).
stamina(30).
sport(snowboard).
stamina(30).
weight(111).

View File

@ -4,4 +4,5 @@
joePerson,
joeEmployee,
joeFilmEnthusiast,
joeSportsman])).
joeSportsman,
joeChessPlayer])).

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
This folder contains objects, categories, and protocols that implement

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================
To consult the Logtalk documentation open the file index.html with a

View File

@ -7,14 +7,14 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Logtalk 2.14.6 Documentation</title>
<title>Logtalk 2.14.7 Documentation</title>
<link rel="stylesheet" href="styles.css" type="text/css" />
</head>
<body>
<hr />
<h1 class="center">Logtalk 2.14.6</h1>
<h1 class="center">Logtalk 2.14.7</h1>
<h3 class="center">Documentation</h3>
<p class="center">
@ -45,7 +45,7 @@
<hr />
<p class="center">
Last updated on: December 31, 2002
Last updated on: January 10, 2003
</p>
<p class="center">
<a href="http://validator.w3.org/check/referer"><img src="valid-xhtml10.png" alt="Valid XHTML 1.0!" width="88" height="31" /></a>

View File

@ -21,10 +21,11 @@
<blockquote>
<pre>
logtalk_compile(Entity)
logtalk_compile(Entities)
</pre>
<p>
Compiles to disk a list of entities (objects, protocols, or categories) using the default compiler options specified in the Logtalk configuration file. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the argument is a list of entity/file names, not file paths. In other words, the files must exist in your current working directory.
Compiles to disk an entity or a list of entities (objects, protocols, or categories) using the default compiler options specified in the Logtalk configuration file. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the argument is a list of entity/file names, not file paths. In other words, the files must exist in your current working directory.
</p>
<p>
Note that only the errors related to problems in the predicate argument are listed below. Other exceptions may be thrown by the compiler if any of the compiled entities contain errors.
@ -35,7 +36,7 @@ Note that only the errors related to problems in the predicate argument are list
<blockquote>
<pre>
logtalk_compile(+atom_list)
logtalk_compile(@atom_or_atom_list)
</pre>
</blockquote>
@ -43,13 +44,15 @@ logtalk_compile(+atom_list)
<blockquote>
<dl>
<dt>Entities is a variable:</dt>
<dt>Entity is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor a proper list:</dt>
<dt>Entities is a variable or a list with an element which is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor an atom nor a proper list:</dt>
<dd><code>type_error(list, Entities)</code></dd>
<dt>One of the entities is not an atom:</dt>
<dt>An element Entity of the Entities list is neither a variable nor an atom:</dt>
<dd><code>type_error(atom, Entity)</code></dd>
<dt>One of the entities does not exist in the current working directory:</dt>
<dt>Entity or an element Entity of the Entities list does not exist in the current working directory:</dt>
<dd><code>existence_error(entity, Entity)</code></dd>
</dl>
</blockquote>
@ -58,7 +61,7 @@ logtalk_compile(+atom_list)
<blockquote>
<pre>
| ?- logtalk_compile([tree]).
| ?- logtalk_compile(tree).
| ?- logtalk_compile([listp, list]).
</pre>
@ -69,7 +72,7 @@ logtalk_compile(+atom_list)
<strong><a href="define_events5.html">Previous</a> | <a href="logtalk_compile2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: August 6, 2002
Last updated on: January 10, 2003
</p>
<hr />

View File

@ -21,10 +21,11 @@
<blockquote>
<pre>
logtalk_compile(Entity, Options)
logtalk_compile(Entities, Options)
</pre>
<p>
Compiles to disk a list of entities (objects, protocols, or categories) using a list of options. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the first argument is a list of entity/file names, not file paths. In other words, the files must exist in your current working directory.
Compiles to disk an entity or a list of entities (objects, protocols, or categories) using a list of options. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the first argument is a list of entity/file names, not file paths. In other words, the files must exist in your current working directory.
</p>
<p>
For a description of the available compiler options, please <a href="../../userman/installing.html#options">consult</a> the User Manual.
@ -38,7 +39,7 @@ Note that only the errors related to problems in the predicate arguments are lis
<blockquote>
<pre>
logtalk_compile(+atom_list, +list)
logtalk_compile(@atom_or_atom_list, @list)
</pre>
</blockquote>
@ -46,19 +47,21 @@ logtalk_compile(+atom_list, +list)
<blockquote>
<dl>
<dt>Entities is a variable:</dt>
<dt>Entity is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor a proper list:</dt>
<dt>Entities is a variable or a list with an element which is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor an atom nor a proper list:</dt>
<dd><code>type_error(list, Entities)</code></dd>
<dt>One of the entities is not an atom:</dt>
<dt>An element Entity of the Entities list is neither a variable nor an atom:</dt>
<dd><code>type_error(atom, Entity)</code></dd>
<dt>One of the entities does not exist in the current working directory:</dt>
<dt>Entity or an element Entity of the Entities list does not exist in the current working directory:</dt>
<dd><code>existence_error(entity, Entity)</code></dd>
<dt>Options is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Options is neither a variable nor a list:</dt>
<dt>Options is neither a variable nor a proper list:</dt>
<dd><code>type_error(list, Options)</code></dd>
<dt>One of the options is not valid:</dt>
<dt>An element Option of the Options list is not valid:</dt>
<dd><code>type_error(compiler_option, Option)</code></dd>
</dl>
</blockquote>
@ -67,7 +70,7 @@ logtalk_compile(+atom_list, +list)
<blockquote>
<pre>
| ?- logtalk_compile([list], []).
| ?- logtalk_compile(list, []).
| ?- logtalk_compile([listp, list], [xml(off), plredf(warning)]).
</pre>
@ -78,7 +81,7 @@ logtalk_compile(+atom_list, +list)
<strong><a href="logtalk_compile1.html">Previous</a> | <a href="logtalk_load1.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: August 6, 2002
Last updated on: January 10, 2003
</p>
<hr />

View File

@ -21,10 +21,11 @@
<blockquote>
<pre>
logtalk_load(Entity)
logtalk_load(Entities)
</pre>
<p>
Compiles to disk and then loads to memory a list of entities (objects, protocols or categories) using the default compiler options specified in the Logtalk configuration file. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the argument is a list of entity/file names, not file paths. In other words, the files must exist in your current working directory.
Compiles to disk and then loads to memory an entity or a list of entities (objects, protocols or categories) using the default compiler options specified in the Logtalk configuration file. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the argument is a list of entity/file names, not file paths. In other words, the files must exist in your current working directory.
</p>
<p>
Note that only the errors related to problems in the predicate argument are listed below. Other exceptions may be thrown by the compiler if any of the loaded entities contain errors.
@ -35,7 +36,7 @@ Note that only the errors related to problems in the predicate argument are list
<blockquote>
<pre>
logtalk_load(+atom_list)
logtalk_load(@atom_or_atom_list)
</pre>
</blockquote>
@ -43,13 +44,15 @@ logtalk_load(+atom_list)
<blockquote>
<dl>
<dt>Entities is a variable:</dt>
<dt>Entity is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor a proper list:</dt>
<dt>Entities is a variable or a list with an element which is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor an atom nor a proper list:</dt>
<dd><code>type_error(list, Entities)</code></dd>
<dt>One of the entities is not an atom:</dt>
<dt>An element Entity of the Entities list is neither a variable nor an atom:</dt>
<dd><code>type_error(atom, Entity)</code></dd>
<dt>One of the entities does not exist in the current working directory:</dt>
<dt>Entity or an element Entity of the Entities list does not exist in the current working directory:</dt>
<dd><code>existence_error(entity, Entity)</code></dd>
</dl>
</blockquote>
@ -58,7 +61,7 @@ logtalk_load(+atom_list)
<blockquote>
<pre>
| ?- logtalk_load([tree]).
| ?- logtalk_load(tree).
| ?- logtalk_load([listp, list]).
</pre>
@ -69,7 +72,7 @@ logtalk_load(+atom_list)
<strong><a href="logtalk_compile1.html">Previous</a> | <a href="logtalk_load2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: August 6, 2002
Last updated on: January 10, 2003
</p>
<hr />

View File

@ -21,10 +21,11 @@
<blockquote>
<pre>
logtalk_load(Entity, Options)
logtalk_load(Entities, Options)
</pre>
<p>
Compiles to disk and then loads to memory a list of entities (objects, protocols or categories) using a list of options. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the first argument is a list of entity/file names, not file paths. In other words, the files must exist in your current working directory.
Compiles to disk and then loads to memory an entity or a list of entities (objects, protocols or categories) using a list of options. The Logtalk file name extension (by default, <code>.lgt</code>) should be omitted. Note that the first argument is a list of entity/file names, not file paths. In other words, the files must exist in your current working directory.
</p>
<p>
For a description of the available compiler options, please <a href="../../userman/installing.html#options">consult</a> the User Manual.
@ -38,7 +39,7 @@ Note that only the errors related to problems in the predicate arguments are lis
<blockquote>
<pre>
logtalk_load(+atom_list, +list)
logtalk_load(@atom_or_atom_list, @list)
</pre>
</blockquote>
@ -46,19 +47,21 @@ logtalk_load(+atom_list, +list)
<blockquote>
<dl>
<dt>Entities is a variable:</dt>
<dt>Entity is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor a proper list:</dt>
<dt>Entities is a variable or a list with an element which is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Entities is neither a variable nor an atom nor a proper list:</dt>
<dd><code>type_error(list, Entities)</code></dd>
<dt>One of the entities is not an atom:</dt>
<dt>An element Entity of the Entities list is neither a variable nor an atom:</dt>
<dd><code>type_error(atom, Entity)</code></dd>
<dt>One of the entities does not exist in the current working directory:</dt>
<dt>Entity or an element Entity of the Entities list does not exist in the current working directory:</dt>
<dd><code>existence_error(entity, Entity)</code></dd>
<dt>Options is a variable:</dt>
<dd><code>instantiation_error</code></dd>
<dt>Options is neither a variable nor a list:</dt>
<dt>Options is neither a variable nor a proper list:</dt>
<dd><code>type_error(list, Options)</code></dd>
<dt>One of the options is not valid:</dt>
<dt>An element Option of the Options list is not valid:</dt>
<dd><code>type_error(compiler_option, Option)</code></dd>
</dl>
</blockquote>
@ -67,7 +70,7 @@ logtalk_load(+atom_list, +list)
<blockquote>
<pre>
| ?- logtalk_load([list], []).
| ?- logtalk_load(list, []).
| ?- logtalk_load([listp, list], [xml(off), plredf(warning)]).
</pre>
@ -78,7 +81,7 @@ logtalk_load(+atom_list, +list)
<strong><a href="logtalk_load1.html">Previous</a> | <a href="current_logtalk_flag2.html">Next</a> | <a href="../index.html">Table of Contents</a> | <a href="../../bibliography.html">Bibliography</a> | <a href="../../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: August 6, 2002
Last updated on: January 10, 2003
</p>
<hr />

View File

@ -190,7 +190,7 @@
<strong><a href="../userman/index.html">User manual</a> | <a href="../tutorial/index.html">Tutorial</a> | <a href="../bibliography.html">Bibliography</a> | <a href="../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: December 31, 2002
Last updated on: January 10, 2003
</p>
<hr />

View File

@ -221,7 +221,7 @@
<strong><a title="Consult reference manual" href="../refman/index.html">Reference manual</a> | <a href="../tutorial/index.html">Tutorial</a> | <a href="../bibliography.html">Bibliography</a> | <a href="../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: September 5, 2002
Last updated on: January 10, 2003
</p>
<hr />

View File

@ -201,7 +201,7 @@ To compile to disk and also load into memory the source files we can use the Log
This predicate works in the same way of the predicate <code>logtalk_compile/1</code> but also loads the compiled files to memory.
</p>
<p>
Both predicates expect a list of entity names (atoms) as an argument. The Logtalk source file name extension, as defined in the configuration file, should be omitted.
Both predicates expect an entity name or a list of entity names (atoms) as an argument. The Logtalk source file name extension, as defined in the configuration file, should be omitted.
</p>
<p>
If you have more than a few source files then you may want to use a loader utility file containing the calls to the <code>logtalk_load/1</code> predicate (see the description above). Consulting or compiling the loader file will then compile and load all your Logtalk entities into memory.
@ -333,7 +333,7 @@ To supress printing of compiling and loading messages (including compiling warni
<strong><a href="configuration.html">Previous</a> | <a href="programming.html">Next</a> | <a href="index.html">Table of Contents</a> | <a href="../bibliography.html">Bibliography</a> | <a href="../glossary.html">Glossary</a></strong>
</p>
<p class="center">
Last updated on: September 5, 2002
Last updated on: January 10, 2003
</p>
<hr />

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.14.6
Release 2.14.7
Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
=================================================================

View File

@ -8,9 +8,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->

View File

@ -14,9 +14,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->

View File

@ -9,9 +9,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->

View File

@ -9,9 +9,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->

View File

@ -14,9 +14,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->

View File

@ -3,9 +3,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->

View File

@ -15,9 +15,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->

View File

@ -12,9 +12,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->

View File

@ -2,9 +2,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% Copyright (c) 1998-2002 Paulo Moura. All Rights Reserved.
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -859,9 +859,9 @@ abolish_events(after, Obj, Msg, Sender, Monitor) :-
% logtalk_compile(+list)
% logtalk_compile(@atom_or_atom_list)
%
% compiles to disk a list of entities using default options
% compiles to disk an entity or list of entities using default options
logtalk_compile(Entities) :-
catch(
@ -871,9 +871,20 @@ logtalk_compile(Entities) :-
% logtalk_compile(+list, +list)
% logtalk_compile(@atom_or_atom_list, @list)
%
% compiles to disk a list of entities using a list of options
% compiles to disk an entity or a list of entities using a list of options
logtalk_compile(Entity, Options) :-
atom(Entity),
!,
catch(
('$lgt_check_compiler_entity'(Entity),
'$lgt_check_compiler_options'(Options),
'$lgt_set_compiler_options'(Options),
'$lgt_compile_entity'(Entity)),
Error,
throw(error(Error, logtalk_compile(Entity, Options)))).
logtalk_compile(Entities, Options) :-
catch(
@ -886,7 +897,7 @@ logtalk_compile(Entities, Options) :-
% '$lgt_check_compiler_entities'(+list)
% '$lgt_check_compiler_entities'(@list)
%
% check if the entities names are valid and if the corresponding
% files exist in the current working directory
@ -897,7 +908,7 @@ logtalk_compile(Entities, Options) :-
'$lgt_check_compiler_entities'(Entities) :-
\+ '$lgt_proper_list'(Entities),
throw(type_error(list, Entities)).
throw(type_error(atom_or_atom_list, Entities)).
'$lgt_check_compiler_entities'(Entities) :-
'$lgt_check_compiler_entity_list'(Entities).
@ -912,6 +923,10 @@ logtalk_compile(Entities, Options) :-
'$lgt_check_compiler_entity'(Entity) :-
var(Entity),
throw(instantiation_error).
'$lgt_check_compiler_entity'(Entity) :-
\+ atom(Entity),
throw(type_error(atom, Entity)).
@ -925,7 +940,7 @@ logtalk_compile(Entities, Options) :-
% '$lgt_check_compiler_options'(+list)
% '$lgt_check_compiler_options'(@list)
%
% check if the compiler options are valid
@ -958,7 +973,7 @@ logtalk_compile(Entities, Options) :-
% '$lgt_set_compiler_options'(+list)
% '$lgt_set_compiler_options'(@list)
%
% sets the compiler options
@ -976,10 +991,10 @@ logtalk_compile(Entities, Options) :-
% logtalk_load(+list)
% logtalk_load(@atom_or_atom_list)
%
% compiles to disk and then loads to memory a
% list of entities using default options
% compiles to disk and then loads to memory an entity
% or a list of entities using default options
logtalk_load(Entities) :-
catch(
@ -989,10 +1004,21 @@ logtalk_load(Entities) :-
% logtalk_load(+list, +list)
% logtalk_load(@atom_or_atom_list, @list)
%
% compiles to disk and then loads to memory a
% list of entities using a list of options
% compiles to disk and then loads to memory an entity
% or a list of entities using a list of options
logtalk_load(Entity, Options) :-
atom(Entity),
!,
catch(
('$lgt_check_compiler_entity'(Entity),
'$lgt_check_compiler_options'(Options),
'$lgt_set_compiler_options'(Options),
'$lgt_load_entity'(Entity)),
Error,
throw(error(Error, logtalk_load(Entity, Options)))).
logtalk_load(Entities, Options) :-
catch(
@ -1062,7 +1088,7 @@ current_logtalk_flag(Flag, Value) :-
\+ '$lgt_flag_'(Flag, _),
'$lgt_default_flag'(Flag, Value).
current_logtalk_flag(version, version(2, 14, 6)).
current_logtalk_flag(version, version(2, 14, 7)).
@ -1311,14 +1337,15 @@ current_logtalk_flag(version, version(2, 14, 6)).
'$lgt_this'(Context, This),
'$lgt_sender'(Context, Sender2),
'$lgt_prefix'(Context, Prefix),
(nonvar(Meta) ->
(compound(Meta) ->
Head =.. [_| Args],
Meta =.. [_| MArgs],
'$lgt_extract_metavars'(Args, MArgs, Metavars)
;
Metavars = []),
'$lgt_metavars'(Context, Metavars),
asserta((Call:-'$lgt_tr_body'(Body, TBody, Context), call(TBody)))
'$lgt_tr_body'(Body, TBody, Context),
asserta((Call:-('$lgt_nop'(Body), TBody)))
;
(PScope = p ->
throw(error(permission_error(modify, private_predicate, Head), Obj::asserta((Head:-Body)), Sender))
@ -1397,14 +1424,15 @@ current_logtalk_flag(version, version(2, 14, 6)).
'$lgt_this'(Context, This),
'$lgt_sender'(Context, Sender2),
'$lgt_prefix'(Context, Prefix),
(nonvar(Meta) ->
(compound(Meta) ->
Head =.. [_| Args],
Meta =.. [_| MArgs],
'$lgt_extract_metavars'(Args, MArgs, Metavars)
;
Metavars = []),
'$lgt_metavars'(Context, Metavars),
assertz((Call:-'$lgt_tr_body'(Body, TBody, Context), call(TBody)))
'$lgt_tr_body'(Body, TBody, Context),
assertz((Call:-('$lgt_nop'(Body), TBody)))
;
(PScope = p ->
throw(error(permission_error(modify, private_predicate, Head), Obj::assertz((Head:-Body)), Sender))
@ -1467,7 +1495,7 @@ current_logtalk_flag(version, version(2, 14, 6)).
((\+ \+ PScope = Scope; Sender = SContainer) ->
once(('$lgt_once'(Def, Head, _, _, _, Call); '$lgt_once'(DDef, Head, _, _, _, Call))),
clause(Call, TBody),
(TBody = ('$lgt_tr_body'(Body, _, _), _) ->
(TBody = ('$lgt_nop'(Body), _) ->
true
;
Body = TBody)
@ -1509,10 +1537,10 @@ current_logtalk_flag(version, version(2, 14, 6)).
(Type = (dynamic) ->
((\+ \+ PScope = Scope; Sender = SContainer) ->
('$lgt_once'(Def, Head, _, _, _, Call) ->
retract((Call:-('$lgt_tr_body'(Body, _, _), _)))
retract((Call:-('$lgt_nop'(Body), _)))
;
('$lgt_once'(DDef, Head, _, _, _, Call) ->
retract((Call:-('$lgt_tr_body'(Body, _, _), _))),
retract((Call:-('$lgt_nop'(Body), _))),
'$lgt_update_ddef_table'(DDef, Call)
;
fail))
@ -1592,6 +1620,15 @@ current_logtalk_flag(version, version(2, 14, 6)).
% '$lgt_nop'(+goal)
%
% used in the implementation of the built-in
% method clause/2 to store original clause body
'$lgt_nop'(_).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@ -2642,12 +2679,27 @@ user0__def(Pred, _, _, _, Pred, user).
throw(type_error(callable, Head)).
'$lgt_tr_clause'((Head:-Body), TClause, Context) :-
functor(Head, Functor, Arity),
'$lgt_dynamic_'(Functor/Arity),
!,
'$lgt_extract_metavars'(Head, Metavars),
'$lgt_metavars'(Context, Metavars),
'$lgt_tr_head'(Head, THead, Context),
'$lgt_tr_body'(Body, TBody, Context),
'$lgt_simplify_clause'((THead:-TBody), TClause).
'$lgt_simplify_body'(TBody, SBody),
TClause = (THead:-'$lgt_nop'(Body), SBody).
'$lgt_tr_clause'((Head:-Body), TClause, Context) :-
!,
'$lgt_extract_metavars'(Head, Metavars),
'$lgt_metavars'(Context, Metavars),
'$lgt_tr_head'(Head, THead, Context),
'$lgt_tr_body'(Body, TBody, Context),
'$lgt_simplify_body'(TBody, SBody),
(SBody == true ->
TClause = THead
;
TClause = (THead:-SBody)).
'$lgt_tr_clause'(Fact, _, _) :-
\+ '$lgt_callable'(Fact),
@ -3339,22 +3391,6 @@ user0__def(Pred, _, _, _, Pred, user).
% '$lgt_simplify_clause'(+clause, -clause)
%
% simplify translated clause by examining clause body
'$lgt_simplify_clause'((Head :- true), Head) :-
!.
'$lgt_simplify_clause'((Head :- Body), Clause) :-
'$lgt_simplify_body'(Body, SBody),
(SBody == true ->
Clause = Head
;
Clause = (Head :- SBody)).
% '$lgt_simplify_body'(+callable, -callable)
%
% remove redundant calls to true/0 from a translated clause body
@ -4039,7 +4075,7 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [PDcl2, Pred, Scope2, Compilation, Meta, Container],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Body =.. [PDcl2, Pred, _, Compilation, Meta, Container])),
@ -4081,7 +4117,7 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [PDcl, Pred, Scope2, Compilation, Meta, Container],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Body =.. [PDcl, Pred, _, Compilation, Meta, Container])),
@ -4144,7 +4180,7 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [PDcl, Pred, Scope2, Compilation, Meta, Container],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Body =.. [PDcl, Pred, _, Compilation, Meta, Container])),
@ -4164,7 +4200,7 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [CDcl, Pred, Scope2, Compilation, Meta, Container],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Body =.. [CDcl, Pred, _, Compilation, Meta, Container])),
@ -4184,11 +4220,11 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [PDcl, Pred, Scope2, Compilation, Meta, SContainer, TContainer],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Call =.. [PDcl, Pred, Scope2, Compilation, Meta, SContainer2, TContainer],
Body = (Call, (Scope2 = p -> SContainer = SContainer2; SContainer = Obj)))),
Body = (Call, (Scope2 == p -> SContainer = SContainer2; SContainer = Obj)))),
assertz('$lgt_dcl_'((Head:-Body))),
fail.
@ -4297,11 +4333,11 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [CIDcl, Pred, Scope2, Compilation, Meta, SContainer, TContainer],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Call =.. [CIDcl, Pred, Scope2, Compilation, Meta, SContainer2, TContainer],
Body = (Call, (Scope2 = p -> SContainer = SContainer2; SContainer = Obj)))),
Body = (Call, (Scope2 == p -> SContainer = SContainer2; SContainer = Obj)))),
assertz('$lgt_dcl_'((Head:-Body))),
fail.
@ -4340,7 +4376,7 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [PDcl, Pred, Scope2, Compilation, Meta, Container],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Body =.. [PDcl, Pred, _, Compilation, Meta, Container])),
@ -4360,7 +4396,7 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [CDcl, Pred, Scope2, Compilation, Meta, Container],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Body =.. [CDcl, Pred, _, Compilation, Meta, Container])),
@ -4380,11 +4416,11 @@ user0__def(Pred, _, _, _, Pred, user).
;
(EScope = protected ->
Call =.. [SIDcl, Pred, Scope2, Compilation, Meta, SContainer, TContainer],
Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
Body = (Call, (Scope2 == p -> Scope = p; Scope = p(p)))
;
Scope = p,
Call =.. [SIDcl, Pred, Scope2, Compilation, Meta, SContainer2, TContainer],
Body = (Call, (Scope2 = p -> SContainer = SContainer2; SContainer = Obj)))),
Body = (Call, (Scope2 == p -> SContainer = SContainer2; SContainer = Obj)))),
assertz('$lgt_dcl_'((Head:-Body))),
fail.
@ -5975,7 +6011,7 @@ user0__def(Pred, _, _, _, Pred, user).
'$lgt_banner' :-
current_logtalk_flag(version, version(Major, Minor, Patch)),
nl, write('Logtalk '), write(Major), write('.'), write(Minor), write('.'), write(Patch), nl,
write('Copyright (c) 1998-2002 Paulo Moura'), nl, nl.
write('Copyright (c) 1998-2003 Paulo Moura'), nl, nl.

View File

@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Logtalk - Object oriented extension to Prolog
% Release 2.14.6
% Release 2.14.7
%
% configuration file for YAP Prolog 4.3.23 or later
%