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 : What is a Port Port: It is a number

    Port: It is a number employed by a procedure to communicate with the other procedure across a network, employing the Transmission Control Protocol (abbreviated as TCP) or User Datagram Protocol (abbreviated as UDP), for instance.

  • Q : Retrieve the text for ORA-12705 Normal

    Normal 0 false false

  • Q : Explain Program counter Program counter

    Program counter: A program counter is an integral portion of a computer's Central Processing Unit. It includes a reference to the memory address of the subsequent instruction to be fetched, ready to be executed throughout the next fetch-execute cycle.

  • Q : Explain Structured programming

    Structured programming: It is a style of programming generally related with languages like FORTRAN, C, Pascal and so forth. Employing structured programming methods, a problem is frequently resolved employing a divide and conquer approach like stepwis

  • Q : What is applet? Explain life cycle of

    Ans. Applet: An applet is an application designed to travel over the internet and to be executed on the client machine by a java compatible

  • Q : Explain the meaning of semantic

    Explain the meaning of semantic connotations.

  • Q : What is no-arg constructor no-arg

    no-arg constructor: It is a constructor which takes no arguments. By default, each and every class without an explicit constructor has a default no-arg constructor with the public access. Its role is entirely to invoke the no-arg constructor of the in

  • Q : Define PS3 Debug/TEST/Prototype

    Define PS3 Debug/TEST/Prototype Consoleroduction deployment.

  • Q : "Const" qualifier for pointers and

    In C++ an arguments to a function can be declared as constant as shown below:

    Q : Program for Linux operating system that

    Write a program for Linux operating system that uses Posix threads to sort a large array.  Specifically, you should write a program to generate random numbers. Then create at least two threads, each of which sorts a portion of the array. After the thr

©TutorsGlobe All rights reserved 2022-2023.