Installation and Example
To install, unzip the download file,
go to the new lurch directory, and compile 2lu.c:
At a search depth of 4 global states, Lurch found the error state. 1.6 megabytes of memory had been allocated when the error was found, compared to 1.73 megabytes total used by this run of Lurch (there is some overhead involved in generated the counter example trace file). Lurch tracks saturation (% new): when the error was found, 75 % of the global states Lurch had found along that path were new, as opposed to redundant. This percentage gives us a rough indicator of saturation, i.e., Lurch's transition from at first finding a great deal of new information to later finding nearly all redundant information. Lurch terminates automatically when the percentage drops below 0.01 %.
As with a model checker, Lurch creates a counter example trace file, showing the global state path from initial values to where the error state was reached. Counter example files are put in the directory ce.
Now create and run an executable for the corrected version of the model:
flex -o2lu.c 2lu.lex gcc -o 2lu 2lu.cFrom the directory in which Lurch is installed, run 2lu on the input file to create the executable lurch (a unique executable is created for each input file). Then run Lurch. Here the input file is a model representing Dekker's solution to the two-process mutual exclusion problem. (This model comes from page 96 of Gerard Holzmann's book Design and Validation of Computer Protocols.)
2lu models/mutual_exclusion_error lurchLurch's output should look something like this:
random seed: 1083095544 time memory states sts/sec % new col depth 0.03 1.60 8.0e+00 2.7e+02 75.0 0 4 _error writing ce/_error (281) 0.20 1.73 1.0e+01 5.0e+01 (totals)After 0.03 seconds, Lurch found the state in the model called _error. In this case the model contains finite-state machines representing two processes. Each process has a critical section in which it would, for example, access a shared resource. A third finite-state machine in the model implements an assertion statement, monitoring the other two and moving to an error state (called _error) if both of the other machines are in their critical sections at the same time.
At a search depth of 4 global states, Lurch found the error state. 1.6 megabytes of memory had been allocated when the error was found, compared to 1.73 megabytes total used by this run of Lurch (there is some overhead involved in generated the counter example trace file). Lurch tracks saturation (% new): when the error was found, 75 % of the global states Lurch had found along that path were new, as opposed to redundant. This percentage gives us a rough indicator of saturation, i.e., Lurch's transition from at first finding a great deal of new information to later finding nearly all redundant information. Lurch terminates automatically when the percentage drops below 0.01 %.
As with a model checker, Lurch creates a counter example trace file, showing the global state path from initial values to where the error state was reached. Counter example files are put in the directory ce.
Now create and run an executable for the corrected version of the model:
2lu models/mutual_exclusion lurchNo fault is detected, and no new trace file is created.