VPE For Chrnobot

 

- CS2310 Project – Final Report

 

by

Yaw Gyamfi & Mehmud Abliz

 

The VPE for the chronobot time exchange system allows a user to build and use the functionality available as web pages. This is an icon based system allows the user to group functions and pages as they want without writing a single line of html or jsp code. The system is composed of the following components:

·         VLInterface

·         VLparser

·         Page Description Panel

o       Page Descriptor

·         Page Description Parser

·         Code Generator

 

 

 

VLInterface

 

This is the major part system. It provides the user with a panel and buttons with icons. Using this user can compose iconic sentences. The iconic language in this phase is linear; ie. The user is only allowed to create linear combinations of icons. This is because these sentences map to English sentences that in turn define functions within the chronobot system.

 


VLParser

 

This is the component that is invoked after the user has finished composing the iconic sentences. It parses the icons (tokens) to check for syntax and semantics. It returns the groups of icons that form distinct sentences or the icon that is responsible for an error if any. Embedded in the VLParser is a language definition for the iconic language.

An example if language definition (similar to context free grammars for a conventional textual language):

 

Add Bid Room :- <BID> <ROOM>

Add Category :- <ITEM/CATEGORY>

Login : <LOGIN>

Logout :- <NEGATE> <LOGIN>

List Bid Rooms:- <LIST ><BID> <ROOM>

List Category :- <LIST> <ITEM/CATEGORY>

Remove Bid room : <NEGATE ><BID> <ROOM>

Remove Category : <NEGATE> <ITEM/CATEGORY>

 

The Vlparser function is invoked when the user chooses build from the menu.

 

 

Page Description Panel

 

After parsing the visual sentences, the user will want to group functions and describe the webpages. All these are done visually. The interface afford the user the ability to move function (in the form of groups of icons) around and also the software tools to make connections and place icon groups (functions) into pages. The user can also specify dependencies between functions and connections (links) between pages.

On completion, the system builds a description of the web pages which is then sent to the code generator.

Page descriptor

 

   The page descriptor contains the following information:

 

  Name,  List of functions (each function also contains a dependency list), List of links or connections

 

Page Description Parser

 

Page description parser takes an array list of Page Description objects, and run a Depth First Search on the array list (Since there are dependencies between functions, the functions form a tree if we connect them according to their dependencies on each other. Because we have to generate code for the leave node functions in the dependency tree before doing it for inner node, we should run DFS to visit the leave nodes first and generate code for functions from leave node till root node in a bottom-up fashion), extract the information about a page, such as page name, the functions included in the page etc. And then we will use these information retrieved from the Page Description as parameters for the code generating functions to call code generating functions.

 

 

 

 

 

Code Generator

 

Code generator takes the input from the Page Description Parser, and reads the code templates and customize some changeable attributes in the code templates, and then write it into a .jsp file. For each function, the code generator generates the html part (provides an interface to the user, such as a botton with label “list all bidrooms”) and jsp part (the jsp code to perform some kind of function, such as “retrieve the list of bidrooms using tags and show it in the browser”) of the code in two separate files.


Other extensions

 

The VPE is inn some way a generic way of implementing and testing.

This is made possible by the limited amount of specifications that are hard coded into the program.

Most functions and icons can be defined as definition files. For instance, there is the icon definition file that describes the icons their location and their meanings (in the for of token numbers for the parser).

 

The programmer only need define the VLParser to take care of the specific syntax and semantics of the domain being dealt with. The frame work is all set up and the programmer just has to design the finite state machine that describes the icon token combinations.

 

Images:

VLInterface with an iconic sentence that has an error