Unbounded_Integer_Queue Module Interface Specification

(0) CHARACTERISTICS

-type specified: queue

-features: deterministic, non-parameterized

-foreign types:

(1) SYNTAX

ACCESS-PROGRAMS

Program Name
Arg#1Arg#2Result Type
INSERTqueue:VOint:V 
REMOVEqueue:VO   
FRONTqueue:V  int

(2) CANONICAL TRACES

canonical(T) n:<int>; a[1]..a[n]:<int> [T = [INSERT(*, a[i])]i=1..n ]

(3) SEMANTICS

ACCESS-PROGRAMS

Legality(INSERT((n, T), a)) = %legal%

INSERT((n, T) , a) = T.INSERT(*, a)

Legality(REMOVE((n, T))) =

ConditionValue
T = _ %empty%
T _%legal%

REMOVE((n, T) ) = T1 where T1:<queue>; a:<int> [T = INSERT(*, a).T1 ]

Legality(FRONT(T)) =

ConditionValue
T = _ %empty%
T _%legal%

FRONT(T) = a where a:<int>; T1:<queue> [T = INSERT(*, a).T1 ]