*** Welcome to piglix ***

Linear Code Sequence and Jump


Linear code sequence and jump (LCSAJ), in the broad sense, is a software analysis method used to identify structural units in code under test. Its primary use is with dynamic software analysis to help answer the question "How much testing is enough?". Dynamic software analysis is used to measure the quality and efficacy of software test data, where the quantification is performed in terms of structural units of the code under test. When used to quantify the structural units exercised by a given set of test data, dynamic analysis is also referred to as coverage analysis.

In a narrower sense, an LCSAJ is a well-defined linear region of a program's code. When used in this sense, LCSAJ is also called JJ-path, standing for jump-to-jump path.

The LCSAJ analysis method was devised by Professor Michael Hennell in order to perform quality assessments on the mathematical libraries on which his nuclear physics research at the University of Liverpool depended. Professor Hennell later founded the Liverpool Data Research Associates (LDRA) company to commercialize the software test-bed produced for this work, resulting in the LDRA Testbed product.

Introduced in 1976, the LCSAJ is now also referred to as the jump-to-jump path (JJ-path). It has also been called Liverpool's Contribution to Silly Acronyms and Jokes.

An LCSAJ is a software code path fragment consisting of a sequence of code (a linear code sequence) followed by a control flow Jump, and consists of the following three items:

Unlike (maximal) basic blocks, LCSAJs can overlap with each other because a jump (out) may occur in the middle of an LCSAJ, while it isn't allowed in the middle of a basic block. In particular, conditional jumps generate overlapping LCSAJs: one which runs thorough the test when the condition evaluates to false and another that ends at the jump when the condition evaluates to true. (The example given further below in this article illustrates such an occurrence.) Thus every basic block is an LCSAJs, but an LCSAJs may consist of more than one basic block. According to a monograph from 1986, LCSAJs were typically four times larger than basic blocks.

The formal definition of a LCSAJ can be given in terms of basic blocks as follows:

a sequence of one or more consecutively numbered basic blocks, p, (p+1), ..., q, of a code unit, followed by a control flow jump either out of the code [unit] or to a basic block numbered r, where r≠(q+1), and either p=1 or there exists a control flow jump to block p from some other block in the unit. (A basic block to which such a control flow jump can be made is referred to as a target of the [LCSAJ] jump.)


...
Wikipedia

...