Explain Counters

Counter variables are commonly used in many computer applications for different purposes. Here is a typical example where a variable is used to measures the progress of some activity of interest:

1146_counter1.jpg

If the exact value of the progress variable or the entire range of its values is not really required for checking the property of interest, then the use of this variable can cause unnecessary (potentially infinite) state space expansion. In this case, the progress variable can be reduced to a Boolean variable:

80_counter2.jpg

This modification immediately cuts down the number of states that need to be explored for this piece of code from ((2*MAXINT)+1)2 to only two possibilities: the progress variable taking only the value of true or false. Such small modifications can lead to exponential improvements in memory and time for a model checker.

   Related Questions in Programming Languages

  • Q : What does XSLT processing models include

    What does extensible style sheet language transformations processing models involve?

  • Q : What is Block Block : The statements

    Block: The statements and declarations are enclosed between a matching pair of curly brackets ({ and }). For example, a class body is a block, as it is a method body. The block surrounds a nested scope level.

  • Q : Define Thread Thread : It is a

    Thread: It is a lightweight procedure which is managed by the Java Virtual Machine (abbreviated as JVM). Support for threads is given by the Thread class in java.lang package.

  • Q : Explain Message passing Message passing

    Message passing: We characterize the object interactions as message passing. The client object sends a message to a server object by invoking a technique from the server's class. Arguments might be passed with the message, and a outcome is returned by

  • Q : Problem on linear equations using Matlab

    Use Matlab to solve the following system of linear equations:2x + y + 3z = 12x + 6y + 8z = 36x + 8y + 18z = 5Capture Matlab code and the result in a text file.

  • Q : What is Virtual desktop Virtual desktop

    Virtual desktop: The name employed to explain a user's graphical working area in a window manager. The name arises in the early days of graphical user interfaces whenever it was thought that such would lead to `paperless offices'. This was anticipated

  • Q : What is Pattern Pattern : It is a

    Pattern: It is a recurring theme in class usage or design. Interfaces like Iterator encapsulate a pattern of admission to the items in a collection, whereas freeing the client from the requirement to know details of the way in which the collection is

  • Q : Function of TCHAR used in Windows

    Write down a program to show the function of TCHAR used in Windows Programming?

  • Q : What is pipe What is meant by the term

    What is meant by the term pipe?

  • Q : Create an applet of bounces in JAVA

    Create an applet that bounces a blue ball inside an applet using Thread.  The ball (diameter is 10) will start at position (0,0).  When the ball hits the edge of the applet, the ball should bounce off the edge at a randomly selected angle between 20 and 60 d

©TutorsGlobe All rights reserved 2022-2023.