REFINEMENT        BooksRR

REFINES           BooksR

CONSTANTS         bookarr

PROPERTIES        bookarr : 1..card(BOOK) >->> BOOK

VARIABLES         counter

INVARIANT         counter : 0..card(BOOK) & ((1..counter)<|bookarr)^scheme = bookarr

INITIALISATION    counter := 0

OPERATIONS

  bb <-- newbook = PRE counter < card(BOOK) THEN counter := counter + 1 ; bb := bookarr(counter) END

END
