LURCH
Encyclopedia
LURCH is a tool for software design debugging
Software testing
Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software...

 that uses a nondeterministic algorithm
Nondeterministic algorithm
In computer science, a nondeterministic algorithm is an algorithm that can exhibit different behaviors on different runs, as opposed to a deterministic algorithm. There are several ways an algorithm may behave differently from run to run. A concurrent algorithm can perform differently on different...

 to quickly explore the reachable states
State (computer science)
In computer science and automata theory, a state is a unique configuration of information in a program or machine. It is a concept that occasionally extends into some forms of systems programming such as lexers and parsers....

 of a software model. By performing a partial and random search, LURCH looks for faults in the model and reports the pathways leading to the faults.

Conventional algorithms

Conventional algorithms for exploring a system's state space
State space
In the theory of discrete dynamical systems, a state space is a directed graph where each possible state of a dynamical system is represented by a vertex, and there is a directed edge from a to b if and only if ƒ = b where the function f defines the dynamical system.State spaces are...

 are deterministic, in that they have specific decision paths for mapping inputs to outputs. Nondeterministic algorithms, on the other hand, do not have such specific paths, allowing for the same inputs to result in different outputs. Deterministic analysis is often considered safer than nondeterministic methods since it explores all possible system states in an exhaustive and thorough way. Nondeterministic analysis, however, may only explore a subset of the entire state space, and thereby miss some of the possible faults.

Nondeterministic analysis methods

Much evidence supports the notion of clumping (computer science), where the effective state space of a program is small compared to all reachable states. A tool such as LURCH is especially useful in such situations. However, depending on the problem, if clumping does not occur, the nondeterministic approach may not be very effective. Yet in such situations, LURCH can at least report whether performing a nondeterministic search will be safe or not.

Decisions on using LURCH

Menzies et al. in [1] argue that LURCH is no less safe than conventional deterministic algorithms for software model analysis; that LURCH is simple, competent, fast, scalable, and a stable nondeterministic analysis method:
  1. LURCH is simple: The following is pseudocode for LURCH, which is considerably easier to implement compared to more complex standard model checkers.


function step(Q, state)
while Q is not empty
// choose a transition at random
tr := random_pop(Q)
// modify state vector accordingly
execute_outputs(tr, state)
// disqualify transitions ruled out by choice
for tr' in same machine as tr
delete(Q, tr')

function check(state)
local_fault_check(state)
deadlock_check(state)
// cycle_check requires hash table
cycle_check(state)

function lurch(max_paths, max_depth)
repeat max_paths times
// set all machines to initial state
for m in machines
state[m] := 0
// generate a global state path
repeat max_depth times
for tr in transitions
// see if transition is blocked
if check_inputs(tr)
// if not, put it in the queue
push(Q, tr)
// get next global state
step(Q, state)
// see if next state represents a fault
check(state)
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK