Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CIS895: Bogor - Java Environment for Eclipse Vision Document V1.0 August 6, 2005 PROJECT: BOGOR-JAVA ENVIRONMENT FOR ECLIPSE DELIVERABLE: VISION DOCUMENT Version: 1.0 Date: August 6, 2005 Prepared by: Yong Peng Major Professor: Robby Kansas State University 1 CIS895: Bogor - Java Environment for Eclipse Vision Document V1.0 August 6, 2005 Table of Content 1. INTRODUCTION ........................................................................................................................ 3 1.1. 1.2. 2. BACKGROUND ......................................................................................................................... 3 MOTIVATION ........................................................................................................................... 3 PROJECT OVERVIEW ............................................................................................................. 3 2.1. 2.2. 2.3. 3. INTRODUCTION ....................................................................................................................... 3 GOAL ......................................................................................................................................... 4 PURPOSE ................................................................................................................................... 4 REQUIREMENTS SPECIFICATION ................................................................................... 4 3.1. 3.2. 3.3. 3.4. USE CASE 1 – GENERATE BIR FILES ................................................................................. 5 USE CASE 2 – MODEL CHECK COMPILED FILES ............................................................ 6 USE CASE 3 – TRACE ERRORS ............................................................................................ 6 USE CASE 4 – VIEW BIR FILES .......................................................................................... 7 4. ASSUMPTIONS ........................................................................................................................... 7 5. CONSTRAINTS ........................................................................................................................... 7 6. ENVIRONMENT ......................................................................................................................... 7 7. REFERENCE................................................................................................................................. 7 2 CIS895: Bogor - Java Environment for Eclipse Vision Document V1.0 August 6, 2005 1. Introduction 1.1. Background The tool to be developed in this project will build on top of Eclipse Platform, which is an open extensible IDE for anything and nothing in particular from eclipse.org. The new tool will incorporate with Bogor and BB to do model checking on Java programs. BB, the abbreviation of Bytecode-to-BIR developed by Dr. Robby, is a compiler that complies Java Bytecode to BIR. Bogor, a software model checking framework developed in SanToS lab, supports both general purpose and domain-specific software model checking. 1.2. Motivation The motivation of this project comes from the need to develop new eclipse plug-ins that is able to analyze Java programs using Bogor. Unlike Java testing tools, model checker explores all paths where testing tools only explore one path. Thus, it can consistently find concurrency bugs such as deadlocks, race conditions, etc. Bogor is an extensible software model-checking framework with state of the art software model checking algorithms, visualizations, and user interface designed to support both general purpose and domain-specific software model checking. 2. Project Overview 2.1. Introduction This project involves the development of Eclipse plug-ins that allows developer to fully utilize Bogor functions to do model checking on Java programs. Figure 2.1 presents a high level structure of the Eclipse Platform and plug-ins that will be developed. The plug-ins and launcher provide developers with the capability of Java programs model-checking. After coding Java programs, developers are able to view the corresponding BIR files, do a model checking on Java programs, and trace error visually in Java programs. 3 CIS895: Bogor - Java Environment for Eclipse Vision Document V1.0 August 6, 2005 Bytecodeto-BIR Viewer Eclipse Platform Depends on Incremental compilation BIR Launcher T r a c e Error Trace in Java Figure 2.1 2.2. Goal There are three goals of this project. In (1) Providing incremental compilation of Java Java bytecode to BIR in Eclipse that is synchronized with Eclipse JDT build process. (2) Providing a launcher in Eclipse to invoke Bogor and check the compiled code. (3) Building a Java counter example display on top of Bogor's counter example display. 2.3. Purpose To develop new Eclipse’s plug-ins and launcher in order to convert Java programs to BIR and to do a model checking on these BIR files. 3. Requirements Specification This section includes a high-level use-case diagram and text descriptions of four use cases that will be addressed in this project. Figure 3 is a high-level use-case diagram. The use cases, “Compile Java Files” and “Compile Java Bytecode to BIR File”, are not in the scope of this project. 4 CIS895: Bogor - Java Environment for Eclipse Vision Document V1.0 August 6, 2005 <<include>> Compile Java Files Incremental compilation View BIR Files <<include>> Developer Compile Java Bytecode to BIR File Trace Errors Model Check Compiled Files Figure 3. High Level Use Case Diagram 3.1. Use Case 1 – Generate BIR files Description: Generate BIR files using Bytecode-to-BIR compiler. Actors: Developer Specializes: None Includes: Compile Java Bytecode to BIR Extends: None Pre-Conditions: 1. Java files compiled to class files. 2. Class files reside in project output folder. Details: 1. Java developer edits and compiles java program. 2. New java classes are generated into output folder. 3. BB is invoked to produce BIR files into BIR folder. Post-Conditions: Generated BIR files save into project BIR folder. 5 CIS895: Bogor - Java Environment for Eclipse Vision Document V1.0 August 6, 2005 Exceptions: None Constraints: None Variants: None Comments: None 3.2. Use Case 2 – Model Check Compiled Files Description: Launcher collects all required BIR files into a final BIR file. And then Bogor is invoked to check the final BIR file. Actors: Developer Specializes: None Includes: None Extends: None Pre-Conditions: BIR files reside in project BIR folder. Details: 1. Developer calls the launcher. 2. Launcher collects all required BIR files. 3. Launcher generates a final BIR files. 4. Launcher calls Bogor. 5. Bogor generates counter examples if any. Post-Conditions: Final BIR file is generated, and counter example is generated if any. Exceptions: None Constraints: None. Variants: None Comments: None 3.3. Use Case 3 – Trace Errors Description: Trace errors in Java programs. Actors: Developer Specializes: None Includes: None Extends: None Pre-Conditions: Bogor generates counter example trace. Details: 1. Developer clicks on the error in the counter example trace. 2. The line of problem code in Java program will be highlighted. Post-Conditions: Developer should find the causes of the program errors. Exceptions: None Constraints: None 6 CIS895: Bogor - Java Environment for Eclipse Vision Document V1.0 August 6, 2005 Variants: None Comments: None 3.4. Use Case 4 – View BIR Files Description: View BIR files in a viewer. Actors: Developer Specializes: None Includes: None Extends: None Pre-Conditions: 1. Java files compiled into Class files. 2. Class files reside in project output folder. Details: 1. Developer compiles java program. 2. Developer opens the BIR viewer. 3. Developer clicks on the Java program in Java editor. 4. BIR file displays in the BIR viewer. Post-Conditions: 1. Selected BIR file displays in the BIR Viewer. Exceptions: None Constraints: None Variants: None Comments: None 4. Assumptions User system shall install Eclipse V3.1RC3 and JRE 1.4.2 level or higher 5. Constraints N/A 6. Environment This project will be using the following IDE and Frameworks IDE: Eclipse Version 3.1 Frameworks: SWT (Standard Widget Toolkit), Jface 7. Reference BB: http://www.cis.ksu.edu/~robby/ Bogor: http://bogor.projects.cis.ksu.edu/ SanTos Lab: http://www.cis.ksu.edu/santos/ Eclipse: http://www.eclipse.org/ 7