--%>

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 : Define Parallel programming Parallel

    Parallel programming or parrelel computing is the concurrent use of multiple compute resources to resolve a specified problem. Parallel program always comprises of concurrently executing processes, problem decomposition relates to the manner in which

  • Q : What is the way to render XForms What

    What is the way to render XForms?

  • Q : Explain Inheritance hierarchy

    Inheritance hierarchy: The relationship among super-classes and sub-classes is termed as an inheritance hierarchy. The single inheritance of classes means that each and every class has simply a single `parent' class and that Object class is the eventu

  • Q : Define Software engineering Software

    Software engineering: It is the system of applying of an engineering discipline to the implementation, design and maintenance of the software systems.

  • Q : Define Absolute filename Absolute

    Absolute filename: It is a filename whose full path is unambiguously provided starting from the top (that is, root) of a file system tree. For example: c:\Java\bin\javac.exe

  • Q : Difference between JavaScript and AJAX

    Write basic difference between JavaScript and AJAX ?

  • Q : Use of private Q. Explain the use of

    Q. Explain the use of private, public, protected access specifies.  

  • Q : Inventory management system in UML

    Mini-Case The Hatcher Company is in the process of developing a new inventory management system.  One of the event handling processes in that system is Receive Supplier Shipments.  The (inexperie

  • 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 : Define Hardware Hardware : It is the

    Hardware: It is the physical devices of a computer system, like its micro-chips, keyboard, disk drives, printer, sound card, and so forth. It is termed `hardware' in contrary to programs, which are termed `software'.