Capabilities of Visustin

What kind of code can you flowchart?

Visustin visualizes source code of any kind. Complex or bad code? No problem. Visustin works with undocumented, unstructured programs, even true spaghetti code. The worse the code, the more use for Visustin. With Visustin you get to understand problem cases: programs whose developers left the company, programs whose documents are out-of-date, programs with bugs, programs written in an unfamiliar programming language, programs with a bad coding style, code with inadequate comments, improperly formatted code, long routines with unclear logic, incomprehensible modules that nobody dares to touch...

Visustin is useful with your own good code as well. With Visustin you document your own work in a painless way. Rather than spending time making documents in a manual way, use Visustin to automate your work. This way you save time for something more productive and fun, such as writing enhancements.

Even though Visustin itself runs on Windows, your code can be for any environment. You can flowchart code written for Windows, Unix, MacIntosh, mainframe, an exotic processor or anything else. Visustin is great for understanding legacy code such as programs for MS-DOS and CP/M. It even supports code originally written on punched cards. Your program can run on a workstation, a server or a mobile device. It doesn't matter. You won't be needing the target machine for flowcharting. Visustin works independently of the target operating system, programming libraries or hardware. All you need is the source code.

Flow charts display the logic in your code. Code with executable statements such as decisions, loops and jumps works best. Visustin also reads non-executable code such as declarations, data definitions and the like. Should too many declarations clutter the flow chart, consider removing them and keeping just the executable code, which is the key to understanding program logic.

File by file, statement by statement

Visustin works a single source file at a time. It can completely visualize almost any source file in the supported languages. Using a few symbols, Visustin visualizes the code statement by statement. Subprograms, functions, methods and other procedures will appear side by side.

You don't need to visualize a big file in its entirety. You can pick up a single class, a single procedure or just a single convoluted block. Simply select the lines you want and press the Draw button. If some parts of the file are less important, simply remove those lines and focus on the crucial points of the algorithm. A short, buggy code snippet is enough for Visustin, even when your compiler requires a full set of complete error-free files.

By default, Visustin works interactively, a single file at a time. In order to process several files in a batch, use Bulk flowcharting in the Pro Edition. This way it is possible to run Visustin from the command line or from a batch file, such as in a build process.

What Visustin doesn't do

Visustin is a flowcharting tool that doesn't build call trees or dependency diagrams. Each procedure displays independent of any other procedures. Procedure calls are not visualized. A function call doesn't show up as a link to the target function. References to include files or other called modules are not followed either.

Visustin displays detail up to the statement level. Sometimes a complex statement consists of several internal parts, such as an if statement with many Boolean operators (such as and, or, &&, ||), or inlined logic such as the ternary operator ?: in C. Visustin doesn't split statements into such logical pieces. This keeps the amount of detail bearable even where very complex logic is in use.

Comments

You can have comments to show up in the flow chart [feature not implemented for COBOL]. Based on the position of the comment and the code near it, Visustin tries to assign the optimum location for the comment.

At times, comments may show up at irrational places, because comments don't really belong to the control flow. In fact, a comment may well exist on a line through which there is no control flow at all. What is more, developers don't necessarily write comments according to the control flow, but according to physical lines. Consider the two typical comments below:

If (x > 0) Then  ' x must be positive

This comment describes the condition (x > 0). In the flow chart, we want this comment next to the condition.

If (x > 0) Then  ' Move object to the right

This comment is written in the same position. Rather than describing the condition, it describes what happens next. In the flow chart, we would like this comment next to the "Then" branch, not next to the condition.

As we saw, it's impossible for Visustin to always know where exactly each comment makes sense. Therefore, Visustin uses rules of thumb. Here are the rules:

If a comment appears at the wrong location, try placing it above the line it should describe. If you want a comment to describe a branch or a loop body, place the comment within that branch or loop paying attention to block delimiters such as {..}, begin..end, then..else, repeat..until. On the other hand, if you want the comment to describe the branch/loop enter condition, put the comment immediately before the conditional or looping statement.

Comment options

Compiler directives

Several programming languages support compiler directives (preprocessor instructions such as #if..#else) to set compiler options and selectively compile a block of code. Visustin can show compiler directives as comments or as flow symbols. When shown as flow symbols, the compiler directives look as if they were regular executable code with decisions and branches.

Compiler directive options

Supported code files

Visustin loads source code files saved as plain text. The filename extension is not an issue. Visustin supports a variety of text file encodings, such as ASCII and Unicode, the detection being automatic most of the time.

Visustin recognizes invisible control characters. All regular line ending conventions are supported: CR+LF (Windows), LF (Unix), CR. If the file contains end-of-file markers, which are ^Z (CP/M and DOS) and NULL, they are removed. TAB characters are converted to spaces.

Binary source code files can't be loaded. Copy & Paste your source code to Visustin to overcome this limitation.

©Aivosto OyVisustin Help