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:
static
Template:
empty(Queue)
Mode and number of proofs:
empty(@queue) - zero_or_one

head/2

Unifies Head with the first element of the queue.

Compilation flags:
static
Template:
head(Queue,Head)
Mode and number of proofs:
head(+queue,?term) - zero_or_one

join/3

Adds the new element at the end of the queue.

Compilation flags:
static
Template:
join(Element,Queue_in,Queue_out)
Mode and number of proofs:
join(@term,+queue,-queue) - zero_or_one

join_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:
static
Template:
join_all(List,Queue_in,Queue_out)
Mode and number of proofs:
join_all(+list,+queue,-queue) - zero_or_one

jump/3

Adds the new element at the front of the queue.

Compilation flags:
static
Template:
jump(Element,Queue_in,Queue_out)
Mode and number of proofs:
jump(@term,+queue,-queue) - zero_or_one

jump_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:
static
Template:
jump_all(Element,Queue_in,Queue_out)
Mode and number of proofs:
jump_all(+list,+queue,-queue) - zero_or_one

length/2

Queue length.

Compilation flags:
static
Template:
length(Queue,Length)
Mode and number of proofs:
length(+queue,?integer) - zero_or_one

serve/3

Removes the first element of the queue for service.

Compilation flags:
static
Template:
serve(Queue_in,Head,Queue_out)
Mode and number of proofs:
serve(+queue,?term,-queue) - zero_or_one

as_list/2

Converts a queue to a list.

Compilation flags:
static
Template:
as_list(Queue,List)
Mode and number of proofs:
as_list(+queue,-list) - one

Protected interface

(none)

Private predicates

(none)

Operators

(none)

Remarks

(none)