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 Sub type Sub type: It is a type

    Sub type: It is a type with a parent super type. The sub-type or super-type relationship is more common than the sub-class or super-class relationship. A class which implements an interface is a sub type of interface. An interface which expands the ot

  • Q : What is Static initializer Static

    Static initializer: An initializer prefixed with ‘static’ reserved word. The static initializer is stated outside the methods of its enclosing class, and might access only the static fields and methods of its enclosing class.

  • Q : Explain script recorded over tested web

    Why is the script recorded over the tested web pages not playback correctly?

  • Q : Define Continue statement Continue

    Continue statement: A statement which might only be employed within the body of a loop. In case of a while loop or do loop, control passes instantly to the loop's terminating test. In case of a for loop, the control passes to the post-body update expr

  • Q : ID of TC Trustcenter Publisher and

    For how long are ID of TC Trustcenter Publisher and certificates of developer valid?

  • Q : Explain Polymorphism Polymorphism : It

    Polymorphism: It is the ability of an object reference to be employed as if it referred to an object with various forms. The polymorphism in Java outcomes from both class inheritance and interface inheritance. The actually different forms frequently o

  • Q : Explain Downcast with example Explain

    Explain Downcast with example: It is a cast towards an object's dynamic kind - that is, `down' the inheritance hierarchy. For illustration:        // Downcast from Object to String

  • Q : Calculate the summation of 1 to some

    Write two programs to calculate the summation of 1 to some integer n using a function called int summation(int n) a) Using a non recursive solution, with a for(i=1, i<=n; i++) loop and b) using a recursive solution, based on the following conditions summation(n) = summation(n-1

  • Q : Ways to select HTML Tag Instances

    Explain the different ways in order to select the HTML Tag Instances.

  • Q : State the term URN State the term URN?

    State the term URN?

©TutorsGlobe All rights reserved 2022-2023.