Loading in 2 Seconds...
Loading in 2 Seconds...
The Visual Code Navigator: An Interactive Toolset For Source Code Investigation. F. Boerboom, A. Janssen, G. Lommerse, F. Nossin, L. Voinea, A. Telea. Eindhoven University of Technology , the Netherlands. Outline. The Visual Code Navigator (VCN):
For Source Code Investigation
F. Boerboom, A. Janssen, G. Lommerse, F. Nossin, L. Voinea, A. Telea
Eindhoven University of Technology, the Netherlands
The Visual Code Navigator (VCN):
How can we extract facts from source code?
What can the VCN source code views show?
Testing: - get the tool as binary/source; try to build it
- analyze very large systems (>0.5MLOC) - select extremely messy C/C++ code - try with/without includes (incomplete) - check output for size, correctness, completeness, throughput
- investigate limitations’ causes
++ very good
o could be better
? insufficiently tested
How can we do better than the above tools?
Hard, but unavoidable endeavour
source: any C/C++ project, possibly incomplete/incorrect code
preprocessor: libcpp, also used by GNU CPP
parser: Elsa – uses the Elkhound GLR parser generator
type checker: disambiguates code with type information
filter: limits output to a set of interest (e.g. files, scopes, …)
output generator: efficiently writes the output information to a file
Several enhancements to ‘standard’ fact extraction:
preprocessor: enhanced CPP to produce exact location information (needed later for construct visualization & comparison)
parser & enhanced Elsa to:type checker: - parse incorrect code with extra grammar rules – errors are caught at scope level
- extended Elsa’s template support
- added checkpoints at top-form level to trap internal errors
filter: novel element; reduces output size dramatically, e.g. by skipping standard header information
output added compact binary output; reduces output size 10 times
generator: increases output speed 5 times
project lets users customize extraction (C++ dialect, filtering, parser
concept: strictness, what to output, etc)
We are 3..7 times faster
An evolving project
Several visualization tools
border size x
user points the mouse at some code location…
…and brings the text in focus above the structure
…over a whole syntactic construct, if desired.
- leafs: function bodies: number of LOC in declaration
else number of LOC or sizeof()
- non-leafs: sum of children
- “what kind of symbols are in a library’s headers?”
- “how are namespaces used in interface headers?”
- “does a header have a simple / uniform structure or not?”
- “are there heavy functions from a parameter-passing view?”
C++ std namespace
Basic idea: CVSscan tool [Voinea & Telea, ACM SoftVis’05]
time (version) axis
are files fine/coarse grained?
what is the typical class interface structure?
what is the typical class implem. structure?
find & describe a few large evolution changes
what is the typical macro usage/frequency?
what is the typical comment usage/frequency?
Check it out: www.win.tue.nl/~lvoinea/VCN.html