Institutionen för Datavetenskap
Linköpings universitet





Examensarbete

Generering av dokumentation för kod skriven i Erlang
Generating documentation for Erlang source code


Klas Johansson



Sammanfattning

Simulation Products and Solutions, a division of Ericsson Radio Systems AB, is responsible for providing test solutions for mobile systems within Ericsson. The NETSim tool is one of their products. Today their documentation is made up by various kinds of paper based documentation. Printed documentation is often neither easily accessible nor updated. To make it easier for those who read and write the documentation it is desirable to be able to write as much as possible of the documentation directly in the source code and generate the documentation in some format.

Abstract

This thesis outlines how a tool for documenting Erlang source code has been developed. Key requirements are that as much documentation as possible should be derived from the source code and the comments should have little impact on the readability of the source code. The tool should generate documentation in HTML format and it should be possible to add support for other formats as well. Prototypes for the comments in the source code and the final documentation were created. This thesis handles issues relating to how the source code is read, how an intermediate format is designed and how the generation of documentation is implemented in order to support several views and many formats. The tool is implemented in Erlang and has been tested on itself during development. The result is a tool that makes documenting Erlang programs easier, generates documentation that has a consistent layout across modules and can be upgraded to support formats other than HTML.