$Id: README.txt,v 1.1 2003/10/30 10:24:35 uwe Exp $ ------------------------------------------------------------------------------- Installation procedure for VDM Class Library with a database implemented as flat file and only C sources are ported ( no .o files, no binaries) ( older versions work with a directory hierarchy for the database ) ------------------------------------------------------------------------------- unzip and un-tar file in a working directory e.g. in ~/work: gunzip -c flatport.tgz | tar xvf - or tar xzvf flatport.tgz if tar supports z flag for gunzip ------------------------------------------------------------------------------- execute make FLATBOOT in this directory to produce .o files and binaries. (porting .o files or binaries makes often trouble with dynamic link libraries) This target uses gcc, g++ as C an C++ compilers. It assumes, that Tcl an Tk is available, "tcl.h" must be found in "/usr/local/include" or "/usr/include/tcl" "libtcl*.a" (* = version #) must be available in standard lib dirs or in "/usr/local/lib" The generator programm "vdm" is build in the "domc" subdirectory, if during compilation trouble occurs with header files for socket support, remove the "-DCLIENT=1" option in the Makefile and restart the make ------------------------------------------------------------------------------- create a local installation directory e.g. mkdir ~/vdmsys or use a system dir e.g. /usr/local/vdmsys ------------------------------------------------------------------------------- set the environment variable VDMROOT to that directory e.g. in ~/.profile VDMROOT=~/vdmsys export VDMROOT extend the PATH variable to search for $VDMROOT/bin e.g in ~/.profile PATH=$PATH:$VDMROOT/bin ------------------------------------------------------------------------------- execute from the working directory (e.g. ~/work) make INSTFLAT if you want to install the Class Library into the system select "/usr/local/vdmsys" as "VDMROOT", be sure to execute "make INSTFLAT" with root access rights, e.g. by executing the "su" command prior to the "make" command. ------------------------------------------------------------------------------- systems used by this tool set: the generator programs "VDM" and "vdm" need a Bourne shell like shell and the "make" program the "vdminfo" ASCII based info program and the test case generator "bbtest" need "Tcl 7.*" to be installed under "usr/local/lib/tcl" (default in the distribution). If necessary, define symbolic link. the "vdmhelp" program needs also "Tk 3.*" or "Tk 4.*" and "wish" to be running ------------------------------------------------------------------------------- Test and example programs are collected in the test directory e.g ~/work/Test. Execute cd ~/work/Test make to see which tests can be made. These test are also copied to $VDMROOT/Test For examples of C++ and automatic memory management look at the examples in "Test/automem/function": test and demo of the C++ interface for bags, maps, optionals, sets, trees, tuples and unions and in "Test/Tinymake": a mini make and execute "make" in those directories for generating prototypes out of functions signatures, look at the example directory "Test/signature" into the file "sig.vdm" and try "make" in that directory ------------------------------------------------------------------------------- The system has an interface for the WWW, the VDM Help is available in a WWW Browser version. Therfore the VDM Database must be run under a server process. To start this process, execute $VDMROOT/lib/vdm/vdmd -c $VDMROOT/lib/vdm/vdmd.conf A man page for "vdmd" is available with "man -M $VDMROOT/man vdmd". This "vdmd" can serve the "vdmhelp" program as well as a WWW client "dbmc" After starting the server, vdmhelp may be activated in the client/server mode with vdmhelp -client [host [port]] & see "man -M $VDMROOT/man vdmhelp" for host and port parameters The WWW client "dbmc" resides in $VDMROOT/bin. To call this client, create a script in your cgi-bin directory of the http system, e.g. a script "vdmhelp" with the following content: #!/bin/sh exec $VDMROOT/bin/dbmc -w $@ the $VDMROOT value must be substituted by the real value, because the script is started by the "httpd" demon. With "http://localhost/cgi-bin/vdmhelp" you then will get the VDM Help startup page. This extension requires at least Tcl Version 7.5 and Tk Version 4.1 (no beta versions) The client/server stuff and the WWW interface was done by Marko Temme in a diploma thesis, this will be available as TeX and in HTML format. The "VDM" generator control program and the generator "vdm" also support the client/server mode with the same options as the "vdmhelp". ------------------------------------------------------------------------------- A larger example for using VDM and C++ with automatic memory management is stored in the directory "tools/g++vdmdbm" the program "dbm" in this directory is a database access and management program for the VDM Class Library database (if its not there execute "make FLAT"). this program is built from a VDM data model and function signatures (file "dbm.vdm"), from the C++ classes and member functions for manipulating this data structures (file "vdmdbm.cc") and from a Tcl "main" program, where the C++ functions are defined as Tcl commands (files "dbmtcl.cc") and a simple interface to the Tcl command definition (file "vdmtcl.cc") The program is linked together with the Tcl library "libtcl.a", Tcl autoload functions are read from the system directory "$VDMROOT/lib/vdm", the Tcl files there are copies of the files in "tools/g++vdmdbm/tcl". This program is used by the "vdminfo" and "vdmhelp" programs to access the Class Library database Note: a minimum of Tcl 7.5 is required to use dbm as the server vdmd (its a softlink of it). If Tcl 7.5 is not installed by default (/usr/local) and is installed elsewhere, after booting by FLATBOOT, setting the PATH to the bin directory and setting VDMROOT you can switch to "tools/g++vdmdbm" and execute make prefixtcl. You will be prompted for the path of your Tcl 7.5 or more installation directory and the version. This Tcl package will be used for build then. ------------------------------------------------------------------------------- after installation the files in the working directory (e.g ~/work) and the .tgz file may be deleted. ------------------------------------------------------------------------------- the program "VDM" is the generator control program (like cc for the C compiler) the program "vdm" is the real generator the program "vdminfo" is an ASCII based info program for listing the content of the class library the program "vdmhelp" is a Tcl/Tk based info program with an interactive user interface the program "dbmc" is the WWW interface for the VDM Help the program "vdmd" is the server for the "dbmc" client the program "vdmdbm" is a management program for the VDM Class Lib database for usage information call man with these programs with $VDMROOT/man as man directory (e.g "man -M $VDMROOT/man VDM") -------------------------------------------------------------------------------