COBOL Static Program Analysis
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

COBOL Static Program Analysis

cobol-spa reads a COBOL source file (or stdin), performs a static program analysis, and outputs the result in a file (or stdout).

The following types of static program analysis are supported:

  • control flow graph
  • dependency graph

The following output formats are supported:

  • JSON (for further processing)
  • DOT (graph description language)
  • SQL (INSERT statements)
  • PYTHON (builtin PrettyPrinter)

COBOL grammar is nasty. Therefore, cobol-spa parses only the most common applications of PERFORM, SECTION and CALL statements. However, the source code is pretty straightforward, so you can easily adapt it to your needs.

See this demo for a control flow graph generated by cobol-spa.