next up previous contents
Next: Generating The Program State Up: No Title Previous: The Description of The

   
Input Translator

In this chapter, we illustrate how we automatically translate the input text file to a set of Java files that are integrated into the framework. Towards this end, we describe the relation between each section of the input file (described in Chapter 3) and the corresponding data structure that we generate. Depending on the problem at hand, developers of fault-tolerance should instantiate an instance of our framework that is integrated with a set of problem-dependent Java files. In other words, to synthesis a fault-tolerant program from its fault-intolerant version, we need to give the fault-intolerant program to our framework so that we can use the core of the framework for the synthesis of the fault-tolerant program. Towards this end, we translate the abstract structure of the fault-intolerant program (specified in guarded command) to a set of Java classes that we can integrate into our framework and generate an instance of the framework that enables us to synthesis the corresponding fault-tolerant program. In order to translate the input text file to the corresponding Java files, developers of fault-tolerance should use our parser on the command line as follows.

  java  MyParser inputFilename



The execution of the above command generates the required java files namely, State.java, ProgramImplementation.java, Fault.java, Invariant.java, SafetySpecification.java, InitialStates.java, Tool.java, and a set of Java files corresponding to each process with the same name given to the process in the input file. In Section 4.1, we illustrate how we generate a Java file that represents each state of the program. Then, in Section 4.2 we introduce the structure of the program and its processes. We present the data structure for the internal representation of faults in Section 4.3. In Sections 4.4 and 4.5, we describe the generation of the Java files that correspond to the invariant and the safety specification. Finally, we generate a Java file that is responsible for the generation of the output fault-tolerant program.

 
next up previous contents
Next: Generating The Program State Up: No Title Previous: The Description of The
Ali Ebnenasir
2003-10-26