Next: , Previous: Development Timeline, Up: Implementation Details



7.3 Source Code Structure

The directory structure of the source code is shown graphically in the following figure.

Directory Structure of the Source Code

Each box represents a directory. The arrows indicate directory inclusion. Dashed boxes represent directories which are automatically created. Some of the important files are listed under certain directories. The files appearing in bold point to product files, that is, files created as the result of a make process — either executables, libraries or documentation. Files in bold and italic correspond to executables.

We ignore CVS-related files and directories, such as CVS directories and .cvsignore files.

The following table gives some details about each of the directories and files above.

monod/
The main, top-level directory of the project. We have attempted to subdivide the project in meaningful directories and to reduce the clutter in this directory. The main files which can be found here are:
manual/
Contains the source and build space of the manual which you are reading. In addition to the above files, the directory contains two subdirectories.

graphics/ should be a symbolic link to a directory containing the graphics. This directory must be downloaded separately, since we do not save the graphics in the CVS repository (they're too large). See Manual for more information.

The graphics are saved in many different formats. However, to edit them, or add graphics to the directory, at this point please contact the maintainer.

Monod/ is an automatically generated directory and holds the generated HTML files. The head HTML file is index.html.

doc/
This directory contains the source code documentation automatically extracted by ocamldoc. The directory itself is automatically generated when needed. It contains two subdirectories.

html/ contains the HTML output, which can be access from the file index.html in that directory.

latex/ contains the printable output, which is currently no used.

util/
This directory, along with cell/, culture/, plates/ and singlecell/, contains the core source of the Monod project. The util/ directory holds those sources which are generically useful tools, not necessarily tied directly to Monod. They range from logging to hash table extensions to architectural design patterns.
cell/
Contains the implementation for the five lower layers of the Design Stack, up to the Monod Cell layer — that is, all the layers except for the Monod Culture. There is no explicit target associated with this directory. However, certain examples use these layers alone, which is why they are isolated.
culture/
Contains the implementation of the various features attached to the Monod Cultures, such as genetic algorithms, evolutionary strategies, etc. FIXME: Currently empty!
plates/
The Monod architecture calls for applications to be divided in to tectonic plates, each embodying major parts of the functionality. The reusable plates and the code common to them is located in this directory. See Architecture for more detail.
singlecell/
This directory contains files that are very much in progress, and currently the only executable of the project. The files might change and/or be moved to the examples/ directory.
examples/
Contains standalone executable applications demonstrating particular aspects of the project. The current examples include: See Provided Examples in the previous chapter for more details.
testing/
This directory contains the unit test suite code and other tests. Run make bytecode or make native to create the unit test suite executable, called alltests.

The ounit/ subdirectory contains the (free-licensed) source code for an accessory unit test package developed independently from Monod, which we have included (and will perhaps modify) for convenience. OUnit is a unit test framework analogous of JUnit. The original distribution can be found at http://home.wanadoo.nl/maas/ocaml/.

Note from the above that each executable Monod target is controlled by a dedicated Makefile. This (small) restriction is imposed by limitations of OCamlMakefile.

While the source code is not formally divided into packages, there is a clear structure to the distribution and dependencies between the files. A coarse representation of the dependencies is shown in the following figure.

Coarse Dependencies

7.3.1 SourceForge Administration

The Monod project resides on the SourceForge collaborative site. The project home page, at http://monod.sourceforge.net, is not part of the source code distribution, and is currently only owned by the maintainer, along with a special-purpose distribution Makefile to package the entire web site and publish it to the SourceForge server. This is still done manually, as the frequency of changes is very low. Eventually, this section should contain information appropriate to maintain the site, once it becomes more complex and changes more rapidly.