Usage

ISPL Fault Injector > Installation and Usage

The fault injector requires the glade libraries for building. To build, in the main faultinjector-1.0.0 directory type

make

This will build the ISPLfaultinjector executable. The executable can be double clicked or run from a terminal. The runtime option -fta includes an experimental fault tree analysis module.


Token Ring Example

In the RingExample directory is a C++ generator for a token ring model. To build the generator type

g++ trgenerator.cpp -o trgenerator

This will build the exectutable trgenerator which can be run from a terminal. The generator takes 3 command line arguments. The first argument is the number of nodes on the ring, the second is the number of the sending node, and the third is the number of the receiving node. The output is a file tr.ispl containing an ISPL model of the token ring protocol incorporating the input parameters.


Injecting Faults

When you run the ISPL fault injector you will see the following window

Before you can inject any faults you must open an ISPL file by clicking on Open File. The file will only be opened if it passes a syntax check. Once you have opened a file, at the top of the injector window, you can select an agent to inject a fault into, the variable the fault is to be injected on, and the mutation rule for the fault. For example, we can inject a fault on the agent Node_2, and the variable IStatus of Node_2, using the State Replace rule:

Clicking Add Fault allows us to define the parameters for the rule and set various timing options for the fault:

Once the faults have been defined we can save the mutated ISPL file by clicking Save File, view it by clicking Mutated Code, or perform analysis by clicking Diagnosability Analysis.


Analysing the Token Ring Protocol – An Example

Firstly generate a token ring model to be analysed by typing

./trgenerator 6 2 5

This generates a 6 node token ring model, where the sender is node 2 and the receiver is node 5.

Open the resulting tr.ispl file in the fault injector. Now inject the following faults:

 

Agent : Node_2, Variable : Istatus, Fault Type : State Replace, Name : sN2ns, State To Replace : Send, State To Replace With : Wait, Persistence : Constant, Start Actions : Node_1.Send_D, Stop Actions : Node_1.Send_C, Start/Stop : random start

Agent : Node_3, Variable : Istatus, Fault Type : State Replace, Name : hN3ns, State To Replace : Send, State To Replace With : Wait, Persistence : Constant, Start Actions : Node_2.Send_D, Node_3.none, Stop Actions : Node_4.Send_B, Start/Stop : random start and stop

Agent : Node_4, Variable : Istatus, Fault Type : Stuck At Select, Name : hN4nr, State Stuck At : Wait, Persistence : Constant, Start Actions : Node_3.Send_D, Stop Actions : Node_4.Set_token_bit, Start/Stop : random start and stop

Agent : Node_6, Variable : Istatus, Fault Type : State Replace, Name : hN6ns, State To Replace : Send, State To Replace With : Wait, Persistence : Constant, Start Actions : Node_5.Send_D, Start/Stop : random start

 

Click on Diagnosability Analysis to analyse the diagnosability of the token ring protocol in relation to the faults. You will be presented with an option to exclude agents from the analysis. Exclude the Token_Data and Token_Bit agents so that we only analyse the diagnosability of the monitors. Once you have clicked to close the window, the diagnosability analysis will begin to run. Within about 20-30 minutes depending on processor you should obtain the results.