Logtalk 2.15.3 release files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@839 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
6fed2c7be5
commit
2b8b25da07
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
@ -10,6 +10,21 @@ RELEASE NOTES
|
|||||||
=============
|
=============
|
||||||
|
|
||||||
|
|
||||||
|
2.15.3 - June 27, 2003
|
||||||
|
|
||||||
|
Updated experimental support for DCG rules to prevent over-simplification
|
||||||
|
of unification goals in the compilation of rules to clauses. Push-back
|
||||||
|
lists can now be used on rule heads.
|
||||||
|
|
||||||
|
The compilation mode of an entity (static/dynamic) is now stored in the
|
||||||
|
corresponding entity table (implying recompilation of all entities).
|
||||||
|
|
||||||
|
Updated GNU Prolog config file to hide compiled entity predicates.
|
||||||
|
|
||||||
|
Updated SWI-Prolog config file for better integration of Logtalk with
|
||||||
|
this compiler.
|
||||||
|
|
||||||
|
|
||||||
2.15.2 - April 2, 2003
|
2.15.2 - April 2, 2003
|
||||||
|
|
||||||
Experimental support for DCG rules inside categories and objects. Added
|
Experimental support for DCG rules inside categories and objects. Added
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
@ -58,3 +58,6 @@ Logtalk version 2.15.0 changes the "authors" key in the directive info/1 to
|
|||||||
this change. If you use the directive info/1 in your programs, you will need
|
this change. If you use the directive info/1 in your programs, you will need
|
||||||
to apply this change to take advantage of automatic generation of documenting
|
to apply this change to take advantage of automatic generation of documenting
|
||||||
files.
|
files.
|
||||||
|
|
||||||
|
Logtalk version 2.15.3 changes the format of the runtime entity tables,
|
||||||
|
impliying recompilation of all objects, protocols, and categories.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
@ -31,7 +31,9 @@ Some files represent work in progress and are not loaded by default by
|
|||||||
any loader utility file.
|
any loader utility file.
|
||||||
|
|
||||||
Some of the code in this library is based on public domain Prolog code,
|
Some of the code in this library is based on public domain Prolog code,
|
||||||
in particular, code adopted from the Edinburgh Prolog library.
|
in particular, code adopted from the Edinburgh Prolog library. The definition
|
||||||
|
of predicate reverse/2 in object list is from Richard O'Keefe and can be found
|
||||||
|
in its book "The Craft of Prolog".
|
||||||
|
|
||||||
By default, compiling any group of entities described above generates a .xml
|
By default, compiling any group of entities described above generates a .xml
|
||||||
documenting file for each compiled entity (object, category, or protocol).
|
documenting file for each compiled entity (object, category, or protocol).
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
|
|
||||||
:- info([
|
:- info([
|
||||||
version is 1.0,
|
version is 1.1,
|
||||||
author is 'Paulo Moura',
|
author is 'Paulo Moura',
|
||||||
date is 2000/7/24,
|
date is 2003/4/25,
|
||||||
comment is 'List predicates.']).
|
comment is 'List predicates.']).
|
||||||
|
|
||||||
|
|
||||||
@ -182,14 +182,13 @@
|
|||||||
|
|
||||||
|
|
||||||
reverse(List, Reversed) :-
|
reverse(List, Reversed) :-
|
||||||
same_length(List, Reversed),
|
reverse(List, [], Reversed, Reversed).
|
||||||
reverse(List, [], Reversed).
|
|
||||||
|
|
||||||
|
|
||||||
reverse([], Reversed, Reversed).
|
reverse([], Reversed, Reversed, []).
|
||||||
|
|
||||||
reverse([Head| Tail], List, Reversed) :-
|
reverse([Head| Tail], List, Reversed, [_| Bound]) :-
|
||||||
reverse(Tail, [Head| List], Reversed).
|
reverse(Tail, [Head| List], Reversed, Bound).
|
||||||
|
|
||||||
|
|
||||||
same_length([], []).
|
same_length([], []).
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
|
|
||||||
:- info([
|
:- info([
|
||||||
version is 1.0,
|
version is 1.1,
|
||||||
author is 'Paulo Moura',
|
author is 'Paulo Moura',
|
||||||
date is 2000/7/24,
|
date is 2003/4/17,
|
||||||
comment is 'List protocol.']).
|
comment is 'List protocol.']).
|
||||||
|
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
:- public(delete/3).
|
:- public(delete/3).
|
||||||
|
|
||||||
:- mode(delete(+list, @term, ?list), one).
|
:- mode(delete(@list, @term, ?list), one).
|
||||||
|
|
||||||
:- info(delete/3,
|
:- info(delete/3,
|
||||||
[comment is 'Deletes from a list all ocurrences of an element returning the list of remaining elements.',
|
[comment is 'Deletes from a list all ocurrences of an element returning the list of remaining elements.',
|
||||||
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
:- public(delete_matches/3).
|
:- public(delete_matches/3).
|
||||||
|
|
||||||
:- mode(delete_matches(+list, @term, ?list), one).
|
:- mode(delete_matches(@list, @term, ?list), one).
|
||||||
|
|
||||||
:- info(delete_matches/3,
|
:- info(delete_matches/3,
|
||||||
[comment is 'Deletes all matching elements from a list, returning the list of remaining elements.',
|
[comment is 'Deletes all matching elements from a list, returning the list of remaining elements.',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -7,14 +7,14 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Logtalk 2.15.2 Documentation</title>
|
<title>Logtalk 2.15.3 Documentation</title>
|
||||||
<link rel="stylesheet" href="styles.css" type="text/css" />
|
<link rel="stylesheet" href="styles.css" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<h1 class="center">Logtalk 2.15.2</h1>
|
<h1 class="center">Logtalk 2.15.3</h1>
|
||||||
|
|
||||||
<h3 class="center">Documentation</h3>
|
<h3 class="center">Documentation</h3>
|
||||||
<p class="center">
|
<p class="center">
|
||||||
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<p class="center">
|
<p class="center">
|
||||||
Last updated on: March 30, 2003
|
Last updated on: June 4, 2003
|
||||||
</p>
|
</p>
|
||||||
<p class="center">
|
<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>
|
<a href="http://validator.w3.org/check/referer"><img src="valid-xhtml10.png" alt="Valid XHTML 1.0!" width="88" height="31" /></a>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
=================================================================
|
=================================================================
|
||||||
Logtalk - Object oriented extension to Prolog
|
Logtalk - Object oriented extension to Prolog
|
||||||
Release 2.15.2
|
Release 2.15.3
|
||||||
|
|
||||||
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
=================================================================
|
=================================================================
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
% Copyright (c) 1998-2003 Paulo Moura. All Rights Reserved.
|
||||||
%
|
%
|
||||||
@ -54,9 +54,9 @@
|
|||||||
|
|
||||||
% tables of loaded entities and respective relationships
|
% tables of loaded entities and respective relationships
|
||||||
|
|
||||||
:- dynamic('$lgt_current_protocol_'/2). % '$lgt_current_protocol_'(Ptc, Prefix)
|
:- dynamic('$lgt_current_protocol_'/3). % '$lgt_current_protocol_'(Ptc, Prefix, Type)
|
||||||
:- dynamic('$lgt_current_category_'/2). % '$lgt_current_category_'(Ctg, Prefix)
|
:- dynamic('$lgt_current_category_'/3). % '$lgt_current_category_'(Ctg, Prefix, Type)
|
||||||
:- dynamic('$lgt_current_object_'/5). % '$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super)
|
:- dynamic('$lgt_current_object_'/6). % '$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, Type)
|
||||||
|
|
||||||
:- dynamic('$lgt_implements_protocol_'/3). % '$lgt_implements_protocol_'(ObjOrCtg, Ptc, Scope)
|
:- dynamic('$lgt_implements_protocol_'/3). % '$lgt_implements_protocol_'(ObjOrCtg, Ptc, Scope)
|
||||||
:- dynamic('$lgt_imports_category_'/3). % '$lgt_imports_category_'(Obj, Ctg, Scope)
|
:- dynamic('$lgt_imports_category_'/3). % '$lgt_imports_category_'(Obj, Ctg, Scope)
|
||||||
@ -174,7 +174,7 @@ current_object(Obj) :-
|
|||||||
throw(error(type_error(object_identifier, Obj), current_object(Obj))).
|
throw(error(type_error(object_identifier, Obj), current_object(Obj))).
|
||||||
|
|
||||||
current_object(Obj) :-
|
current_object(Obj) :-
|
||||||
'$lgt_current_object_'(Obj, _, _, _, _).
|
'$lgt_current_object_'(Obj, _, _, _, _, _).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ current_protocol(Ptc) :-
|
|||||||
throw(error(type_error(protocol_identifier, Ptc), current_protocol(Ptc))).
|
throw(error(type_error(protocol_identifier, Ptc), current_protocol(Ptc))).
|
||||||
|
|
||||||
current_protocol(Ptc) :-
|
current_protocol(Ptc) :-
|
||||||
'$lgt_current_protocol_'(Ptc, _).
|
'$lgt_current_protocol_'(Ptc, _, _).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ current_category(Ctg) :-
|
|||||||
throw(error(type_error(category_identifier, Ctg), current_category(Ctg))).
|
throw(error(type_error(category_identifier, Ctg), current_category(Ctg))).
|
||||||
|
|
||||||
current_category(Ctg) :-
|
current_category(Ctg) :-
|
||||||
'$lgt_current_category_'(Ctg, _).
|
'$lgt_current_category_'(Ctg, _, _).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -217,12 +217,7 @@ object_property(Obj, Prop) :-
|
|||||||
object_property(user, built_in).
|
object_property(user, built_in).
|
||||||
|
|
||||||
object_property(Obj, Prop) :-
|
object_property(Obj, Prop) :-
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, _, _, _, _, Prop).
|
||||||
functor(Pred, Prefix, 7),
|
|
||||||
('$lgt_predicate_property'(Pred, (dynamic)) ->
|
|
||||||
Prop = (dynamic)
|
|
||||||
;
|
|
||||||
Prop = static).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -239,12 +234,7 @@ category_property(Ctg, Prop) :-
|
|||||||
throw(error(domain_error(category_property, Prop), category_property(Ctg, Prop))).
|
throw(error(domain_error(category_property, Prop), category_property(Ctg, Prop))).
|
||||||
|
|
||||||
category_property(Ctg, Prop) :-
|
category_property(Ctg, Prop) :-
|
||||||
'$lgt_current_category_'(Ctg, Prefix),
|
'$lgt_current_category_'(Ctg, _, Prop).
|
||||||
functor(Pred, Prefix, 2),
|
|
||||||
('$lgt_predicate_property'(Pred, (dynamic)) ->
|
|
||||||
Prop = (dynamic)
|
|
||||||
;
|
|
||||||
Prop = static).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -261,12 +251,7 @@ protocol_property(Ptc, Prop) :-
|
|||||||
throw(error(domain_error(protocol_property, Prop), protocol_property(Ptc, Prop))).
|
throw(error(domain_error(protocol_property, Prop), protocol_property(Ptc, Prop))).
|
||||||
|
|
||||||
protocol_property(Ptc, Prop) :-
|
protocol_property(Ptc, Prop) :-
|
||||||
'$lgt_current_protocol_'(Ptc, Prefix),
|
'$lgt_current_protocol_'(Ptc, _, Prop).
|
||||||
functor(Pred, Prefix, 1),
|
|
||||||
('$lgt_predicate_property'(Pred, (dynamic)) ->
|
|
||||||
Prop = (dynamic)
|
|
||||||
;
|
|
||||||
Prop = static).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -281,15 +266,15 @@ create_object(Obj, Rels, Dirs, Clauses) :-
|
|||||||
throw(error(type_error(object_identifier, Obj), create_object(Obj, Rels, Dirs, Clauses))).
|
throw(error(type_error(object_identifier, Obj), create_object(Obj, Rels, Dirs, Clauses))).
|
||||||
|
|
||||||
create_object(Obj, Rels, Dirs, Clauses) :-
|
create_object(Obj, Rels, Dirs, Clauses) :-
|
||||||
'$lgt_current_object_'(Obj, _, _, _, _),
|
'$lgt_current_object_'(Obj, _, _, _, _, _),
|
||||||
throw(error(permission_error(replace, object, Obj), create_object(Obj, Rels, Dirs, Clauses))).
|
throw(error(permission_error(replace, object, Obj), create_object(Obj, Rels, Dirs, Clauses))).
|
||||||
|
|
||||||
create_object(Obj, Rels, Dirs, Clauses) :-
|
create_object(Obj, Rels, Dirs, Clauses) :-
|
||||||
'$lgt_current_category_'(Obj, _),
|
'$lgt_current_category_'(Obj, _, _),
|
||||||
throw(error(permission_error(replace, category, Obj), create_object(Obj, Rels, Dirs, Clauses))).
|
throw(error(permission_error(replace, category, Obj), create_object(Obj, Rels, Dirs, Clauses))).
|
||||||
|
|
||||||
create_object(Obj, Rels, Dirs, Clauses) :-
|
create_object(Obj, Rels, Dirs, Clauses) :-
|
||||||
'$lgt_current_protocol_'(Obj, _),
|
'$lgt_current_protocol_'(Obj, _, _),
|
||||||
throw(error(permission_error(replace, protocol, Obj), create_object(Obj, Rels, Dirs, Clauses))).
|
throw(error(permission_error(replace, protocol, Obj), create_object(Obj, Rels, Dirs, Clauses))).
|
||||||
|
|
||||||
create_object(Obj, Rels, Dirs, Clauses) :-
|
create_object(Obj, Rels, Dirs, Clauses) :-
|
||||||
@ -329,15 +314,15 @@ create_category(Ctg, Rels, Dirs, Clauses) :-
|
|||||||
throw(error(type_error(category_identifier, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
|
throw(error(type_error(category_identifier, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
|
||||||
|
|
||||||
create_category(Ctg, Rels, Dirs, Clauses) :-
|
create_category(Ctg, Rels, Dirs, Clauses) :-
|
||||||
'$lgt_current_category_'(Ctg, _),
|
'$lgt_current_category_'(Ctg, _, _),
|
||||||
throw(error(permission_error(replace, category, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
|
throw(error(permission_error(replace, category, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
|
||||||
|
|
||||||
create_category(Ctg, Rels, Dirs, Clauses) :-
|
create_category(Ctg, Rels, Dirs, Clauses) :-
|
||||||
'$lgt_current_object_'(Ctg, _, _, _, _),
|
'$lgt_current_object_'(Ctg, _, _, _, _, _),
|
||||||
throw(error(permission_error(replace, object, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
|
throw(error(permission_error(replace, object, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
|
||||||
|
|
||||||
create_category(Ctg, Rels, Dirs, Clauses) :-
|
create_category(Ctg, Rels, Dirs, Clauses) :-
|
||||||
'$lgt_current_protocol_'(Ctg, _),
|
'$lgt_current_protocol_'(Ctg, _, _),
|
||||||
throw(error(permission_error(replace, protocol, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
|
throw(error(permission_error(replace, protocol, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
|
||||||
|
|
||||||
create_category(Ctg, Rels, Dirs, Clauses) :-
|
create_category(Ctg, Rels, Dirs, Clauses) :-
|
||||||
@ -377,15 +362,15 @@ create_protocol(Ptc, Rels, Dirs) :-
|
|||||||
throw(error(type_error(protocol_identifier, Ptc), create_protocol(Ptc, Rels, Dirs))).
|
throw(error(type_error(protocol_identifier, Ptc), create_protocol(Ptc, Rels, Dirs))).
|
||||||
|
|
||||||
create_protocol(Ptc, Rels, Dirs) :-
|
create_protocol(Ptc, Rels, Dirs) :-
|
||||||
'$lgt_current_protocol_'(Ptc, _),
|
'$lgt_current_protocol_'(Ptc, _, _),
|
||||||
throw(error(permission_error(replace, protocol, Ptc), create_protocol(Ptc, Rels, Dirs))).
|
throw(error(permission_error(replace, protocol, Ptc), create_protocol(Ptc, Rels, Dirs))).
|
||||||
|
|
||||||
create_protocol(Ptc, Rels, Dirs) :-
|
create_protocol(Ptc, Rels, Dirs) :-
|
||||||
'$lgt_current_object_'(Ptc, _, _, _, _),
|
'$lgt_current_object_'(Ptc, _, _, _, _, _),
|
||||||
throw(error(permission_error(replace, object, Ptc), create_protocol(Ptc, Rels, Dirs))).
|
throw(error(permission_error(replace, object, Ptc), create_protocol(Ptc, Rels, Dirs))).
|
||||||
|
|
||||||
create_protocol(Ptc, Rels, Dirs) :-
|
create_protocol(Ptc, Rels, Dirs) :-
|
||||||
'$lgt_current_category_'(Ptc, _),
|
'$lgt_current_category_'(Ptc, _, _),
|
||||||
throw(error(permission_error(replace, category, Ptc), create_protocol(Ptc, Rels, Dirs))).
|
throw(error(permission_error(replace, category, Ptc), create_protocol(Ptc, Rels, Dirs))).
|
||||||
|
|
||||||
create_protocol(Ptc, Rels, Dirs) :-
|
create_protocol(Ptc, Rels, Dirs) :-
|
||||||
@ -419,8 +404,8 @@ abolish_object(Obj) :-
|
|||||||
throw(error(type_error(object_identifier, Obj), abolish_object(Obj))).
|
throw(error(type_error(object_identifier, Obj), abolish_object(Obj))).
|
||||||
|
|
||||||
abolish_object(Obj) :-
|
abolish_object(Obj) :-
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _) ->
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, Type) ->
|
||||||
(object_property(Obj, (dynamic)) ->
|
(Type = (dynamic) ->
|
||||||
'$lgt_once'(Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef),
|
||||||
forall(
|
forall(
|
||||||
'$lgt_call'(Def, _, _, _, _, Pred),
|
'$lgt_call'(Def, _, _, _, _, Pred),
|
||||||
@ -440,7 +425,7 @@ abolish_object(Obj) :-
|
|||||||
abolish(DDcl/2),
|
abolish(DDcl/2),
|
||||||
abolish(DDef/5),
|
abolish(DDef/5),
|
||||||
abolish(Prefix/7),
|
abolish(Prefix/7),
|
||||||
retractall('$lgt_current_object_'(Obj, _, _, _, _)),
|
retractall('$lgt_current_object_'(Obj, _, _, _, _, _)),
|
||||||
retractall('$lgt_extends_object_'(Obj, _, _)),
|
retractall('$lgt_extends_object_'(Obj, _, _)),
|
||||||
retractall('$lgt_instantiates_class_'(Obj, _, _)),
|
retractall('$lgt_instantiates_class_'(Obj, _, _)),
|
||||||
retractall('$lgt_specializes_class_'(Obj, _, _)),
|
retractall('$lgt_specializes_class_'(Obj, _, _)),
|
||||||
@ -464,8 +449,8 @@ abolish_category(Ctg) :-
|
|||||||
throw(error(type_error(category_identifier, Ctg), abolish_category(Ctg))).
|
throw(error(type_error(category_identifier, Ctg), abolish_category(Ctg))).
|
||||||
|
|
||||||
abolish_category(Ctg) :-
|
abolish_category(Ctg) :-
|
||||||
'$lgt_current_category_'(Ctg, Prefix) ->
|
'$lgt_current_category_'(Ctg, Prefix, Type) ->
|
||||||
(category_property(Ctg, (dynamic)) ->
|
(Type = (dynamic) ->
|
||||||
'$lgt_once'(Prefix, Dcl, Def),
|
'$lgt_once'(Prefix, Dcl, Def),
|
||||||
forall(
|
forall(
|
||||||
'$lgt_call'(Def, _, _, _, _, Pred),
|
'$lgt_call'(Def, _, _, _, _, Pred),
|
||||||
@ -475,7 +460,7 @@ abolish_category(Ctg) :-
|
|||||||
abolish(Dcl/5),
|
abolish(Dcl/5),
|
||||||
abolish(Def/5),
|
abolish(Def/5),
|
||||||
abolish(Prefix/2),
|
abolish(Prefix/2),
|
||||||
retractall('$lgt_current_category_'(Ctg, _)),
|
retractall('$lgt_current_category_'(Ctg, _, _)),
|
||||||
retractall('$lgt_implements_protocol_'(Ctg, _, _))
|
retractall('$lgt_implements_protocol_'(Ctg, _, _))
|
||||||
;
|
;
|
||||||
throw(error(permission_error(modify, static_category, Ctg), abolish_category(Ctg))))
|
throw(error(permission_error(modify, static_category, Ctg), abolish_category(Ctg))))
|
||||||
@ -495,13 +480,13 @@ abolish_protocol(Ptc) :-
|
|||||||
throw(error(type_error(protocol_identifier, Ptc), abolish_protocol(Ptc))).
|
throw(error(type_error(protocol_identifier, Ptc), abolish_protocol(Ptc))).
|
||||||
|
|
||||||
abolish_protocol(Ptc) :-
|
abolish_protocol(Ptc) :-
|
||||||
'$lgt_current_protocol_'(Ptc, Prefix) ->
|
'$lgt_current_protocol_'(Ptc, Prefix, Type) ->
|
||||||
(protocol_property(Ptc, (dynamic)) ->
|
(Type = (dynamic) ->
|
||||||
'$lgt_once'(Prefix, Dcl),
|
'$lgt_once'(Prefix, Dcl),
|
||||||
abolish(Dcl/4),
|
abolish(Dcl/4),
|
||||||
abolish(Dcl/5),
|
abolish(Dcl/5),
|
||||||
abolish(Prefix/1),
|
abolish(Prefix/1),
|
||||||
retractall('$lgt_current_protocol_'(Ptc, _)),
|
retractall('$lgt_current_protocol_'(Ptc, _, _)),
|
||||||
retractall('$lgt_extends_protocol_'(Ptc, _, _))
|
retractall('$lgt_extends_protocol_'(Ptc, _, _))
|
||||||
;
|
;
|
||||||
throw(error(permission_error(modify, static_protocol, Ptc), abolish_protocol(Ptc))))
|
throw(error(permission_error(modify, static_protocol, Ptc), abolish_protocol(Ptc))))
|
||||||
@ -773,7 +758,7 @@ define_events(Event, Obj, Msg, Sender, Monitor) :-
|
|||||||
define_events(Event, Obj, Msg, Sender, Monitor) :-
|
define_events(Event, Obj, Msg, Sender, Monitor) :-
|
||||||
var(Event),
|
var(Event),
|
||||||
!,
|
!,
|
||||||
'$lgt_current_object_'(Monitor, _, _, Def, _),
|
'$lgt_current_object_'(Monitor, _, _, Def, _, _),
|
||||||
'$lgt_call'(Def, before(Obj, Msg, Sender), Monitor, Monitor, Monitor, BCall, _),
|
'$lgt_call'(Def, before(Obj, Msg, Sender), Monitor, Monitor, Monitor, BCall, _),
|
||||||
'$lgt_call'(Def, after(Obj, Msg, Sender), Monitor, Monitor, Monitor, ACall, _),
|
'$lgt_call'(Def, after(Obj, Msg, Sender), Monitor, Monitor, Monitor, ACall, _),
|
||||||
retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)),
|
retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)),
|
||||||
@ -782,13 +767,13 @@ define_events(Event, Obj, Msg, Sender, Monitor) :-
|
|||||||
assertz('$lgt_after_'(Obj, Msg, Sender, Monitor, ACall)).
|
assertz('$lgt_after_'(Obj, Msg, Sender, Monitor, ACall)).
|
||||||
|
|
||||||
define_events(before, Obj, Msg, Sender, Monitor) :-
|
define_events(before, Obj, Msg, Sender, Monitor) :-
|
||||||
'$lgt_current_object_'(Monitor, _, _, Def, _),
|
'$lgt_current_object_'(Monitor, _, _, Def, _, _),
|
||||||
'$lgt_call'(Def, before(Obj, Msg, Sender), Monitor, Monitor, Monitor, Call, _),
|
'$lgt_call'(Def, before(Obj, Msg, Sender), Monitor, Monitor, Monitor, Call, _),
|
||||||
retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)),
|
retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)),
|
||||||
assertz('$lgt_before_'(Obj, Msg, Sender, Monitor, Call)).
|
assertz('$lgt_before_'(Obj, Msg, Sender, Monitor, Call)).
|
||||||
|
|
||||||
define_events(after, Obj, Msg, Sender, Monitor) :-
|
define_events(after, Obj, Msg, Sender, Monitor) :-
|
||||||
'$lgt_current_object_'(Monitor, _, _, Def, _),
|
'$lgt_current_object_'(Monitor, _, _, Def, _, _),
|
||||||
'$lgt_call'(Def, after(Obj, Msg, Sender), Monitor, Monitor, Monitor, Call, _),
|
'$lgt_call'(Def, after(Obj, Msg, Sender), Monitor, Monitor, Monitor, Call, _),
|
||||||
retractall('$lgt_after_'(Obj, Msg, Sender, Monitor, _)),
|
retractall('$lgt_after_'(Obj, Msg, Sender, Monitor, _)),
|
||||||
assertz('$lgt_after_'(Obj, Msg, Sender, Monitor, Call)).
|
assertz('$lgt_after_'(Obj, Msg, Sender, Monitor, Call)).
|
||||||
@ -1088,7 +1073,7 @@ current_logtalk_flag(Flag, Value) :-
|
|||||||
\+ '$lgt_flag_'(Flag, _),
|
\+ '$lgt_flag_'(Flag, _),
|
||||||
'$lgt_default_flag'(Flag, Value).
|
'$lgt_default_flag'(Flag, Value).
|
||||||
|
|
||||||
current_logtalk_flag(version, version(2, 15, 2)).
|
current_logtalk_flag(version, version(2, 15, 3)).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1104,7 +1089,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
% checks if an object exists at runtime
|
% checks if an object exists at runtime
|
||||||
|
|
||||||
'$lgt_obj_exists'(Obj, Pred, Sender) :-
|
'$lgt_obj_exists'(Obj, Pred, Sender) :-
|
||||||
\+ '$lgt_current_object_'(Obj, _, _, _, _) ->
|
\+ '$lgt_current_object_'(Obj, _, _, _, _, _) ->
|
||||||
throw(error(existence_error(object, Obj), Obj::Pred, Sender))
|
throw(error(existence_error(object, Obj), Obj::Pred, Sender))
|
||||||
;
|
;
|
||||||
true.
|
true.
|
||||||
@ -1129,7 +1114,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(type_error(predicate_indicator, Functor/Arity), Obj::current_predicate(Functor/Arity), Sender)).
|
throw(error(type_error(predicate_indicator, Functor/Arity), Obj::current_predicate(Functor/Arity), Sender)).
|
||||||
|
|
||||||
'$lgt_current_predicate'(Obj, Functor/Arity, Sender, _) :-
|
'$lgt_current_predicate'(Obj, Functor/Arity, Sender, _) :-
|
||||||
\+ '$lgt_current_object_'(Obj, _, _, _, _),
|
\+ '$lgt_current_object_'(Obj, _, _, _, _, _),
|
||||||
throw(error(existence_error(object, Obj), Obj::current_predicate(Functor/Arity), Sender)).
|
throw(error(existence_error(object, Obj), Obj::current_predicate(Functor/Arity), Sender)).
|
||||||
|
|
||||||
'$lgt_current_predicate'(Obj, Functor/Arity, Sender, Scope) :-
|
'$lgt_current_predicate'(Obj, Functor/Arity, Sender, Scope) :-
|
||||||
@ -1137,12 +1122,12 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
nonvar(Arity),
|
nonvar(Arity),
|
||||||
!,
|
!,
|
||||||
functor(Pred, Functor, Arity),
|
functor(Pred, Functor, Arity),
|
||||||
'$lgt_current_object_'(Obj, _, Dcl, _, _),
|
'$lgt_current_object_'(Obj, _, Dcl, _, _, _),
|
||||||
'$lgt_once'(Dcl, Pred, PScope, _, _, SContainer, _),
|
'$lgt_once'(Dcl, Pred, PScope, _, _, SContainer, _),
|
||||||
once((\+ \+ PScope = Scope; Sender = SContainer)).
|
once((\+ \+ PScope = Scope; Sender = SContainer)).
|
||||||
|
|
||||||
'$lgt_current_predicate'(Obj, Functor/Arity, Sender, Scope) :-
|
'$lgt_current_predicate'(Obj, Functor/Arity, Sender, Scope) :-
|
||||||
'$lgt_current_object_'(Obj, _, Dcl, _, _),
|
'$lgt_current_object_'(Obj, _, Dcl, _, _, _),
|
||||||
findall(
|
findall(
|
||||||
Functor/Arity-(PScope, SContainer),
|
Functor/Arity-(PScope, SContainer),
|
||||||
('$lgt_call'(Dcl, Pred, PScope, _, _, SContainer, _),
|
('$lgt_call'(Dcl, Pred, PScope, _, _, SContainer, _),
|
||||||
@ -1192,11 +1177,11 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(type_error(callable, Pred), Obj::predicate_property(Pred, Prop), Sender)).
|
throw(error(type_error(callable, Pred), Obj::predicate_property(Pred, Prop), Sender)).
|
||||||
|
|
||||||
'$lgt_predicate_property'(Obj, Pred, Prop, Sender, _) :-
|
'$lgt_predicate_property'(Obj, Pred, Prop, Sender, _) :-
|
||||||
\+ '$lgt_current_object_'(Obj, _, _, _, _),
|
\+ '$lgt_current_object_'(Obj, _, _, _, _, _),
|
||||||
throw(error(existence_error(object, Obj), Obj::predicate_property(Pred, Prop), Sender)).
|
throw(error(existence_error(object, Obj), Obj::predicate_property(Pred, Prop), Sender)).
|
||||||
|
|
||||||
'$lgt_predicate_property'(Obj, Pred, Prop, Sender, Scope) :-
|
'$lgt_predicate_property'(Obj, Pred, Prop, Sender, Scope) :-
|
||||||
'$lgt_current_object_'(Obj, _, Dcl, Def, _),
|
'$lgt_current_object_'(Obj, _, Dcl, Def, _, _),
|
||||||
'$lgt_once'(Dcl, Pred, PScope, Type, Meta, SContainer, TContainer),
|
'$lgt_once'(Dcl, Pred, PScope, Type, Meta, SContainer, TContainer),
|
||||||
!,
|
!,
|
||||||
once((\+ \+ PScope = Scope; Sender = SContainer)),
|
once((\+ \+ PScope = Scope; Sender = SContainer)),
|
||||||
@ -1259,7 +1244,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(type_error(integer, Arity), Obj::abolish(Functor/Arity), Sender)).
|
throw(error(type_error(integer, Arity), Obj::abolish(Functor/Arity), Sender)).
|
||||||
|
|
||||||
'$lgt_abolish'(Obj, Functor/Arity, Sender, Scope) :-
|
'$lgt_abolish'(Obj, Functor/Arity, Sender, Scope) :-
|
||||||
'$lgt_current_object_'(Obj, Prefix, Dcl, _, _) ->
|
'$lgt_current_object_'(Obj, Prefix, Dcl, _, _, _) ->
|
||||||
((functor(Pred, Functor, Arity),
|
((functor(Pred, Functor, Arity),
|
||||||
'$lgt_once'(Dcl, Pred, PScope, Compilation, _, SContainer, _)) ->
|
'$lgt_once'(Dcl, Pred, PScope, Compilation, _, SContainer, _)) ->
|
||||||
((\+ \+ PScope = Scope; Sender = SContainer) ->
|
((\+ \+ PScope = Scope; Sender = SContainer) ->
|
||||||
@ -1313,12 +1298,12 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(type_error(callable, Body), Obj::asserta((Head:-Body)), Sender)).
|
throw(error(type_error(callable, Body), Obj::asserta((Head:-Body)), Sender)).
|
||||||
|
|
||||||
'$lgt_asserta'(Obj, Clause, Sender, _) :-
|
'$lgt_asserta'(Obj, Clause, Sender, _) :-
|
||||||
\+ '$lgt_current_object_'(Obj, _, _, _, _),
|
\+ '$lgt_current_object_'(Obj, _, _, _, _, _),
|
||||||
throw(error(existence_error(object, Obj), Obj::asserta(Clause), Sender)).
|
throw(error(existence_error(object, Obj), Obj::asserta(Clause), Sender)).
|
||||||
|
|
||||||
'$lgt_asserta'(Obj, (Head:-Body), Sender, Scope) :-
|
'$lgt_asserta'(Obj, (Head:-Body), Sender, Scope) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
|
||||||
('$lgt_once'(Dcl, Head, PScope, Type, Meta, SContainer, _) ->
|
('$lgt_once'(Dcl, Head, PScope, Type, Meta, SContainer, _) ->
|
||||||
true
|
true
|
||||||
@ -1355,7 +1340,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(permission_error(modify, static_predicate, Head), Obj::asserta((Head:-Body)), Sender))).
|
throw(error(permission_error(modify, static_predicate, Head), Obj::asserta((Head:-Body)), Sender))).
|
||||||
|
|
||||||
'$lgt_asserta'(Obj, Head, Sender, Scope) :-
|
'$lgt_asserta'(Obj, Head, Sender, Scope) :-
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
|
||||||
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
||||||
true
|
true
|
||||||
@ -1400,12 +1385,12 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(type_error(callable, Body), Obj::assertz((Head:-Body)), Sender)).
|
throw(error(type_error(callable, Body), Obj::assertz((Head:-Body)), Sender)).
|
||||||
|
|
||||||
'$lgt_assertz'(Obj, Clause, Sender, _) :-
|
'$lgt_assertz'(Obj, Clause, Sender, _) :-
|
||||||
\+ '$lgt_current_object_'(Obj, _, _, _, _),
|
\+ '$lgt_current_object_'(Obj, _, _, _, _, _),
|
||||||
throw(error(existence_error(object, Obj), Obj::assertz(Clause), Sender)).
|
throw(error(existence_error(object, Obj), Obj::assertz(Clause), Sender)).
|
||||||
|
|
||||||
'$lgt_assertz'(Obj, (Head:-Body), Sender, Scope) :-
|
'$lgt_assertz'(Obj, (Head:-Body), Sender, Scope) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
|
||||||
('$lgt_once'(Dcl, Head, PScope, Type, Meta, SContainer, _) ->
|
('$lgt_once'(Dcl, Head, PScope, Type, Meta, SContainer, _) ->
|
||||||
true
|
true
|
||||||
@ -1442,7 +1427,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(permission_error(modify, static_predicate, Head), Obj::assertz((Head:-Body)), Sender))).
|
throw(error(permission_error(modify, static_predicate, Head), Obj::assertz((Head:-Body)), Sender))).
|
||||||
|
|
||||||
'$lgt_assertz'(Obj, Head, Sender, Scope) :-
|
'$lgt_assertz'(Obj, Head, Sender, Scope) :-
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
|
||||||
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
||||||
true
|
true
|
||||||
@ -1484,11 +1469,11 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(type_error(callable, Body), Obj::clause(Head, Body), Sender)).
|
throw(error(type_error(callable, Body), Obj::clause(Head, Body), Sender)).
|
||||||
|
|
||||||
'$lgt_clause'(Obj, Head, Body, Sender, _) :-
|
'$lgt_clause'(Obj, Head, Body, Sender, _) :-
|
||||||
\+ '$lgt_current_object_'(Obj, _, _, _, _),
|
\+ '$lgt_current_object_'(Obj, _, _, _, _, _),
|
||||||
throw(error(existence_error(object, Obj), Obj::clause(Head, Body), Sender)).
|
throw(error(existence_error(object, Obj), Obj::clause(Head, Body), Sender)).
|
||||||
|
|
||||||
'$lgt_clause'(Obj, Head, Body, Sender, Scope) :-
|
'$lgt_clause'(Obj, Head, Body, Sender, Scope) :-
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
|
||||||
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
||||||
(Type = (dynamic) ->
|
(Type = (dynamic) ->
|
||||||
@ -1526,12 +1511,12 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(type_error(callable, Head), Obj::retract((Head:-Body)), Sender)).
|
throw(error(type_error(callable, Head), Obj::retract((Head:-Body)), Sender)).
|
||||||
|
|
||||||
'$lgt_retract'(Obj, Clause, Sender, _) :-
|
'$lgt_retract'(Obj, Clause, Sender, _) :-
|
||||||
\+ '$lgt_current_object_'(Obj, _, _, _, _),
|
\+ '$lgt_current_object_'(Obj, _, _, _, _, _),
|
||||||
throw(error(existence_error(object, Obj), Obj::retract(Clause), Sender)).
|
throw(error(existence_error(object, Obj), Obj::retract(Clause), Sender)).
|
||||||
|
|
||||||
'$lgt_retract'(Obj, (Head:-Body), Sender, Scope) :-
|
'$lgt_retract'(Obj, (Head:-Body), Sender, Scope) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
|
||||||
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
||||||
(Type = (dynamic) ->
|
(Type = (dynamic) ->
|
||||||
@ -1555,7 +1540,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(existence_error(predicate_declaration, Head), Obj::retract((Head:-Body)), Sender))).
|
throw(error(existence_error(predicate_declaration, Head), Obj::retract((Head:-Body)), Sender))).
|
||||||
|
|
||||||
'$lgt_retract'(Obj, Head, Sender, Scope) :-
|
'$lgt_retract'(Obj, Head, Sender, Scope) :-
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
|
||||||
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
||||||
(Type = (dynamic) ->
|
(Type = (dynamic) ->
|
||||||
@ -1591,11 +1576,11 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
throw(error(type_error(callable, Head), Obj::retractall(Head), Sender)).
|
throw(error(type_error(callable, Head), Obj::retractall(Head), Sender)).
|
||||||
|
|
||||||
'$lgt_retractall'(Obj, Head, Sender, _) :-
|
'$lgt_retractall'(Obj, Head, Sender, _) :-
|
||||||
\+ '$lgt_current_object_'(Obj, _, _, _, _),
|
\+ '$lgt_current_object_'(Obj, _, _, _, _, _),
|
||||||
throw(error(existence_error(object, Obj), Obj::retractall(Head), Sender)).
|
throw(error(existence_error(object, Obj), Obj::retractall(Head), Sender)).
|
||||||
|
|
||||||
'$lgt_retractall'(Obj, Head, Sender, Scope) :-
|
'$lgt_retractall'(Obj, Head, Sender, Scope) :-
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
|
'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
|
||||||
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
|
||||||
(Type = (dynamic) ->
|
(Type = (dynamic) ->
|
||||||
@ -1631,7 +1616,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
|
|
||||||
% '$lgt_phrase'(+ruleset, ?list)
|
% '$lgt_phrase'(+ruleset, ?list)
|
||||||
%
|
%
|
||||||
% removes duplicated and redeclared predicates
|
% phrase/2 built-in method
|
||||||
|
|
||||||
'$lgt_phrase'(Obj, Ruleset, Input, Sender, Scope) :-
|
'$lgt_phrase'(Obj, Ruleset, Input, Sender, Scope) :-
|
||||||
catch(
|
catch(
|
||||||
@ -1643,7 +1628,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
|
|
||||||
% '$lgt_phrase'(+ruleset, ?list, ?list)
|
% '$lgt_phrase'(+ruleset, ?list, ?list)
|
||||||
%
|
%
|
||||||
% removes duplicated and redeclared predicates
|
% phrase/3 built-in method
|
||||||
|
|
||||||
'$lgt_phrase'(Obj, Ruleset, Input, Rest, Sender, _) :-
|
'$lgt_phrase'(Obj, Ruleset, Input, Rest, Sender, _) :-
|
||||||
var(Ruleset),
|
var(Ruleset),
|
||||||
@ -1663,11 +1648,19 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
\+ '$lgt_proper_list'(Rest),
|
\+ '$lgt_proper_list'(Rest),
|
||||||
throw(error(type_error(list, Rest), Obj::phrase(Ruleset, Input, Rest), Sender)).
|
throw(error(type_error(list, Rest), Obj::phrase(Ruleset, Input, Rest), Sender)).
|
||||||
|
|
||||||
|
'$lgt_phrase'(_, [], Input, Rest, _, _) :-
|
||||||
|
!,
|
||||||
|
Input = Rest.
|
||||||
|
|
||||||
|
'$lgt_phrase'(_, [Head| Tail], Input, Rest, _, _) :-
|
||||||
|
!,
|
||||||
|
'$lgt_append'([Head| Tail], Rest, Input).
|
||||||
|
|
||||||
'$lgt_phrase'(Obj, Ruleset, Input, Rest, Sender, Scope) :-
|
'$lgt_phrase'(Obj, Ruleset, Input, Rest, Sender, Scope) :-
|
||||||
Ruleset =.. [Functor| Args],
|
Ruleset =.. [Functor| Args],
|
||||||
'$lgt_append'(Args, [Input, Rest], Args2),
|
'$lgt_append'(Args, [Input, Rest], Args2),
|
||||||
Pred =.. [Functor| Args2],
|
Pred =.. [Functor| Args2],
|
||||||
'$lgt_current_object_'(Obj, _, Dcl, Def, _),
|
'$lgt_current_object_'(Obj, _, Dcl, Def, _, _),
|
||||||
('$lgt_once'(Dcl, Pred, PScope, _, _, SContainer, _) ->
|
('$lgt_once'(Dcl, Pred, PScope, _, _, SContainer, _) ->
|
||||||
((\+ \+ PScope = Scope; Sender = SContainer) ->
|
((\+ \+ PScope = Scope; Sender = SContainer) ->
|
||||||
'$lgt_once'(Def, Pred, Sender, Obj, Obj, Call, _),
|
'$lgt_once'(Def, Pred, Sender, Obj, Obj, Call, _),
|
||||||
@ -1707,7 +1700,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
% '$lgt_send_to_self_nv'(+object, +term, +object)
|
% '$lgt_send_to_self_nv'(+object, +term, +object)
|
||||||
|
|
||||||
'$lgt_send_to_self_nv'(Self, Pred, This) :-
|
'$lgt_send_to_self_nv'(Self, Pred, This) :-
|
||||||
'$lgt_current_object_'(Self, _, Dcl, Def, _),
|
'$lgt_current_object_'(Self, _, Dcl, Def, _, _),
|
||||||
('$lgt_call'(Dcl, Pred, Scope, _, _, SContainer, _) ->
|
('$lgt_call'(Dcl, Pred, Scope, _, _, SContainer, _) ->
|
||||||
((Scope = p(_); This = SContainer) ->
|
((Scope = p(_); This = SContainer) ->
|
||||||
'$lgt_once'(Def, Pred, This, Self, Self, Call, _),
|
'$lgt_once'(Def, Pred, This, Self, Self, Call, _),
|
||||||
@ -1726,7 +1719,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
|
|
||||||
'$lgt_send_to_object'(Obj, Pred, Sender) :-
|
'$lgt_send_to_object'(Obj, Pred, Sender) :-
|
||||||
nonvar(Obj) ->
|
nonvar(Obj) ->
|
||||||
('$lgt_current_object_'(Obj, _, Dcl, Def, _) ->
|
('$lgt_current_object_'(Obj, _, Dcl, Def, _, _) ->
|
||||||
(nonvar(Pred) ->
|
(nonvar(Pred) ->
|
||||||
('$lgt_call'(Dcl, Pred, Scope, _, _, _, _) ->
|
('$lgt_call'(Dcl, Pred, Scope, _, _, _, _) ->
|
||||||
(Scope = p(p(_)) ->
|
(Scope = p(p(_)) ->
|
||||||
@ -1756,7 +1749,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
% '$lgt_send_to_object_nv'(+object, +term, +object)
|
% '$lgt_send_to_object_nv'(+object, +term, +object)
|
||||||
|
|
||||||
'$lgt_send_to_object_nv'(Obj, Pred, Sender) :-
|
'$lgt_send_to_object_nv'(Obj, Pred, Sender) :-
|
||||||
'$lgt_current_object_'(Obj, _, Dcl, Def, _) ->
|
'$lgt_current_object_'(Obj, _, Dcl, Def, _, _) ->
|
||||||
('$lgt_call'(Dcl, Pred, Scope, _, _, _, _) ->
|
('$lgt_call'(Dcl, Pred, Scope, _, _, _, _) ->
|
||||||
(Scope = p(p(_)) ->
|
(Scope = p(p(_)) ->
|
||||||
'$lgt_once'(Def, Pred, Sender, Obj, Obj, Call, _),
|
'$lgt_once'(Def, Pred, Sender, Obj, Obj, Call, _),
|
||||||
@ -1791,10 +1784,10 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
% '$lgt_send_to_super_nv'(+object, +term, +object, +object)
|
% '$lgt_send_to_super_nv'(+object, +term, +object, +object)
|
||||||
|
|
||||||
'$lgt_send_to_super_nv'(Self, Pred, This, Sender) :-
|
'$lgt_send_to_super_nv'(Self, Pred, This, Sender) :-
|
||||||
'$lgt_current_object_'(Self, _, Dcl, _, _),
|
'$lgt_current_object_'(Self, _, Dcl, _, _, _),
|
||||||
('$lgt_call'(Dcl, Pred, Scope, _, _, SContainer, _) ->
|
('$lgt_call'(Dcl, Pred, Scope, _, _, SContainer, _) ->
|
||||||
((Scope = p(_); This = SContainer) ->
|
((Scope = p(_); This = SContainer) ->
|
||||||
'$lgt_current_object_'(This, _, _, _, Super),
|
'$lgt_current_object_'(This, _, _, _, Super, _),
|
||||||
'$lgt_once'(Super, Pred, Sender, This, Self, Call, Container),
|
'$lgt_once'(Super, Pred, Sender, This, Self, Call, Container),
|
||||||
(Container \= This ->
|
(Container \= This ->
|
||||||
call(Call)
|
call(Call)
|
||||||
@ -1821,7 +1814,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
(Obj = user ->
|
(Obj = user ->
|
||||||
call(Pred)
|
call(Pred)
|
||||||
;
|
;
|
||||||
'$lgt_current_object_'(Obj, Prefix, _, _, _),
|
'$lgt_current_object_'(Obj, Prefix, _, _, _, _),
|
||||||
'$lgt_prefix'(Context, Prefix),
|
'$lgt_prefix'(Context, Prefix),
|
||||||
'$lgt_sender'(Context, Sender),
|
'$lgt_sender'(Context, Sender),
|
||||||
'$lgt_this'(Context, Obj),
|
'$lgt_this'(Context, Obj),
|
||||||
@ -1839,7 +1832,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
'$lgt_sender'(Context, Sender),
|
'$lgt_sender'(Context, Sender),
|
||||||
'$lgt_this'(Context, This),
|
'$lgt_this'(Context, This),
|
||||||
'$lgt_self'(Context, Self),
|
'$lgt_self'(Context, Self),
|
||||||
'$lgt_current_object_'(This, _, _, Def, _),
|
'$lgt_current_object_'(This, _, _, Def, _, _),
|
||||||
('$lgt_call'(Def, Pred, Sender, This, Self, Call) ->
|
('$lgt_call'(Def, Pred, Sender, This, Self, Call) ->
|
||||||
call(Call)
|
call(Call)
|
||||||
;
|
;
|
||||||
@ -1861,7 +1854,7 @@ current_logtalk_flag(version, version(2, 15, 2)).
|
|||||||
% the following clauses correspond to a virtual
|
% the following clauses correspond to a virtual
|
||||||
% compilation of the pseudo-object user
|
% compilation of the pseudo-object user
|
||||||
|
|
||||||
'$lgt_current_object_'(user, user0_, user0__dcl, user0__def, _).
|
'$lgt_current_object_'(user, user0_, user0__dcl, user0__def, _, static).
|
||||||
|
|
||||||
user0_(user0__dcl, user0__def, _, _, _, _, _).
|
user0_(user0__dcl, user0__def, _, _, _, _, _).
|
||||||
|
|
||||||
@ -1904,15 +1897,15 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
atom_concat('$lgt_', _, Functor).
|
atom_concat('$lgt_', _, Functor).
|
||||||
|
|
||||||
'$lgt_hidden_functor'(Functor) :-
|
'$lgt_hidden_functor'(Functor) :-
|
||||||
'$lgt_current_category_'(_, Prefix),
|
'$lgt_current_category_'(_, Prefix, _),
|
||||||
atom_concat(Prefix, _, Functor).
|
atom_concat(Prefix, _, Functor).
|
||||||
|
|
||||||
'$lgt_hidden_functor'(Functor) :-
|
'$lgt_hidden_functor'(Functor) :-
|
||||||
'$lgt_current_object_'(_, Prefix, _, _, _),
|
'$lgt_current_object_'(_, Prefix, _, _, _, _),
|
||||||
atom_concat(Prefix, _, Functor).
|
atom_concat(Prefix, _, Functor).
|
||||||
|
|
||||||
'$lgt_hidden_functor'(Functor) :-
|
'$lgt_hidden_functor'(Functor) :-
|
||||||
'$lgt_current_protocol_'(_, Prefix),
|
'$lgt_current_protocol_'(_, Prefix, _),
|
||||||
atom_concat(Prefix, _, Functor).
|
atom_concat(Prefix, _, Functor).
|
||||||
|
|
||||||
|
|
||||||
@ -1962,7 +1955,7 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
% prints a warning if an entity of the same name is already loaded
|
% prints a warning if an entity of the same name is already loaded
|
||||||
|
|
||||||
'$lgt_report_redefined_entity'(Entity) :-
|
'$lgt_report_redefined_entity'(Entity) :-
|
||||||
'$lgt_current_object_'(Entity, _, _, _, _),
|
'$lgt_current_object_'(Entity, _, _, _, _, _),
|
||||||
!,
|
!,
|
||||||
write('WARNING! redefining object '), write(Entity), nl.
|
write('WARNING! redefining object '), write(Entity), nl.
|
||||||
|
|
||||||
@ -1972,17 +1965,17 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
catch(number_codes(Arity, Codes2), _, fail),
|
catch(number_codes(Arity, Codes2), _, fail),
|
||||||
atom_codes(Functor, Codes1),
|
atom_codes(Functor, Codes1),
|
||||||
functor(Loaded, Functor, Arity),
|
functor(Loaded, Functor, Arity),
|
||||||
'$lgt_current_object_'(Loaded, _, _, _, _),
|
'$lgt_current_object_'(Loaded, _, _, _, _, _),
|
||||||
!,
|
!,
|
||||||
write('WARNING! redefining object '), write(Entity), nl.
|
write('WARNING! redefining object '), write(Entity), nl.
|
||||||
|
|
||||||
'$lgt_report_redefined_entity'(Entity) :-
|
'$lgt_report_redefined_entity'(Entity) :-
|
||||||
'$lgt_current_protocol_'(Entity, _),
|
'$lgt_current_protocol_'(Entity, _, _),
|
||||||
!,
|
!,
|
||||||
write('WARNING! redefining protocol '), write(Entity), nl.
|
write('WARNING! redefining protocol '), write(Entity), nl.
|
||||||
|
|
||||||
'$lgt_report_redefined_entity'(Entity) :-
|
'$lgt_report_redefined_entity'(Entity) :-
|
||||||
'$lgt_current_category_'(Entity, _),
|
'$lgt_current_category_'(Entity, _, _),
|
||||||
!,
|
!,
|
||||||
write('WARNING! redefining category '), write(Entity), nl.
|
write('WARNING! redefining category '), write(Entity), nl.
|
||||||
|
|
||||||
@ -2464,7 +2457,10 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
% dynamic entity directive
|
% dynamic entity directive
|
||||||
|
|
||||||
'$lgt_tr_directive'((dynamic), []) :-
|
'$lgt_tr_directive'((dynamic), []) :-
|
||||||
assertz('$lgt_entity_comp_mode_'((dynamic))).
|
!,
|
||||||
|
assertz('$lgt_entity_comp_mode_'((dynamic))),
|
||||||
|
'$lgt_entity_'(Type, _, _, _),
|
||||||
|
'$lgt_update_entity_comp_mode'(Type).
|
||||||
|
|
||||||
|
|
||||||
'$lgt_tr_directive'(initialization, [Goal]) :-
|
'$lgt_tr_directive'(initialization, [Goal]) :-
|
||||||
@ -3534,7 +3530,7 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
assertz('$lgt_object_'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef)),
|
assertz('$lgt_object_'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef)),
|
||||||
Term =.. [Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef],
|
Term =.. [Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef],
|
||||||
assertz('$lgt_entity_functors_'(Term)),
|
assertz('$lgt_entity_functors_'(Term)),
|
||||||
assertz('$lgt_rclause_'('$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super))),
|
assertz('$lgt_rclause_'('$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, static))),
|
||||||
assertz('$lgt_entity_'(object, Obj, Prefix, Dcl)).
|
assertz('$lgt_entity_'(object, Obj, Prefix, Dcl)).
|
||||||
|
|
||||||
|
|
||||||
@ -3550,7 +3546,7 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
assertz('$lgt_category_'(Ctg, Prefix, Dcl, Def)),
|
assertz('$lgt_category_'(Ctg, Prefix, Dcl, Def)),
|
||||||
Term =.. [Prefix, Dcl, Def],
|
Term =.. [Prefix, Dcl, Def],
|
||||||
assertz('$lgt_entity_functors_'(Term)),
|
assertz('$lgt_entity_functors_'(Term)),
|
||||||
assertz('$lgt_rclause_'('$lgt_current_category_'(Ctg, Prefix))),
|
assertz('$lgt_rclause_'('$lgt_current_category_'(Ctg, Prefix, static))),
|
||||||
assertz('$lgt_entity_'(category, Ctg, Prefix, Dcl)).
|
assertz('$lgt_entity_'(category, Ctg, Prefix, Dcl)).
|
||||||
|
|
||||||
|
|
||||||
@ -3566,11 +3562,30 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
assertz('$lgt_protocol_'(Ptc, Prefix, Dcl)),
|
assertz('$lgt_protocol_'(Ptc, Prefix, Dcl)),
|
||||||
Term =.. [Prefix, Dcl],
|
Term =.. [Prefix, Dcl],
|
||||||
assertz('$lgt_entity_functors_'(Term)),
|
assertz('$lgt_entity_functors_'(Term)),
|
||||||
assertz('$lgt_rclause_'('$lgt_current_protocol_'(Ptc, Prefix))),
|
assertz('$lgt_rclause_'('$lgt_current_protocol_'(Ptc, Prefix, static))),
|
||||||
assertz('$lgt_entity_'(protocol, Ptc, Prefix, Dcl)).
|
assertz('$lgt_entity_'(protocol, Ptc, Prefix, Dcl)).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
% '$lgt_update_entity_comp_mode'(+atom)
|
||||||
|
%
|
||||||
|
% updates the entity compilation mode to "dynamic"
|
||||||
|
% (entities are static by default)
|
||||||
|
|
||||||
|
'$lgt_update_entity_comp_mode'(object) :-
|
||||||
|
retract('$lgt_rclause_'('$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, _))),
|
||||||
|
assertz('$lgt_rclause_'('$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, (dynamic)))).
|
||||||
|
|
||||||
|
'$lgt_update_entity_comp_mode'(protocol) :-
|
||||||
|
retract('$lgt_rclause_'('$lgt_current_protocol_'(Ptc, Prefix, _))),
|
||||||
|
assertz('$lgt_rclause_'('$lgt_current_protocol_'(Ptc, Prefix, (dynamic)))).
|
||||||
|
|
||||||
|
'$lgt_update_entity_comp_mode'(category) :-
|
||||||
|
retract('$lgt_rclause_'('$lgt_current_category_'(Ctg, Prefix, _))),
|
||||||
|
assertz('$lgt_rclause_'('$lgt_current_category_'(Ctg, Prefix, (dynamic)))).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% '$lgt_tr_implements_protocol'(+list, +object_identifier)
|
% '$lgt_tr_implements_protocol'(+list, +object_identifier)
|
||||||
% '$lgt_tr_implements_protocol'(+list, +category_identifier)
|
% '$lgt_tr_implements_protocol'(+list, +category_identifier)
|
||||||
%
|
%
|
||||||
@ -3769,7 +3784,7 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
'$lgt_report_unknown_objects' :-
|
'$lgt_report_unknown_objects' :-
|
||||||
findall(
|
findall(
|
||||||
Obj,
|
Obj,
|
||||||
('$lgt_referenced_object_'(Obj), \+ ('$lgt_current_object_'(Obj, _, _, _, _); '$lgt_entity_'(_, Obj, _, _))),
|
('$lgt_referenced_object_'(Obj), \+ ('$lgt_current_object_'(Obj, _, _, _, _, _); '$lgt_entity_'(_, Obj, _, _))),
|
||||||
Objs),
|
Objs),
|
||||||
(Objs \= [] ->
|
(Objs \= [] ->
|
||||||
write('WARNING! references to unknown objects: '), writeq(Objs), nl
|
write('WARNING! references to unknown objects: '), writeq(Objs), nl
|
||||||
@ -3785,7 +3800,7 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
'$lgt_report_unknown_protocols' :-
|
'$lgt_report_unknown_protocols' :-
|
||||||
findall(
|
findall(
|
||||||
Ptc,
|
Ptc,
|
||||||
('$lgt_referenced_protocol_'(Ptc), \+ ('$lgt_current_protocol_'(Ptc, _); '$lgt_entity_'(_, Ptc, _, _))),
|
('$lgt_referenced_protocol_'(Ptc), \+ ('$lgt_current_protocol_'(Ptc, _, _); '$lgt_entity_'(_, Ptc, _, _))),
|
||||||
Ptcs),
|
Ptcs),
|
||||||
(Ptcs \= [] ->
|
(Ptcs \= [] ->
|
||||||
write('WARNING! references to unknown protocols: '), writeq(Ptcs), nl
|
write('WARNING! references to unknown protocols: '), writeq(Ptcs), nl
|
||||||
@ -3801,7 +3816,7 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
'$lgt_report_unknown_categories' :-
|
'$lgt_report_unknown_categories' :-
|
||||||
findall(
|
findall(
|
||||||
Ctg,
|
Ctg,
|
||||||
('$lgt_referenced_category_'(Ctg), \+ ('$lgt_current_category_'(Ctg, _); '$lgt_entity_'(_, Ctg, _, _))),
|
('$lgt_referenced_category_'(Ctg), \+ ('$lgt_current_category_'(Ctg, _, _); '$lgt_entity_'(_, Ctg, _, _))),
|
||||||
Ctgs),
|
Ctgs),
|
||||||
(Ctgs \= [] ->
|
(Ctgs \= [] ->
|
||||||
write('WARNING! references to unknown categories: '), writeq(Ctgs), nl
|
write('WARNING! references to unknown categories: '), writeq(Ctgs), nl
|
||||||
@ -5004,9 +5019,9 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
|
|
||||||
|
|
||||||
'$lgt_retract_old_relation_clauses'(Entity) :-
|
'$lgt_retract_old_relation_clauses'(Entity) :-
|
||||||
retractall('$lgt_current_object_'(Entity, _, _, _, _)),
|
retractall('$lgt_current_object_'(Entity, _, _, _, _, _)),
|
||||||
retractall('$lgt_current_protocol_'(Entity, _)),
|
retractall('$lgt_current_protocol_'(Entity, _, _)),
|
||||||
retractall('$lgt_current_category_'(Entity, _)),
|
retractall('$lgt_current_category_'(Entity, _, _)),
|
||||||
retractall('$lgt_implements_protocol_'(Entity, _, _)),
|
retractall('$lgt_implements_protocol_'(Entity, _, _)),
|
||||||
retractall('$lgt_imports_category_'(Entity, _, _)),
|
retractall('$lgt_imports_category_'(Entity, _, _)),
|
||||||
retractall('$lgt_instantiates_class_'(Entity, _, _)),
|
retractall('$lgt_instantiates_class_'(Entity, _, _)),
|
||||||
@ -5580,24 +5595,34 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
'$lgt_dcg_rule'((RHead --> RBody), CHead) :-
|
'$lgt_dcg_rule'((RHead --> RBody), CHead) :-
|
||||||
RBody == [],
|
RBody == [],
|
||||||
!,
|
!,
|
||||||
'$lgt_dcg_head'(RHead, CHead, S, S).
|
'$lgt_dcg_head'(RHead, CHead, _, _, S, S, _).
|
||||||
|
|
||||||
'$lgt_dcg_rule'((RHead --> RBody), (CHead :- CBody)) :-
|
'$lgt_dcg_rule'((RHead --> RBody), (CHead :- CBody)) :-
|
||||||
'$lgt_dcg_head'(RHead, CHead, S0, S),
|
'$lgt_dcg_head'(RHead, CHead, Body, Body2, S0, S, S1),
|
||||||
'$lgt_dcg_body'(RBody, Body, S0, S),
|
'$lgt_dcg_body'(RBody, Body, S0, S),
|
||||||
'$lgt_dcg_fold_unifications'(Body, CBody, S0, S).
|
'$lgt_dcg_fold_unifications'(Body2, CBody, S1).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% '$lgt_dcg_head'(@dcghead, -head, @var, @var)
|
% '$lgt_dcg_head'(@dcghead, -head, @goal, -goal, @var, @var, -var)
|
||||||
%
|
%
|
||||||
% translates DCG rule head to a Prolog clause head
|
% translates DCG rule head to a Prolog clause head
|
||||||
|
% (the last argument returns the variable representing the ouput list)
|
||||||
|
|
||||||
'$lgt_dcg_head'(Nonterminal, _, _, _) :-
|
'$lgt_dcg_head'(RHead, _, _, _, _, _, _) :-
|
||||||
var(Nonterminal),
|
var(RHead),
|
||||||
throw(instantiation_error).
|
throw(instantiation_error).
|
||||||
|
|
||||||
'$lgt_dcg_head'(Nonterminal, CHead, S0, S) :-
|
'$lgt_dcg_head'((_, Terminals), _, _, _, _, _, _) :-
|
||||||
|
\+ '$lgt_proper_list'(Terminals),
|
||||||
|
throw(type_error(list, Terminals)).
|
||||||
|
|
||||||
|
'$lgt_dcg_head'((Nonterminal, Terminals), CHead, Body, (Body,Goal), S0, S, S1) :-
|
||||||
|
!,
|
||||||
|
'$lgt_dcg_terminals'(Terminals, Goal, S1, S),
|
||||||
|
'$lgt_dcg_goal'(Nonterminal, CHead, S0, S1).
|
||||||
|
|
||||||
|
'$lgt_dcg_head'(Nonterminal, CHead, Body, Body, S0, S, S) :-
|
||||||
'$lgt_dcg_goal'(Nonterminal, CHead, S0, S).
|
'$lgt_dcg_goal'(Nonterminal, CHead, S0, S).
|
||||||
|
|
||||||
|
|
||||||
@ -5638,18 +5663,16 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
'$lgt_dcg_body'(!, (!, S0=S), S0, S) :-
|
'$lgt_dcg_body'(!, (!, S0=S), S0, S) :-
|
||||||
!.
|
!.
|
||||||
|
|
||||||
'$lgt_dcg_body'([], (S0=S), S0, S) :-
|
|
||||||
!.
|
|
||||||
|
|
||||||
'$lgt_dcg_body'(\+ RGoal, CGoal, S0, S) :-
|
'$lgt_dcg_body'(\+ RGoal, CGoal, S0, S) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_dcg_body'((RGoal -> {fail};{true}), CGoal, S0, S).
|
'$lgt_dcg_body'((RGoal -> {fail};{true}), CGoal, S0, S).
|
||||||
|
|
||||||
'$lgt_dcg_body'([Terminal| Terminals], (CGoal,CGoals), S0, S) :-
|
'$lgt_dcg_body'([], (S0=S), S0, S) :-
|
||||||
|
!.
|
||||||
|
|
||||||
|
'$lgt_dcg_body'([Terminal| Terminals], CGoal, S0, S) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_dcg_terminal'(Terminal, CGoal, S0, S1),
|
'$lgt_dcg_terminals'([Terminal| Terminals], CGoal, S0, S).
|
||||||
'$lgt_dcg_body'(Terminals, Goals, S1, S),
|
|
||||||
'$lgt_dcg_simplify_terminals'(Goals, CGoals).
|
|
||||||
|
|
||||||
'$lgt_dcg_body'(Non_terminal, CGoal, S0, S) :-
|
'$lgt_dcg_body'(Non_terminal, CGoal, S0, S) :-
|
||||||
'$lgt_dcg_goal'(Non_terminal, CGoal, S0, S).
|
'$lgt_dcg_goal'(Non_terminal, CGoal, S0, S).
|
||||||
@ -5671,49 +5694,52 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
% '$lgt_dcg_goal'(@goal, -goal, @var, @var)
|
% '$lgt_dcg_terminals'(@list, -goal, @var, @var)
|
||||||
%
|
%
|
||||||
% translate terminal; note that we don't use the traditional 'C'/3 predicate
|
% translate list of terminals
|
||||||
|
|
||||||
'$lgt_dcg_terminal'(Goal, S0=[Goal|S], S0, S).
|
'$lgt_dcg_terminals'(Terminals, S0=List, S0, S) :-
|
||||||
|
'$lgt_dcg_terminals'(Terminals, S, List).
|
||||||
|
|
||||||
|
|
||||||
|
'$lgt_dcg_terminals'([], S, S).
|
||||||
|
|
||||||
|
'$lgt_dcg_terminals'([Terminal| Terminals], S, [Terminal| Rest]) :-
|
||||||
|
'$lgt_dcg_terminals'(Terminals, S, Rest).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% '$lgt_dcg_fold_unifications'(+goal, -goal)
|
% '$lgt_dcg_fold_unifications'(+goal, -goal, @var)
|
||||||
%
|
%
|
||||||
% folds redundant calls to =/2 by calling the unification goals
|
% folds redundant calls to =/2 by calling the unification
|
||||||
|
% goals execept for output unifications
|
||||||
|
|
||||||
'$lgt_dcg_fold_unifications'((Goal1 -> Goal2), (SGoal1 -> SGoal2), S0, S) :-
|
'$lgt_dcg_fold_unifications'((Goal1 -> Goal2), (SGoal1 -> SGoal2), S) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_dcg_fold_unifications'(Goal1, SGoal1, S0, S),
|
'$lgt_dcg_fold_unifications'(Goal1, SGoal1, S),
|
||||||
(Goal2 = (_,_) ->
|
'$lgt_dcg_fold_unifications'(Goal2, SGoal2, S).
|
||||||
'$lgt_dcg_fold_unifications'(Goal2, SGoal2, S0, S)
|
|
||||||
;
|
|
||||||
Goal2 = SGoal2).
|
|
||||||
|
|
||||||
'$lgt_dcg_fold_unifications'((Goal1;Goal2), (SGoal1;SGoal2), S0, S) :-
|
'$lgt_dcg_fold_unifications'((Goal1;Goal2), (SGoal1;SGoal2), S) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_dcg_fold_unifications'(Goal1, SGoal1, S0, S),
|
'$lgt_dcg_fold_unifications'(Goal1, SGoal1, S),
|
||||||
'$lgt_dcg_fold_unifications'(Goal2, SGoal2, S0, S).
|
'$lgt_dcg_fold_unifications'(Goal2, SGoal2, S).
|
||||||
|
|
||||||
'$lgt_dcg_fold_unifications'((Goal1,Goal2), Body, S0, S) :-
|
'$lgt_dcg_fold_unifications'((Goal1,Goal2), SGoal, S) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_dcg_fold_unifications'(Goal1, SGoal1, S0, S),
|
'$lgt_dcg_fold_unifications'(Goal1, SGoal1, S),
|
||||||
'$lgt_dcg_fold_unifications'(Goal2, SGoal2, S0, S),
|
'$lgt_dcg_fold_unifications'(Goal2, SGoal2, S),
|
||||||
'$lgt_dcg_simplify_and'((SGoal1,SGoal2), Body).
|
'$lgt_dcg_simplify_and'((SGoal1,SGoal2), SGoal).
|
||||||
|
|
||||||
'$lgt_dcg_fold_unifications'(S1=S2, S0=S, S0, S) :-
|
'$lgt_dcg_fold_unifications'(S1=S2, S1=S2, S) :-
|
||||||
S1 == S0,
|
(S1 == S; S2 == S), % avoid output unifications
|
||||||
S2 == S,
|
|
||||||
!.
|
!.
|
||||||
|
|
||||||
'$lgt_dcg_fold_unifications'(S1=S2, true, S0, S) :-
|
'$lgt_dcg_fold_unifications'(S1=S2, true, _) :-
|
||||||
var(S2),
|
var(S2), % avoid unification with list of terminals
|
||||||
(S1 \== S0; S2 \== S),
|
|
||||||
!,
|
!,
|
||||||
S1 = S2.
|
S1 = S2.
|
||||||
|
|
||||||
'$lgt_dcg_fold_unifications'(Body, Body, _, _).
|
'$lgt_dcg_fold_unifications'(Goal, Goal, _).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -5721,6 +5747,16 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
%
|
%
|
||||||
% removes redundant calls to true/0 and flats a conjunction of goals
|
% removes redundant calls to true/0 and flats a conjunction of goals
|
||||||
|
|
||||||
|
'$lgt_dcg_simplify_and'((Goal1 -> Goal2), (SGoal1 -> SGoal2)) :-
|
||||||
|
!,
|
||||||
|
'$lgt_dcg_simplify_and'(Goal1, SGoal1),
|
||||||
|
'$lgt_dcg_simplify_and'(Goal2, SGoal2).
|
||||||
|
|
||||||
|
'$lgt_dcg_simplify_and'((Goal1;Goal2), (SGoal1;SGoal2)) :-
|
||||||
|
!,
|
||||||
|
'$lgt_dcg_simplify_and'(Goal1, SGoal1),
|
||||||
|
'$lgt_dcg_simplify_and'(Goal2, SGoal2).
|
||||||
|
|
||||||
'$lgt_dcg_simplify_and'(((Goal1,Goal2),Goal3), Body) :-
|
'$lgt_dcg_simplify_and'(((Goal1,Goal2),Goal3), Body) :-
|
||||||
!,
|
!,
|
||||||
'$lgt_dcg_simplify_and'((Goal1,(Goal2,Goal3)), Body).
|
'$lgt_dcg_simplify_and'((Goal1,(Goal2,Goal3)), Body).
|
||||||
@ -5741,19 +5777,6 @@ user0__def(Pred, _, _, _, Pred, user).
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
% '$lgt_dcg_simplify_terminals'(+goal, -goal)
|
|
||||||
%
|
|
||||||
% simplifies code generated for list of terminals by folding the chain of unifications
|
|
||||||
|
|
||||||
'$lgt_dcg_simplify_terminals'((S=L,Goal1), Goal2) :-
|
|
||||||
!,
|
|
||||||
S = L,
|
|
||||||
'$lgt_dcg_simplify_terminals'(Goal1, Goal2).
|
|
||||||
|
|
||||||
'$lgt_dcg_simplify_terminals'(Goal, Goal).
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%
|
%
|
||||||
% Logtalk - Object oriented extension to Prolog
|
% Logtalk - Object oriented extension to Prolog
|
||||||
% Release 2.15.2
|
% Release 2.15.3
|
||||||
%
|
%
|
||||||
% configuration file for YAP Prolog 4.3.23 or later
|
% configuration file for YAP Prolog 4.3.23 or later
|
||||||
%
|
%
|
||||||
|
Reference in New Issue
Block a user