1 / 13

Building Documentation Generators

Building Documentation Generators. Arie van Deursen Tobias Kuipers CWI, The Netherlands. Documentation. Maintenance outsourcing increases demand for documentation Software company asked us whether we could generate documentation

kiefer
Download Presentation

Building Documentation Generators

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building Documentation Generators Arie van Deursen Tobias Kuipers CWI, The Netherlands

  2. Documentation • Maintenance outsourcing increases demand for documentation • Software company asked us whether we could generate documentation • Our reverse engineering results can be intuitively presented as (a particular form of) documentation

  3. Documentation Challenges • Should be available at different levels of abstraction • User must be able to move between different abstractions • Abstraction level should be meaningful to user • Needs to be consistent with source code

  4. Hand-written Documentation Manual Fact Extraction System Sources Repository Formatter Automated Fact Extractor Documentation Tool Architecture

  5. Source Code Analysis • Lexical Analysis (regular expressions) • CALL [A-Z]+ • Syntactical Analysis • * CALL FOO • CALL FOO USING ... • CALL \n FOO

  6. Combine lexical and syntactical syntax “*” ~[\n]* “\n” -> LAYOUT [A-Z]+ -> Id ~[\.]+ “.” -> Statement “CALL” Id “.” -> Statement Statement+ -> Program priorities “CALL” Id “.” -> Statement > ~[\.]+ “.” -> Statement

  7. Example Analysis MOVE 1 TO A . * This is some comment CALL * Strange place for comment FOO . PERFORM BAR .

  8. Example Analysis MOVE 1 TO A . * This is some comment CALL * Strange place for comment FOO . PERFORM BAR .

  9. Example Analysis MOVE 1 TO A . * This is some comment CALL * Strange place for comment FOO . PERFORM BAR .

  10. Example Analysis MOVE 1 TO A . * This is some comment CALL * Strange place for comment FOO . PERFORM BAR .

  11. Island Grammars • Detailed production rules for relevant constructs • Catch-all productions with lower priority • Minimal set of productions for overall program structure • Used for rapid/specific parser development

  12. Repository and Presentation • Standard tools • Relational database • Hypertext browser • Different levels of abstraction • Preformulated queries presented as hypertext to maintenance programmer • Reengineer can formulate own queries on database • Demo

  13. Contributions • Island Grammars for fact extraction • Integration of hand-written facts/documentation • Explicit Repository/Data model • Flexible formatting • Integration of visual/textual presentation • Applied in several commercial projects

More Related