Logtalk 2.27.0 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1539 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura
2006-02-10 17:44:05 +00:00
parent 42ca7aa79f
commit 9fe4d26c59
294 changed files with 3358 additions and 1376 deletions

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,9 +1,9 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -25,20 +25,18 @@
randomp, % random
random,
systemp, % os interface protocol
termp, term, % types
atomic,
atom, callable,
characterp, character,
number, float, integer, natural,
compound,
listp, list, difflist,
numberlistp, numberlist,
varlist,
listp, list, list1,
difflist,
numberlistp, numberlist, varlist,
queuep, queue,
dictionaryp, bintree,
setp, set,
setp, set, set1,
comparingp])).
/*
@@ -71,20 +69,18 @@ files, comment the directive above and uncomment the directive below
randomp, % random
random,
systemp, % os interface protocol
termp, term, % types
atomic,
atom, callable,
characterp, character,
number, float, integer, natural,
compound,
listp, list, difflist,
numberlistp, numberlist,
varlist,
listp, list, list1,
difflist,
numberlistp, numberlist, varlist,
queuep, queue,
dictionaryp, bintree,
setp, set,
setp, set, set1,
comparingp],
[xmlsref(standalone)])).
*/

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.25.1
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================
This folder contains objects, categories, and protocols whose

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

21
Logtalk/library/list1.lgt Normal file
View File

@@ -0,0 +1,21 @@
:- object(list(_type),
extends(list)).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2006/1/29,
comment is 'List predicates with elements constrained to a single type.']).
valid(List) :-
nonvar(List),
parameter(1, Type),
\+ \+ valid(List, Type).
valid([], _).
valid([Value| List], Type) :-
Type::valid(Value),
valid(List, Type).
:- end_object.

View File

@@ -4,7 +4,7 @@
:- info([
version is 1,
version is 1.0,
date is 2000/7/24,
author is 'Paulo Moura',
comment is 'Useful meta-predicates.']).

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

27
Logtalk/library/set1.lgt Normal file
View File

@@ -0,0 +1,27 @@
:- object(set(_type),
extends(set)).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2006/2/2,
comment is 'Set predicates with elements constrained to a single type.']).
valid(Set) :-
nonvar(Set),
parameter(1, Type),
\+ \+ valid(Set, Type).
valid([], _) :-
!.
valid([Element], Type) :-
!,
Type::valid(Element).
valid([Element1, Element2| Set], Type) :-
Element1 @< Element2,
Type::valid(Element1),
Type::valid(Element2),
valid([Element2| Set], Type).
:- end_object.

View File

@@ -4,7 +4,7 @@
:- info([
version is 1.10,
author is 'Portable Operating-System Interface (POSI) initiative',
date is 2005/8/18,
date is 2006/1/21,
comment is 'Portable operating system access protocol.',
remarks is [
'File names overview:' - 'The main idea is that file names should be operating-system independent. As such, predicates are needed to convert between portable file names and operating-system specific file names. The solution chosen is to use URL syntax for portable file names.',
@@ -173,9 +173,9 @@
examples is [
'Querying file size:' - file_property(foo, size(Bytes)) - {Bytes = 32568},
'Querying file type:' - file_property(foo, type(Type)) - {Type = regular},
'Querying file creation date:' - file_property(foo, creation_time(Time)) - {Time = 13768092},
'Querying file last access date:' - file_property(foo, access_time(Time)) - {Time = 813261042},
'Querying file modification date:' - file_property(foo, modification_time(Time)) - {Time = 813261042},
'Querying file creation date:' - file_property(foo, creation_time(Time)) - {Time = 137692},
'Querying file last access date:' - file_property(foo, access_time(Time)) - {Time = 811042},
'Querying file modification date:' - file_property(foo, modification_time(Time)) - {Time = 811042},
'Querying file permissions:' - file_property(foo, permission(Permission)) - {Permission = read}
]]).
@@ -340,17 +340,17 @@
examples is [
'Querying file access protocol:' - file_name_part(foo, protocol(Protocol)) - {Protocol = file},
'Querying file host location:' - file_name_part('http://www.prolog-standard.org:8080/index.html', host(Host)) - {Host = 'www.prolog-standard.org'},
'Querying file port access:' - file_name_part('http://www.prolog-standard.org:8080/index.html', port(Port)) - {Port = 8080},
'Querying file creation date:' - file_name_part(foo, port(Port)) - {no},
'Querying file modification date:' - file_name_part(foo, user(Username)) - {Username = 813261042},
'Querying file modification date:' - file_name_part(foo, password(Password)) - {Password = 813261042},
'Querying file base name:' - file_name_part(foo, base(Basename)) - {Basename = 813261042},
'Querying file path:' - file_name_part(foo, path(Path)) - {Path = 813261042},
'Querying file port:' - file_name_part('http://www.prolog-standard.org:8080/index.html', port(Port)) - {Port = 8080},
'Querying file port:' - file_name_part(foo, port(Port)) - {no},
'Querying file username:' - file_name_part('http://user@www.prolog-standard.org/', user(Username)) - {Username = user},
'Querying file password:' - file_name_part('http://user:password@www.prolog-standard.org/', password(Password)) - {Password = password},
'Querying file base name:' - file_name_part('/usr/local/foo.pl', base(Basename)) - {Basename = 'foo.pl'},
'Querying file path:' - file_name_part('/usr/local/foo.pl', path(Path)) - {Path = '/usr/local/'},
'Querying file extension:' - file_name_part('foo.pl', extension(Extension)) - {Extension = '.pl'},
'Querying file extension:' - file_name_part('foo.', extension(Extension)) - {Extension = '.'},
'Querying file extension:' - file_name_part(foo, extension(Extension)) - {Extension = ''},
'Querying file modification date:' - file_name_part(foo, search(Pairs)) - {Pairs = 813261042},
'Querying file modification date:' - file_name_part(foo, fragment(Fragment)) - {Fragment = 813261042}
'Querying file search pairs:' - file_name_part('http://user@www.prolog-standard.org/updates.cgi?date=today', search(Pairs)) - {Pairs = [date=today]},
'Querying file fragment:' - file_name_part('http://user@www.prolog-standard.org/updates.html#latest', fragment(Fragment)) - {Fragment = latest}
]]).
:- public(file_name_parts/2).

View File

@@ -0,0 +1,16 @@
:- protocol(term_expansionp).
:- info([
version is 1.0,
author is 'Paulo Moura',
date is 2006/2/5,
comment is 'Term expansion protocol.']).
:- public(term_expansion/2).
:- mode(term_expansion(?term, ?term), zero_or_more).
:- info(term_expansion/2,
[comment is 'Expands a term into a new term.',
argnames is ['Term', 'Expansion']]).
:- end_protocol.

View File

@@ -1,8 +1,8 @@
=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.26.2
Release 2.27.0
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
=================================================================

View File

@@ -7,12 +7,12 @@
characterp, character,
number, float, integer, natural,
compound,
listp, list, difflist,
numberlistp, numberlist,
varlist,
listp, list, list1,
difflist,
numberlistp, numberlist, varlist,
queuep, queue,
dictionaryp, bintree,
setp, set,
setp, set, set1,
comparingp])).
/*
@@ -27,11 +27,11 @@ files, comment the directive above and uncomment the directive below
characterp, character,
number, float, integer, natural,
compound,
listp, list, difflist,
numberlistp, numberlist,
varlist,
listp, list, list1,
difflist,
numberlistp, numberlist, varlist,
queuep, queue,
dictionaryp, bintree,
setp, set,
setp, set, set1,
comparingp], [xmlsref(standalone)])).
*/