Define Container Abstractions

Container Abstractions: Abstractions for containers (such as lists, stacks, sets, or queues) may represent just the state of a container—e.g., full or empty—and abstract away from the actual container content. The list operations also need to be abstracted. For example, consider the operation insert(l,x) which adds element x to the end of list l. The corresponding abstract operation will have the following definition:

Insert(full, x) ≡ Insert(empty, x) ≡ full

You can also use container abstractions in conjunction with the symbolic data abstractions presented above. Consider, for example, an abstraction that supports reasoning about ordered lists. This abstraction represents the behavior of lists that contain elements which were themselves abstracted using the abstract domain {d1, d2,other}. Conceptually, the abstract list records whether the list contains a specific d1 value; the list also records the ordering of two inserted elements d1 and d2, but the abstraction does not record any information about the size of the list.

   Related Questions in Programming Languages

  • Q : State the term multi programming State

    State the term multi programming.

  • Q : State machine to identify three

    Explain a finite state machine which will detect three consecutive coins tosses of one coin which results in heads?

  • Q : Difference between collection and arrays

    Write the difference between collection and arrays?

  • Q : Explain Interpreter Interpreter : A

    Interpreter: A program that executes a translated version of the source program by implementing a virtual machine. The interpreters usually simulate the actions of an idealized Central Processing Unit. An interpreter for Java should implement the Java

  • Q : Define the term Heterogeneous collection

    Define the term Heterogeneous collection: It is a collection of objects with distinct dynamic types

  • Q : How virtual machine simplify writing

    How does a virtual machine simplify the task of writing a distributed application?

  • Q : Problem on COBOL source code errors

    There are many errors in the following COBOL source code. Identify the errors and rewrite the program so that it contains no errors:IDENTIFICATION DIVISION   (Full stop required)PROGRAM ID. ERRORS-EXAMPLE.DATA DIVISION    (Fu

  • Q : What is Runtime stack Runtime stack :

    Runtime stack: It is a stack structure maintained by the Java Virtual Machine which records that methods are presently being executed. The most of late entered technique will be at the top of the stack and the main technique of an application will be

  • Q : Explain Infinite loop Infinite loop :

    Infinite loop: The loop whose termination test never computes to false. At times this is a deliberate act on the portion of the programmer, employing a construct like:         whi

  • Q : Are you sure that XHTML element name

    Are you sure that XHTML element name case sensitive? Answer: XHTML element names surely are case sensitive. Every element names should be written within lower case l

©TutorsGlobe All rights reserved 2022-2023.