The Questa's abstract nature conditions a representation by its basic functionality.
There are four basic operations in Questa:
||Push element on top of the Questa|
||Pop element from top of the Questa|
||Pop element from bottom of the Questa|
||Swaps element from bottom with element from top|
The Questa ADT
The Questa as an abstract data type (ADT) shall be specified in the following:
PUSH(x : any) : void — Pushes the element
x to the top of the Questa and returns no value.
POP1() : any — Returns the Questa's top element. If the Questa is empty, an error will be signaled.
POP2() : any — Returns the Questa's bottom element. If the Questa is empty, an error will be signaled.
SWAP() : boolean — Exchanges the position of the Questa's top and bottom elements. If the Questa contains one or more items a Boolean value of true will be returned; for an empty Questa false is produced.
Questa-based languages can be called "Questa-complete" if:
- The data capacity is unbounded
- All of the basic commands listed above are implemented
Two Questa-based languages are currently in existence:
- Common Lisp implementation of the Questa data structure. Please note that some assumptions have been introduced in order to rectify the lacunae.