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 : Explain Operating system Operating

    Operating system: The operating system permits a computer's hardware devices to be accessed by the programs. For example, it permits data to be managed on a computer's disks in the form of a file system and it delivers the co-ordinate positions of a m

  • 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 : What does XSLT processing models include

    What does extensible style sheet language transformations processing models involve?

  • 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 : Explain Fully qualified class name

    Fully qualified class name: The name of a class, comprising any package name and including class name. The class outline is as follows:     package oddments;    class Outer

  • Q : What is Boundary error Boundary error :

    Boundary error: The errors which arise from programming mistakes prepared at the edges of a problem- indexing off the edge of an array, commencing with no items of data, loop termination and so forth. Boundary errors are a very general type of logical

  • Q : Define Aliases Aliases : It is a

    Aliases: It is a multiple references to a single object. Messages might be sent to the object through any of its aliases. The resultant state modifications will be detectable by all.

  • Q : Security features in the UNIX State the

    State the various security features within the UNIX?

  • Q : Explain Object reference Object

    Object reference: It is a reference to an object. Languages other than Java employ terms like pointer or address or. It is significant to keep the difference clear between an object and its reference. The variable like argo

    Q : Define the term New operator Define the

    Define the term New operator: The operator employed to generate instances {instance} of a class.

©TutorsGlobe All rights reserved 2022-2023.