DiVinE Development Standards

0.8.0

Introduction

This tutorial contains standards, advices and methods of development of DiVinE

CVS

Usage

CVS is a system for team project development. It is able to keep a track of all versions of all source files in a project. For using our CVS, set following environmental variables:
CVSROOT="$USER@anna.fi.muni.cz:/mnt/sda1/CVSroot"
CVS_RSH=ssh

Then get the complete CVS tree of DiVinE using cvs checkout divine in directory, where you want to have it placed.

Basic usage of CVS:

Remember: It is always better to do cvs update -dPA before cvs commit

For more informations see info cvs, man cvs or one of many tutorials on usage of CVS.

Structure of CVS

Our CVS has a fixed structure, which should not be broken even through many people have rights to do it. Please contact project leaders before adding of new directories, if you are unsure where to put them.

Compilation of Sources

DiVinE uses compilation system based on Automake/Autoconf. In this section, the configuration of these tools for DiVinE is described and explained.

Beginning

If you have a copy of CVS repository (either using cvs checkout or cvs copy, you can compile it from a scratch using this sequence of commands:

./autogen
./configure
make

Note:
Script configure creates Makefiles from their Automake/Autoconf templates. It tries to detect configuration of system, paths to various programs needed for compilation etc. It has many useful command line arguments. Some of them are DiVinE-specific - namely:
--enable-checks
--enable-debug
--enable-non-cvs-compilation-flags
--disable-gui
Important: Defaultly sources are compiled without any optimization. To turn the optimization on, just run configure with argument --enable-non-cvs-compilation-flags
See ./configure --help for the detailed description.

Basic Configuration Files

Special Cases of Compilation

In this section some special cases of compilation, which are not fully integrated into Autoconf/Automake compilation system, are covered.

Translation of Syntax Analyzer

Directory src/system/dve/syntax_analysis contains files dve_grammar.yy, dve_lexer.l and dve_keywords.gperf. They have to be translated into corresponding C/C++ sources. It is not made using Autoconf/Automake, because a local Makefile is easier to create in this case and the translation to C/C++ is needed very rarely. Resulting C/C++ sources are stored in CVS and they are also a part of the distribution package.

Sources are translated using divine/src/system/dve/syntax_analysis/Makefile. This Makefile translates:

Compilation of pml2s.jar

In next paragraphs JAR denotes directory tool/model_manipulation/jar and SOURCES stands for tool/model_manipulation/nips_compiler.

Directory JAR contains file pml2s.jar, which is compiled from Java sources in SOURCES/src. A Makefile used for compilation arises from Makefile.am in JAR.

File pml2s.jar is stored in CVS and its recompilation is needed, if Java sources in directory SOURCES change. The change of Java sources is not detected by the Makefile - recompilation has to be invoked manually by execution of make in directory JAR.

The Makefile changes the current directory to SOURCES and uses a Makefile in it to compile all Java sources. Then it builds pml2s.jar file using jar c.

Note:
In order to compile Java sources, libraries from JAR are always temporarily copied to temporary directory SOURCES/lib. They are deleted from there, if compilation finishes successfully.

Tutorial, 2006 developed in ParaDiSe laboratory, Faculty of Informatics, Masaryk University