Cobalt
Development
I implemented the project together with my fellow students Michael Rüegg, Mark Spörndli and Roger Waldvogel for the ?Software Engineering 2? course at HSR.
Detailed Description
Cobalt is a tool to inspect and visualize COBOL programs. After opening such a program Cobalt visualizes it in two different views. One of them is a traditional source code editor with syntax highlighting. The other and more important control displays a call-graph. This call-graph allows a developer to understand the structure of a program easily.
Technical Details
- Additional Developers: Michael Rüegg, Mark Spörndli, Roger Waldvogel
- Programming Language: C++
- Development Environment: Microsoft Visual Studio.Net 2003
- Project Size: 215 files, 24'537 code lines, 10'171 comment lines, 5'527 blank lines, 1.15 MiB code
- Technology used: COBOL, CppUnit
Feature List
- Open and parse a COBOL program
- Display the call-graph of COBOL programs
- Display syntax highlighted source of COBOL programs
Challenges
Cobalt was developed as part of a software engineering course. But the final target of the course was not the finished software, even though Cobalt is a useful application that with a bit of tuning, could be used in a professional environment. In this course the students should learn to work in large (thus the team consisted of five people) and to do all the documentation work involved in a professional manner. Thus the final product contained, besides the software, a project documentation of approximately 180 pages and a full website documenting the project. Therefore the main challenge of this project was to coordinate the team and to divide the workload equally without introducing delays caused by someone waiting for results of another team member.
Screenshots
Videos
Code Sample
The code sample shows the function used to parse a COBOL program. The numbers inside the comments refer to a document describing the syntactic structure of a COBOL program.
//-----------------------------------------------------------------------------
DEFINE_NONTERMINAL(parse_cobol_source_program)
{
BEGIN_NONTERMINAL(ELEMENT_COBOL_SOURCE_PROGRAM);
TOKEN_TYPES tokenChoice[] = { TOKEN_IDENTIFICATION, TOKEN_ID };
// 1
NEED_TOKENS(tokenChoice, 2);
NEED_TOKEN(TOKEN_DIVISION);
NEED_TOKEN(TOKEN_SIGN_DOT);
NEED_NONTERMINAL(parse_program_id_cobol_source_program);
// 2
OPTIONAL_NONTERMINAL(parse_identification_division_content);
// 3
OPTIONAL_NONTERMINAL(parse_environment_division);
// 4
OPTIONAL_NONTERMINAL(parse_data_division);
// 5
OPTIONAL_NONTERMINAL(parse_procedure_division);
// 6
if (OPTIONAL_NONTERMINAL(parse_nested_cobol_source_program))
{
while (OPTIONAL_NONTERMINAL(parse_nested_cobol_source_program));
NEED_TOKEN(TOKEN_END);
NEED_TOKEN(TOKEN_PROGRAM);
NEED_NONTERMINAL(parse_program_name);
NEED_TOKEN(TOKEN_SIGN_DOT);
}
SUCCESS();
return true;
}