protocol
queuep¶
Queue protocol.
Author: Paulo Moura
Version: 1.0
Date: 2000/7/24
Compilation flags:
static(no dependencies on other entities)
Public interface¶
empty/1¶
True if the queue is empty.
Compilation flags:
staticTemplate:
empty(Queue)Mode and number of proofs:
empty(@queue) - zero_or_onehead/2¶
Unifies Head with the first element of the queue.
Compilation flags:
staticTemplate:
head(Queue,Head)Mode and number of proofs:
head(+queue,?term) - zero_or_onejoin/3¶
Adds the new element at the end of the queue.
Compilation flags:
staticTemplate:
join(Element,Queue_in,Queue_out)Mode and number of proofs:
join(@term,+queue,-queue) - zero_or_onejoin_all/3¶
Adds the new elements at the end of the queue. The elements are added in the same order that they appear in the list.
Compilation flags:
staticTemplate:
join_all(List,Queue_in,Queue_out)Mode and number of proofs:
join_all(+list,+queue,-queue) - zero_or_onejump/3¶
Adds the new element at the front of the queue.
Compilation flags:
staticTemplate:
jump(Element,Queue_in,Queue_out)Mode and number of proofs:
jump(@term,+queue,-queue) - zero_or_onejump_all/3¶
Adds the new elements at the front of the queue. The elements are added in the same order that they appear in the list.
Compilation flags:
staticTemplate:
jump_all(Element,Queue_in,Queue_out)Mode and number of proofs:
jump_all(+list,+queue,-queue) - zero_or_onelength/2¶
Queue length.
Compilation flags:
staticTemplate:
length(Queue,Length)Mode and number of proofs:
length(+queue,?integer) - zero_or_oneserve/3¶
Removes the first element of the queue for service.
Compilation flags:
staticTemplate:
serve(Queue_in,Head,Queue_out)Mode and number of proofs:
serve(+queue,?term,-queue) - zero_or_oneas_list/2¶
Converts a queue to a list.
Compilation flags:
staticTemplate:
as_list(Queue,List)Mode and number of proofs:
as_list(+queue,-list) - oneProtected interface¶
(none)
Private predicates¶
(none)
Operators¶
(none)