Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need for expert's comments

Status
Not open for further replies.

cjanice

Programmer
Jan 11, 2004
4
0
0
MY
I'm currently working on a system for my Degree final year project. Somehow, I think that my project is quite simple and I would like you to give comments on my project and hope that you can share your ideas with me to make the system more interesting.

My system is to convert flowchart to C framework source codes. Basically, the flow of my system is:

1) User drags and drops the charts onto the map,
designs the whole program structure.
2) User marks the starting node.
3) User clicks on the “Convert” button.
4) The system will read the map and translates the
charts to framework codes.
5) The translated codes will be edited for syntax
highlighting.
6) The translated codes are being displayed on the
coding area.
7) User can choose the other operations, such as
continue editing, save/print/print preview/text
editing/etc.

I will be using Microsoft Visual C++ to develop the system. For further details on my system, please feel free to drop me a mail at cjan83@yahoo.com

Your reply is very much appreciated. Thank you.
 
1.You are explaining something you have it in your mind. Is very hard to comprehend exactly what do you want to do with it. Some example woud help.

2.What is the question from your post?

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Thank you for your reply. To answer your questions:

1) My system is used to convert flowchart into C framework source codes. Basically, the user first needs to click and drag the symbol onto the flowchart window. After designing, the user needs to click on the "Convert" button and the system will translate the flowchart symbols into the source codes.

There will be two windows: flowchart window and code editor window. The flowchart window is filled with gridlines and scrolling bars. The area will be designed as a map, with equally size of rectangles.

After the user had finished designing the whole program structure, the system will need to read the map. To read the map, I am going to use Breadth-First Search algorithm where it will traverse thru all the connected rectangles. This is considered as a network, where the user needs to mark the starting node and ending node. From the starting node, the algorithm will explore thru the rest of the nodes, and translate them according to their symbol type until the ending node.

The code editor window will display the translated codes from the symbols. It will contain indent, end of line character and spacing. Also, syntax will be highlighted in blue color.

The codes translated will contains only the structures, such as conditions and repetitions. The details of the coding, such as calculation and I/O will not be translated as they are too wild to be guessed by the system. However, a line “//put your codes here” will be placed to mark that the position is free to place codes.


2) I really need your advice on how to enhance the system as I think that it is considered simple. I really hope that you can share your ideas with me.

Thank you very much and I really appreciate your reply.
 
Oh, now I see. You just want to make some sort of "Code wizard". Kinda' like the wizards Visual C++ uses to generate code for a MFC program.

This is the most daring project I have heard until now, hard to do too, but not imposible. I know a guy who had tried to do something similar for generating SQL phrases.

If you want to use your program at the most general level you will have to think of all the posibilities. For I/O I suggest to propose the user some generic I/O class with minimim functionality you create.

My aproach to such a problem would be something like this:
1. I will set only 2-3 or three types of boxes a user can put in the chart.
2. I will make only few links between them
3. Use the algoritm to traverse them-> then generate code

Then I would add another type of box or link between and see how these affect the system.
One test would be to try to make your program generate source code for applications you already know.(first simpler ones then more complex)

Reverse engineering is what you are trying to do. You can see some samples in Rational Rose and Visual Modeler, or another UML designers.

This is all I can say about this realm, I am not such a specialist in thsi field.
Hope this will somehow give you some clues,


s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Yeah, I've thought of this before. But, I still think that this project is not challenging enough because the system is only capable to convert to framework source codes. I think that it is quite impossible to convert it into C source codes which can be compiled and run. Do you have any idea to make this possible?

Once again, thank you for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top