Maintenance guide
For cite-effect, version 1.3
Notations
//+++ | to do |
//--- | to deprecate |
//??? | to investigate |
//patch[01] | (temporary?) bug fix number 01 |
//!!! | to remove before releasing (development only) |
Quality assurance
Automated tests are implemented in the unitTests/ directory, namely by executing at the command prompt:
Under Windows, after compiling unitTests in Release mode :
- unitTests>..\release\unitTests
- unitTests>test
performances
Parsing a 5000-line source file takes
- 3.280 s on iMac G4 700 MHz running Mac OS X 10.4
- 1.071 s on Pentium III 450 MHz running Windows XP
- 2.030 s on Pentium III 450 MHz running Linux Ubuntu 6.10
Deployment
Directory layout
Here is a short description of the source tree.
- cite-effect/ : source files
- main.cpp: command-line parsing and execution
(see UML diagram)
- common_.h, common_.cpp: symbols and references handling classes
(see UML diagram)
- io_.h, io_.cpp: file access classes
(see UML diagram)
- reports_.h, reports_.cpp: graph analysis classes
(see UML diagram)
- Lexer_.h, Lexer_.cpp : base class for lexical analysis using PEG
(see UML diagram)
- Grammar_.h, Grammar_.cpp : base class for grammatical rules and parsing using PEG
(see UML diagram)
- Parser_.h, Parser_.cpp : base class for parser
(see UML diagram)
- c_lexer.lpp, c_lexer.h : C lexical analysis using flex
- C_parser.h, C_parser.cpp : C parser
- Win32/, nix/ : directories with source code specific to respectively Windows and Unix
- unitTests/ : directory with automated tests
- man1/ : directory with man page and html documentation.
This directory is named man1/ instead of doc/ so that the command 'man -M . cite-effect' works.
- site/ : directory with http://cite-effect.sourceforge.net site contents (PHP files)
Build dependencies
Compiler hypothesis :
(1) The following statements properly allocate and deallocate a derived object,
even though the pointer points to the base type, and despite the lack of virtual destructors.
- class base { float a; };
- class derived : base { int i; };base* p= new derived();
- delete p;
(2) 'delete this; return;' works in a member function that disposes of an object
gcc version 4.0 or 4.1
flex 2.5.4a-2
libfl for flex
Building cite-effect executable
Assuming working directory `pwd` is cite-effect/ directory described above, unless noted otherwise.
under OS X or Linux
under Windows, with Visual C++ 2005 express edition
- double-click on cite-effect.sln
- select Release mode
- compile
Debugging
under OS X, use
- unitTests> INCLUDE_DEBUG_INFO=-g make
- unitTests> gdb ./unitTests
Releasing
- update version and date in man1/cite-effect.1 (2 locations).
- edit VERSION= in cite-effect/main.cpp
- edit binary tarfile name (TAR=, without extensions) in cite-effect/Makefile
- cite-effect> make bintar
- edit version in man1/*.guide.html
- edit installation instructions in site/download.php
- edit news in site/index.php
- edit source tarfile name (TAR=, without extensions) in cite-effect/Makefile
- cite-effect> make srctar
- site> make installDoc
- enter password at the prompt
- site> make install
- enter password at the prompt