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 : Use of setjmp and longjmp Use of

    Use of setjmp() and longjmp(): In C/C++, setjmp() saves the contents of the registers at a particular state in the program and longjmp() will restore that state later. In this way, longjmp() “returns” to the state of the program when setjm

  • Q : What is Binary operator Binary operator

    Binary operator: It is an operator taking two operands. Java has numerous binary operators, like the arithmetic operators +, -, *, / and %, and the Boolean operators &&, || and ^, among others.

  • Q : Define Propagation Propagation : When

    Propagation: When an exception is thrown in a method, and there is no suitable exception handler within the method, the exception might be propagated to the caller of the method. For a checked exception, the method should include a throws clause in it

  • Q : Asynchronous and synchronous postback

    Differeniate asynchronous postback and synchronous postback?

  • 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 functionality or an API needs

    The application I am creating needs having access to functionality or an API that use needs the Nokia Vendor ID. For my application how can I have this Nokia VID?

  • Q : XPATH selector Normal 0 false false

    Normal 0 false false

  • Q : Define the term Sibling sub classes

    Define the term Sibling sub classes: Classes which have similar immediate super-class.

  • Q : Explain Two dimensional array Two

    Two dimensional array: A two dimensional array is a continuous memory location having similar kind of data arranged in row and column format (such as a matrix structure). D

  • Q : Problem on COBOL source code errors

    There are many errors in the following COBOL source code. Identify the errors and rewrite the program so that it contains no errors:IDENTIFICATION DIVISION   (Full stop required)PROGRAM ID. ERRORS-EXAMPLE.DATA DIVISION    (Fu

©TutorsGlobe All rights reserved 2022-2023.