Specifications Of Collection And List

A collection is a set of elements, all of which are the same type. A list is a special kind of collection, with two extra properties:

Operations on a Collection

Notation: when we have an input X, an output of X' (X-prime) indicates that the value of X is changed by the procedure.

create

destroy
This is the inverse of create

is_empty

size

insert

delete

join

map

Operations on a List

All the above operations apply to lists: a list may be used wherever a collection is required. Because lists have extra structure - the order on the elements - there are additional postconditions on some operations. None of the operations change the order of elements, except as stated explicitly.
insert

delete

join

map

Additional Operations For Lists And Windows

create_window

destroy_window

is_last

get_value

move_forward

split