Explain Primitive Type Abstractions

Primitive Type Abstractions: An effective way to reduce the state space of a program is to replace the primitive types with the corresponding abstractions that encapsulate all the possible operations that are performed on these types.

These abstractions allow us to replace the actual primitive variables or the operations involving those with the non-deterministic choices with restricted range of values. This can cut down the number of states that has to be covered by the model checker dramatically.

As an example, consider the following class which encapsulates different operations that can be carried out on doubles.

964_primitive abs1.jpg

Here is the implementation for the operator==() which implements the real behavior of the operator:

2156_primitive abs2.jpg

With this abstraction it would be easy to reduce the potentially infinite state space required to model check the equality operator “==” with a binary choice (true or false)—just replace the “m_value == value” with “chooseBoolean()” in the body of the method.

   Related Questions in Programming Languages

  • Q : Define the term Manifest file Define

    Define the term Manifest file: It is a file which is held in a Java Archive (JAR) file, explaining the contents of the archive.

  • Q : What is an Interrupt Interrupt : This

    Interrupt: This is an asynchronous message sent to a process or thread which interrupts what it is at present doing. This generally outcomes in an InterruptedException object being received by an interrupted thread. Waiting for an int

  • Q : Write a program that prints out 20

    Write a program that prints out 20 random cards form a standard deck of 52 cards. Make sure the program prints out different sets of cards from one run to the next.

  • Q : Assembly condition codes What do you

    What do you mean by the term assembly condition codes?

  • Q : How can you highlight several goodies

    How can you highlight several goodies or addons the Orbeon?

  • Q : Define Thread starvation Thread

    Thread starvation: It is a condition which applies to a thread which is prevented from running by other threads which do not yield or turn into blocked.

  • Q : Explain String String: It is an

    String: It is an instance of the String class. A string comprises of zero or more Unicode characters, and they are not mutable or immutable, once formed. The literal string is written between a pair of string delimiters ("), as:

    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 : Special set of tags in PHP Normal 0

    Normal 0 false false

  • Q : What is an Internet Service Provider

    Internet Service Provider: It is an Internet Service Provider (abbreviated as ISP) gives connections to the Internet for users who do not contain their own network. The ISP gives such user with their own IP address which enables them to interact with

©TutorsGlobe All rights reserved 2022-2023.