Logtalk 2.29.4 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1800 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
46c8cfbeff
commit
bd8cca2bde
15
Logtalk/examples/bottles/NOTES.txt
Normal file
15
Logtalk/examples/bottles/NOTES.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
=================================================================
|
||||||
|
Logtalk - Object oriented extension to Prolog
|
||||||
|
Release 2.29.4
|
||||||
|
|
||||||
|
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
|
||||||
|
To load this example and for sample queries, please see the SCRIPT
|
||||||
|
file.
|
||||||
|
|
||||||
|
This folder contains a Logtalk version of the programming problem
|
||||||
|
"99 bottles of beer on the wall" , contributed to the web site:
|
||||||
|
|
||||||
|
http://99-bottles-of-beer.net/
|
13
Logtalk/examples/bottles/SCRIPT.txt
Normal file
13
Logtalk/examples/bottles/SCRIPT.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
=================================================================
|
||||||
|
Logtalk - Object oriented extension to Prolog
|
||||||
|
Release 2.29.4
|
||||||
|
|
||||||
|
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
|
||||||
|
% just load the example, which contains an initialization/1 directive
|
||||||
|
% that runs it:
|
||||||
|
|
||||||
|
| ?- logtalk_load(bottles(loader)).
|
||||||
|
...
|
31
Logtalk/examples/bottles/bottles.lgt
Normal file
31
Logtalk/examples/bottles/bottles.lgt
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*******************************************************
|
||||||
|
* 99 Bottles of Beer
|
||||||
|
* Paulo Moura - January 21, 2007
|
||||||
|
* bottles.lgt
|
||||||
|
* To execute start Logtalk and use the query
|
||||||
|
* logtalk_load(bottles).
|
||||||
|
*******************************************************/
|
||||||
|
|
||||||
|
:- object(bottles).
|
||||||
|
|
||||||
|
:- initialization(sing(99)).
|
||||||
|
|
||||||
|
sing(0) :-
|
||||||
|
write('No more bottles of beer on the wall, no more bottles of beer.'), nl,
|
||||||
|
write('Go to the store and buy some more, 99 bottles of beer on the wall.'), nl, nl.
|
||||||
|
sing(N) :-
|
||||||
|
N > 0,
|
||||||
|
N2 is N -1,
|
||||||
|
beers(N), write(' of beer on the wall, '), beers(N), write(' of beer.'), nl,
|
||||||
|
write('Take one down and pass it around, '), beers(N2), write(' of beer on the wall.'), nl, nl,
|
||||||
|
sing(N2).
|
||||||
|
|
||||||
|
beers(0) :-
|
||||||
|
write('no more bottles').
|
||||||
|
beers(1) :-
|
||||||
|
write('1 bottle').
|
||||||
|
beers(N) :-
|
||||||
|
N > 1,
|
||||||
|
write(N), write(' bottles').
|
||||||
|
|
||||||
|
:- end_object.
|
11
Logtalk/examples/bottles/loader.lgt
Normal file
11
Logtalk/examples/bottles/loader.lgt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
:- initialization(
|
||||||
|
logtalk_load(bottles)).
|
||||||
|
|
||||||
|
/*
|
||||||
|
If you intend to use the FOP XSL:FO processor for generating PDF documenting
|
||||||
|
files, comment the directive above and uncomment the directive below
|
||||||
|
|
||||||
|
:- initialization(
|
||||||
|
logtalk_load(bottles, [events(on), xmlsref(standalone)])).
|
||||||
|
*/
|
14
Logtalk/examples/threads/blackboard/NOTES.txt
Normal file
14
Logtalk/examples/threads/blackboard/NOTES.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
=================================================================
|
||||||
|
Logtalk - Object oriented extension to Prolog
|
||||||
|
Release 2.29.4
|
||||||
|
|
||||||
|
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
|
||||||
|
To load this example and for sample queries, please see the SCRIPT file.
|
||||||
|
|
||||||
|
This folder contains a simple multi-threading example illustrating how
|
||||||
|
to use the Logtalk built-in predicates threaded_wait/1 and threaded_notify/1
|
||||||
|
for synchronizing threads using shared resources. The example consists of
|
||||||
|
two persons, a student and a teacher, sharing a blackboard chalk and eraser.
|
38
Logtalk/examples/threads/blackboard/SCRIPT.txt
Normal file
38
Logtalk/examples/threads/blackboard/SCRIPT.txt
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
=================================================================
|
||||||
|
Logtalk - Object oriented extension to Prolog
|
||||||
|
Release 2.29.4
|
||||||
|
|
||||||
|
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
|
||||||
|
% start by loading the necessary library support files:
|
||||||
|
|
||||||
|
| ?- logtalk_load(library(random_loader)).
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
% now you are ready for loading the example:
|
||||||
|
|
||||||
|
| ?- logtalk_load(blackboard(loader)).
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
% start the producer and the consumer, each one running in its own thread:
|
||||||
|
|
||||||
|
| ?- threaded_ignore(teacher::run(4)), threaded_ignore(student::run(10)).
|
||||||
|
|
||||||
|
teacher is writing...
|
||||||
|
student is writing...
|
||||||
|
student is writing...
|
||||||
|
student is writing...
|
||||||
|
student is writing...
|
||||||
|
teacher is writing...
|
||||||
|
teacher is writing...
|
||||||
|
teacher is writing...
|
||||||
|
student is writing...
|
||||||
|
student is writing...
|
||||||
|
student is writing...
|
||||||
|
student is writing...
|
||||||
|
student is writing...
|
||||||
|
student is writing...
|
66
Logtalk/examples/threads/blackboard/blackboard.lgt
Normal file
66
Logtalk/examples/threads/blackboard/blackboard.lgt
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
|
||||||
|
:- category(using). % we can call the threaded_wait/1 and threaded_notify/1 predicates from category
|
||||||
|
% predicates; the importing object threads are used for exchanging notifications
|
||||||
|
:- public([pick_up/0, release/0]).
|
||||||
|
|
||||||
|
pick_up :-
|
||||||
|
threaded_wait(free). % wait until the tool is available
|
||||||
|
|
||||||
|
release :-
|
||||||
|
threaded_notify(free). % notify that the tool is now available
|
||||||
|
|
||||||
|
:- end_category.
|
||||||
|
|
||||||
|
|
||||||
|
:- object(chalk,
|
||||||
|
imports(using)).
|
||||||
|
|
||||||
|
:- threaded. % the chalk's thread is used for exchanging notifications
|
||||||
|
:- initialization(::release). % make the chalk initially available
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
|
||||||
|
|
||||||
|
:- object(eraser,
|
||||||
|
imports(using)).
|
||||||
|
|
||||||
|
:- threaded. % the eraser's thread is used for exchanging notifications
|
||||||
|
:- initialization(::release). % make the eraser initially available
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
|
||||||
|
|
||||||
|
:- category(running). % in alternative to a category we could also have defined a class
|
||||||
|
|
||||||
|
:- public(run/1).
|
||||||
|
|
||||||
|
run(0) :-
|
||||||
|
!.
|
||||||
|
run(N) :-
|
||||||
|
N > 0,
|
||||||
|
eraser::pick_up,
|
||||||
|
chalk::pick_up,
|
||||||
|
self(Self),
|
||||||
|
write(Self), write(' is writing...'), nl,
|
||||||
|
random::random(1, 5, Random), % simulate a variable time
|
||||||
|
thread_sleep(Random), % spending on writing
|
||||||
|
chalk::release,
|
||||||
|
eraser::release,
|
||||||
|
N2 is N - 1,
|
||||||
|
run(N2).
|
||||||
|
|
||||||
|
:- end_category.
|
||||||
|
|
||||||
|
|
||||||
|
:- object(teacher,
|
||||||
|
imports(running)).
|
||||||
|
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
|
||||||
|
|
||||||
|
:- object(student,
|
||||||
|
imports(running)).
|
||||||
|
|
||||||
|
|
||||||
|
:- end_object.
|
13
Logtalk/examples/threads/blackboard/loader.lgt
Normal file
13
Logtalk/examples/threads/blackboard/loader.lgt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
:- initialization(
|
||||||
|
logtalk_load(
|
||||||
|
blackboard)).
|
||||||
|
|
||||||
|
/*
|
||||||
|
If you intend to use the FOP XSL:FO processor for generating PDF documenting
|
||||||
|
files, comment the directive above and uncomment the directive below
|
||||||
|
|
||||||
|
:- initialization(
|
||||||
|
logtalk_load(
|
||||||
|
blackboard, [xmlsref(standalone)])).
|
||||||
|
*/
|
14
Logtalk/examples/threads/buffer/NOTES.txt
Normal file
14
Logtalk/examples/threads/buffer/NOTES.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
=================================================================
|
||||||
|
Logtalk - Object oriented extension to Prolog
|
||||||
|
Release 2.29.4
|
||||||
|
|
||||||
|
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
|
||||||
|
To load this example and for sample queries, please see the SCRIPT file.
|
||||||
|
|
||||||
|
This folder contains a simple multi-threading example illustrating how
|
||||||
|
to use the Logtalk built-in predicates threaded_wait/1 and threaded_notify/1
|
||||||
|
for synchronizing threads writing to and reading from a buffer that can
|
||||||
|
only contain an item at the same time.
|
44
Logtalk/examples/threads/buffer/SCRIPT.txt
Normal file
44
Logtalk/examples/threads/buffer/SCRIPT.txt
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
=================================================================
|
||||||
|
Logtalk - Object oriented extension to Prolog
|
||||||
|
Release 2.29.4
|
||||||
|
|
||||||
|
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
|
||||||
|
% start by loading the necessary library support files:
|
||||||
|
|
||||||
|
| ?- logtalk_load(library(random_loader)).
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
% now you are ready for loading the example:
|
||||||
|
|
||||||
|
| ?- logtalk_load(buffer(loader)).
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
% start the producer and the consumer, each one running in its own thread:
|
||||||
|
|
||||||
|
| ?- threaded_ignore(producer::run(10)), threaded_ignore(consumer::run(10)).
|
||||||
|
|
||||||
|
producer wrote item 0
|
||||||
|
consumer read item 0
|
||||||
|
producer wrote item 1
|
||||||
|
consumer read item 1
|
||||||
|
producer wrote item 2
|
||||||
|
consumer read item 2
|
||||||
|
producer wrote item 3
|
||||||
|
consumer read item 3
|
||||||
|
producer wrote item 4
|
||||||
|
consumer read item 4
|
||||||
|
producer wrote item 5
|
||||||
|
consumer read item 5
|
||||||
|
producer wrote item 6
|
||||||
|
consumer read item 6
|
||||||
|
producer wrote item 7
|
||||||
|
consumer read item 7
|
||||||
|
producer wrote item 8
|
||||||
|
consumer read item 8
|
||||||
|
producer wrote item 9
|
||||||
|
consumer read item 9
|
66
Logtalk/examples/threads/buffer/buffer.lgt
Normal file
66
Logtalk/examples/threads/buffer/buffer.lgt
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
|
||||||
|
:- object(buffer).
|
||||||
|
|
||||||
|
:- threaded.
|
||||||
|
|
||||||
|
:- public([put/1, get/1]).
|
||||||
|
|
||||||
|
:- private(item/1).
|
||||||
|
:- dynamic(item/1).
|
||||||
|
|
||||||
|
put(N) :-
|
||||||
|
( N > 0 % wait until the previous item is consumed
|
||||||
|
-> NP is N - 1, threaded_wait(consumed(NP)) % (except for the first item!)
|
||||||
|
; true
|
||||||
|
),
|
||||||
|
assertz(item(N)),
|
||||||
|
sender(Sender),
|
||||||
|
writeq(Sender), write(' wrote item '), write(N), nl,
|
||||||
|
threaded_notify(produced(N)). % notify consumer that a new item is available
|
||||||
|
|
||||||
|
get(N) :-
|
||||||
|
threaded_wait(produced(N)), % wait until an item is available
|
||||||
|
retract(item(N)),
|
||||||
|
sender(Sender),
|
||||||
|
writeq(Sender), write(' read item '), write(N), nl,
|
||||||
|
threaded_notify(consumed(N)). % notify producer that the item was consumed
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
|
||||||
|
|
||||||
|
:- object(producer).
|
||||||
|
|
||||||
|
:- public(run/1).
|
||||||
|
|
||||||
|
run(N) :-
|
||||||
|
run(0, N).
|
||||||
|
|
||||||
|
run(N, N) :- !.
|
||||||
|
run(M, N) :-
|
||||||
|
M < N,
|
||||||
|
random::random(1, 5, Random), % simulate a variable time to
|
||||||
|
thread_sleep(Random), % produce a new item
|
||||||
|
buffer::put(M),
|
||||||
|
M2 is M + 1,
|
||||||
|
run(M2, N).
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
|
||||||
|
|
||||||
|
:- object(consumer).
|
||||||
|
|
||||||
|
:- public(run/1).
|
||||||
|
|
||||||
|
run(N) :-
|
||||||
|
run(0, N).
|
||||||
|
|
||||||
|
run(N, N) :- !.
|
||||||
|
run(M, N) :-
|
||||||
|
M < N,
|
||||||
|
random::random(1, 5, Random), % simulate a variable time
|
||||||
|
thread_sleep(Random), % to consume an item
|
||||||
|
buffer::get(M),
|
||||||
|
M2 is M + 1,
|
||||||
|
run(M2, N).
|
||||||
|
|
||||||
|
:- end_object.
|
13
Logtalk/examples/threads/buffer/loader.lgt
Normal file
13
Logtalk/examples/threads/buffer/loader.lgt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
:- initialization(
|
||||||
|
logtalk_load(
|
||||||
|
buffer)).
|
||||||
|
|
||||||
|
/*
|
||||||
|
If you intend to use the FOP XSL:FO processor for generating PDF documenting
|
||||||
|
files, comment the directive above and uncomment the directive below
|
||||||
|
|
||||||
|
:- initialization(
|
||||||
|
logtalk_load(
|
||||||
|
buffer, [xmlsref(standalone)])).
|
||||||
|
*/
|
128
Logtalk/library/listing.lgt
Normal file
128
Logtalk/library/listing.lgt
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
|
||||||
|
:- category(listing).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is 'Paulo Moura',
|
||||||
|
date is 2007/2/8,
|
||||||
|
comment is 'Listing predicates.']).
|
||||||
|
|
||||||
|
:- public(listing/0).
|
||||||
|
:- mode(listing, one).
|
||||||
|
:- info(listing/0, [
|
||||||
|
comment is 'Lists all clauses of all dynamic predicates to the current output stream.']).
|
||||||
|
|
||||||
|
:- public(listing/1).
|
||||||
|
:- mode(listing(+predicate_indicator), one).
|
||||||
|
:- info(listing/1, [
|
||||||
|
comment is 'Lists all clauses of a dynamic predicate to the current output stream.',
|
||||||
|
argnames is ['Predicate']]).
|
||||||
|
|
||||||
|
:- public(portray_clause/1).
|
||||||
|
:- mode(portray_clause(+clause), one).
|
||||||
|
:- info(portray_clause/1, [
|
||||||
|
comment is 'Pretty prints a clause to the current output stream.',
|
||||||
|
argnames is ['Clause']]).
|
||||||
|
|
||||||
|
:- protected(portray_body/1).
|
||||||
|
:- mode(portray_body(+callable), one).
|
||||||
|
:- info(portray_body/1, [
|
||||||
|
comment is 'Pretty prints a clause body to the current output stream.',
|
||||||
|
argnames is ['Body']]).
|
||||||
|
|
||||||
|
:- protected(spaces/1).
|
||||||
|
:- mode(spaces(+integer), one).
|
||||||
|
:- info(spaces/1, [
|
||||||
|
comment is 'Prints N spaces to the current output stream.',
|
||||||
|
argnames is ['N']]).
|
||||||
|
|
||||||
|
listing :-
|
||||||
|
::current_predicate(Functor/Arity),
|
||||||
|
functor(Head, Functor, Arity),
|
||||||
|
::predicate_property(Head, (dynamic)),
|
||||||
|
nl,
|
||||||
|
listing_properties(Head, Functor, Arity),
|
||||||
|
listing_clauses(Head, Functor, Arity),
|
||||||
|
fail.
|
||||||
|
listing.
|
||||||
|
|
||||||
|
listing(Functor/Arity) :-
|
||||||
|
atom(Functor),
|
||||||
|
integer(Arity),
|
||||||
|
::current_predicate(Functor/Arity),
|
||||||
|
functor(Head, Functor, Arity),
|
||||||
|
::predicate_property(Head, (dynamic)), !,
|
||||||
|
listing_properties(Head, Functor, Arity),
|
||||||
|
listing_clauses(Head, Functor, Arity).
|
||||||
|
|
||||||
|
listing_properties(Head, Functor, Arity) :-
|
||||||
|
::predicate_property(Head, public),
|
||||||
|
write(':- public('), writeq(Functor/Arity), write(').'),
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, Functor, Arity) :-
|
||||||
|
::predicate_property(Head, protected),
|
||||||
|
write(':- protected('), writeq(Functor/Arity), write(').'),
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, Functor, Arity) :-
|
||||||
|
::predicate_property(Head, private),
|
||||||
|
write(':- private('), writeq(Functor/Arity), write(').'),
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, _, _) :-
|
||||||
|
::predicate_property(Head, declared_in(DclEntity)),
|
||||||
|
write(' % '), writeq(declared_in(DclEntity)), nl,
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, Functor, Arity) :-
|
||||||
|
::predicate_property(Head, (dynamic)),
|
||||||
|
write(':- dynamic('), writeq(Functor/Arity), write(').'),
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, _, _) :-
|
||||||
|
( ::clause(Head, _) ->
|
||||||
|
nl
|
||||||
|
; write(' % no local clauses found'), nl
|
||||||
|
),
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, _, _) :-
|
||||||
|
::predicate_property(Head, meta_predicate(Mode)),
|
||||||
|
write(':- meta_predicate('), writeq(Mode), write(').'), nl,
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, Functor, Arity) :-
|
||||||
|
::predicate_property(Head, synchronized),
|
||||||
|
write(':- synchronized('), writeq(Functor/Arity), write(').'), nl,
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, Functor, Arity) :-
|
||||||
|
::predicate_property(Head, alias(OFunctor/OArity)),
|
||||||
|
write(':- alias('), writeq(OFunctor/OArity), write(', '), writeq(Functor/Arity), write(').'), nl,
|
||||||
|
fail.
|
||||||
|
listing_properties(Head, _, _) :-
|
||||||
|
::predicate_property(Head, non_terminal(NonTerminal//NTArity)) ->
|
||||||
|
write('% clauses resulting from the expansion of the non-terminal '), writeq(NonTerminal//NTArity), nl,
|
||||||
|
fail.
|
||||||
|
listing_properties(_, _, _).
|
||||||
|
|
||||||
|
listing_clauses(Head, _, _) :-
|
||||||
|
::clause(Head, Body),
|
||||||
|
::portray_clause((Head :- Body)),
|
||||||
|
fail.
|
||||||
|
listing_clauses(_).
|
||||||
|
|
||||||
|
portray_clause((Head :- true)) :-
|
||||||
|
!,
|
||||||
|
numbervars(Head, 0, _),
|
||||||
|
write_term(Head, [numbervars(true), quoted(true)]), write('.'), nl.
|
||||||
|
portray_clause((Head :- Body)) :-
|
||||||
|
numbervars((Head:-Body), 0, _),
|
||||||
|
write_term(Head, [numbervars(true), quoted(true)]), write(' :-'), nl,
|
||||||
|
::portray_body(Body),
|
||||||
|
write('.'), nl.
|
||||||
|
|
||||||
|
portray_body(Body) :-
|
||||||
|
spaces(4), write_term(Body, [numbervars(true), quoted(true)]).
|
||||||
|
|
||||||
|
spaces(0) :-
|
||||||
|
!.
|
||||||
|
spaces(N) :-
|
||||||
|
put_char(' '),
|
||||||
|
N2 is N - 1,
|
||||||
|
spaces(N2).
|
||||||
|
|
||||||
|
:- end_category.
|
64
Logtalk/manuals/refman/builtins/threaded_notify1.html
Normal file
64
Logtalk/manuals/refman/builtins/threaded_notify1.html
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="application/xml+xhtml; charset=utf-8" />
|
||||||
|
<title>Logtalk built-in predicate: threaded_notify/1</title>
|
||||||
|
<link rel="stylesheet" href="../../screen.css" type="text/css" media="screen"/>
|
||||||
|
<link rel="stylesheet" href="../../print.css" type="text/css" media="print"/>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="top-left">Logtalk reference manual</div>
|
||||||
|
<div class="top-right">Built-in predicate: threaded_notify/1</div>
|
||||||
|
<div class="bottom-left"><span class="page"/></div>
|
||||||
|
<div class="bottom-right"><span class="page"/></div>
|
||||||
|
<div class="navtop"><a href="../../index.html">contents</a> > <a href="../index.html">reference manual</a> > <a href="../index.html#builtins">built-in predicates</a></div>
|
||||||
|
|
||||||
|
<h2 class="codenp">threaded_notify/1<span id="builtins_threaded_notify1"/></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Description</h4>
|
||||||
|
|
||||||
|
<pre>threaded_notify(Term)</pre>
|
||||||
|
<p>
|
||||||
|
Sends <code>Term</code> as a notification to any thread suspended waiting for it to proceed. The call must be made within the same object (<em>this</em>) containing the calls to the <code>threaded_wait/1</code> predicate waiting for the notification.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h4>Template and modes</h4>
|
||||||
|
|
||||||
|
<pre>threaded_notify(@term)</pre>
|
||||||
|
|
||||||
|
<h4>Errors</h4>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<p>
|
||||||
|
(none)
|
||||||
|
</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<h4>Examples</h4>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>Send the notification <code>data_avaialble</code>:</dt>
|
||||||
|
<dd><code>threaded_notify(data_avaialble)</code></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
<div class="copyright">
|
||||||
|
<span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/>
|
||||||
|
<span>Last updated on: February 13, 2007</span>
|
||||||
|
</div>
|
||||||
|
<div class="navbottom">
|
||||||
|
<span><a href="threaded_wait1.html">previous</a> | <a href="../../glossary.html">glossary</a> | <a href="../index.html#builtins">next</a></span><br/>
|
||||||
|
<span><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
64
Logtalk/manuals/refman/builtins/threaded_wait1.html
Normal file
64
Logtalk/manuals/refman/builtins/threaded_wait1.html
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="application/xml+xhtml; charset=utf-8" />
|
||||||
|
<title>Logtalk built-in predicate: threaded_wait/1</title>
|
||||||
|
<link rel="stylesheet" href="../../screen.css" type="text/css" media="screen"/>
|
||||||
|
<link rel="stylesheet" href="../../print.css" type="text/css" media="print"/>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="top-left">Logtalk reference manual</div>
|
||||||
|
<div class="top-right">Built-in predicate: threaded_wait/1</div>
|
||||||
|
<div class="bottom-left"><span class="page"/></div>
|
||||||
|
<div class="bottom-right"><span class="page"/></div>
|
||||||
|
<div class="navtop"><a href="../../index.html">contents</a> > <a href="../index.html">reference manual</a> > <a href="../index.html#builtins">built-in predicates</a></div>
|
||||||
|
|
||||||
|
<h2 class="codenp">threaded_wait/1<span id="builtins_threaded_wait1"/></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<h4>Description</h4>
|
||||||
|
|
||||||
|
<pre>threaded_wait(Term)</pre>
|
||||||
|
<p>
|
||||||
|
Suspends the thread making the call until a notification is received that unifies with <code>Term</code>. The call must be made within the same object (<em>this</em>) containing the calls to the <code>threaded_notify/1</code> predicate that will eventually send the notification.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h4>Template and modes</h4>
|
||||||
|
|
||||||
|
<pre>threaded_wait(?term)</pre>
|
||||||
|
|
||||||
|
<h4>Errors</h4>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<p>
|
||||||
|
(none)
|
||||||
|
</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<h4>Examples</h4>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>Wait until the <code>data_avaialble</code> notification is received:</dt>
|
||||||
|
<dd><code>threaded_wait(data_avaialble)</code></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
<div class="copyright">
|
||||||
|
<span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/>
|
||||||
|
<span>Last updated on: February 13, 2007</span>
|
||||||
|
</div>
|
||||||
|
<div class="navbottom">
|
||||||
|
<span><a href="threaded_peek1.html">previous</a> | <a href="../../glossary.html">glossary</a> | <a href="threaded_notify1.html">next</a></span><br/>
|
||||||
|
<span><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
21
Logtalk/wenv/ctags/NOTES.txt
Normal file
21
Logtalk/wenv/ctags/NOTES.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
=================================================================
|
||||||
|
Logtalk - Object oriented extension to Prolog
|
||||||
|
Release 2.29.4
|
||||||
|
|
||||||
|
Copyright (c) 1998-2007 Paulo Moura. All Rights Reserved.
|
||||||
|
=================================================================
|
||||||
|
|
||||||
|
|
||||||
|
This folder contains minimal support for using Exuberant Ctags
|
||||||
|
(http://ctags.sourceforge.net/) with Logtalk. There are two files
|
||||||
|
that you will need to rename and copy to your home directory:
|
||||||
|
|
||||||
|
ctags
|
||||||
|
Rename this file to "$HOME/.ctags" or append its contents to
|
||||||
|
the "$HOME/.ctags" file if it already exists
|
||||||
|
|
||||||
|
ctags.tmcodebrowser
|
||||||
|
Rename this file to "$HOME/.ctags.tmcodebrowser" or append its
|
||||||
|
contents to "$HOME/.ctags.tmcodebrowser" if it already exists
|
||||||
|
in order to use the MacOS X TextMate text editor and its
|
||||||
|
TmCodeBrowser plug-in (http://www.cocoabits.com/TmCodeBrowser/)
|
8
Logtalk/wenv/ctags/ctags
Normal file
8
Logtalk/wenv/ctags/ctags
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
--langdef=logtalk
|
||||||
|
--langmap=logtalk:.lgt
|
||||||
|
--regex-logtalk=/^[ \t]*:- object\(([a-z][a-zA-Z0-9_]*)/\1/Objects/
|
||||||
|
--regex-logtalk=/^[ \t]*:- protocol\(([a-z][a-zA-Z0-9_]*)/\1/Protocols/
|
||||||
|
--regex-logtalk=/^[ \t]*:- category\(([a-z][a-zA-Z0-9_]*)/\1/Categories/
|
||||||
|
--regex-logtalk=/^[ \t]*:- public\(([a-z][a-zA-Z0-9_]*)/\1/Public predicates/
|
||||||
|
--regex-logtalk=/^[ \t]*:- protected\(([a-z][a-zA-Z0-9_]*)/\1/Protected predicates/
|
||||||
|
--regex-logtalk=/^[ \t]*:- private\(([a-z][a-zA-Z0-9_]*)/\1/Private predicates/
|
8
Logtalk/wenv/ctags/ctags.tmcodebrowser
Normal file
8
Logtalk/wenv/ctags/ctags.tmcodebrowser
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
--langdef=logtalk
|
||||||
|
--langmap=logtalk:.lgt
|
||||||
|
--regex-logtalk=/^[ \t]*:- object\(([a-z][a-zA-Z0-9_]*)/\1/Objects/
|
||||||
|
--regex-logtalk=/^[ \t]*:- protocol\(([a-z][a-zA-Z0-9_]*)/\1/Protocols/
|
||||||
|
--regex-logtalk=/^[ \t]*:- category\(([a-z][a-zA-Z0-9_]*)/\1/Categories/
|
||||||
|
--regex-logtalk=/^[ \t]*:- public\(([a-z][a-zA-Z0-9_]*)/\1/Public predicates/
|
||||||
|
--regex-logtalk=/^[ \t]*:- protected\(([a-z][a-zA-Z0-9_]*)/\1/Protected predicates/
|
||||||
|
--regex-logtalk=/^[ \t]*:- private\(([a-z][a-zA-Z0-9_]*)/\1/Private predicates/
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- category(${1:Category},
|
||||||
|
implements(${2:Protocol})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_category.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Category with protocol</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A263B8A-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- category(${1:Category}).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${2:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_category.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Category</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A2679C6-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Class},
|
||||||
|
implements(${2:Protocol}),
|
||||||
|
imports(${3:Category}),
|
||||||
|
instantiates(${4:Metaclass}),
|
||||||
|
specializes(${5:Superclass})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${6:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Class with all</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A26A112-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Class},
|
||||||
|
imports(${2:Category}),
|
||||||
|
specializes(${3:Superclass})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${4:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Class with category</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A26CCD5-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Class},
|
||||||
|
instantiates(${2:Metaclass}),
|
||||||
|
specializes(${3:Superclass})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${4:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Class with metaclass</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A270068-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Class},
|
||||||
|
implements(${2:Protocol}),
|
||||||
|
specializes(${3:Superclass})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${4:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Class with protocol</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A272A62-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Class},
|
||||||
|
specializes(${2:Superclass})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Class</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A275494-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- protocol(${1:Extended},
|
||||||
|
extends(${2:Minimal})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_protocol.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Extended protocol</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A277A4C-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Instance},
|
||||||
|
implements(${2:Protocol}),
|
||||||
|
imports(${3:Category}),
|
||||||
|
instantiates(${4:Class})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${5:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Instance with all</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A27A016-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Instance},
|
||||||
|
imports(${2:Category}),
|
||||||
|
instantiates(${3:Class})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${4:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Instance with category</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A27C6D7-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Instance},
|
||||||
|
implements(${2:Protocol}),
|
||||||
|
instantiates(${3:Class})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${4:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Instance with protocol</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A27EAEC-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Instance},
|
||||||
|
instantiates(${2:Class})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Instance</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A2814B5-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string> :- private(${1:Functor}/0).
|
||||||
|
:- mode(${1:Functor}, ${2:Solutions}).
|
||||||
|
:- info(${1:Functor}/0, [
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> (with no arguments)</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>DBFDEDF5-7F59-11D9-BA7A-000A95DAA580</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string> :- private(${1:Functor}/${2:Arity}).
|
||||||
|
:- mode(${1:Functor}(${3:Arguments}), ${4:Solutions}).
|
||||||
|
:- info(${1:Functor}/${2:Arity}, [
|
||||||
|
comment is '${5:Description}',
|
||||||
|
arguments is ['$6'-'$7']]).
|
||||||
|
|
||||||
|
$0</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Private predicate</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A284660-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string> :- protected(${1:Functor}/0).
|
||||||
|
:- mode(${1:Functor}, ${2:Solutions}).
|
||||||
|
:- info(${1:Functor}/0, [
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> (with no arguments)</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>4A25F29C-7F59-11D9-BA7A-000A95DAA580</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string> :- protected(${1:Functor}/${2:Arity}).
|
||||||
|
:- mode(${1:Functor}(${3:Arguments}), ${4:Solutions}).
|
||||||
|
:- info(${1:Functor}/${2:Arity}, [
|
||||||
|
comment is '${5:Description}',
|
||||||
|
arguments is ['$6'-'$7']]).
|
||||||
|
|
||||||
|
$0</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Protected predicate</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A286F7E-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- protocol(${1:Protocol}).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${2:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_protocol.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Protocol</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A28B0F6-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Prototype},
|
||||||
|
implements(${2:Protocol}),
|
||||||
|
imports(${3:Category}),
|
||||||
|
extends(${4:Parent})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${5:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Prototype with all</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A28E048-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Prototype},
|
||||||
|
imports(${2:Category})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Prototype with category</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A290A27-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Prototype},
|
||||||
|
extends(${2:Parent})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Prototype with parent</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A292E31-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Prototype},
|
||||||
|
implements(${2:Protocol})).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> Prototype with protocol</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A29547D-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string>
|
||||||
|
:- object(${1:Object}).
|
||||||
|
|
||||||
|
:- info([
|
||||||
|
version is 1.0,
|
||||||
|
author is '`niutil -readprop / /users/$USER realname`',
|
||||||
|
date is `date +%Y/%m/%d`,
|
||||||
|
comment is '${2:Description}']).
|
||||||
|
|
||||||
|
$0
|
||||||
|
|
||||||
|
:- end_object.
|
||||||
|
</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Prototype</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A298BE0-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string> :- public(${1:Functor}/0).
|
||||||
|
:- mode(${1:Functor}, ${2:Solutions}).
|
||||||
|
:- info(${1:Functor}/0, [
|
||||||
|
comment is '${3:Description}']).
|
||||||
|
|
||||||
|
$0</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string> (with no arguments)</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>D96B0926-7F56-11D9-BA7A-000A95DAA580</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>content</key>
|
||||||
|
<string> :- public(${1:Functor}/${2:Arity}).
|
||||||
|
:- mode(${1:Functor}(${3:Arguments}), ${4:Solutions}).
|
||||||
|
:- info(${1:Functor}/${2:Arity}, [
|
||||||
|
comment is '${5:Description}',
|
||||||
|
arguments is ['$6'-'$7']]).
|
||||||
|
|
||||||
|
$0</string>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Public predicate</string>
|
||||||
|
<key>scope</key>
|
||||||
|
<string>source.logtalk</string>
|
||||||
|
<key>uuid</key>
|
||||||
|
<string>8A29B12E-73F7-11D9-8083-000D93589AF6</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Reference in New Issue
Block a user