$CASE/gen/ver_12/aareadme - RJL 990514 rev. dates 990519, 990603, 011018, 020702, 02927, 030915. Rev 020927 and 030915 by RJL: sjaganat/srcMain (for bde) appears to be up to date (a copy of src as of JUl 3 2002.) My cbdev12 directory contains changes to pr_util later than Jul 3, which are not automatically generated by genv12. $CASE/gen/ver_12/sjaganat/srcMain is currently the latest version of chgen. YOu can copy it for 02f522 [and 03f522] use to rebuild chgen on linux or on a PC - withiout X11 emulator. Rebuilding bde is more complicated, but it works on alpha and Linux hosts: If you are running on a UMLCS lab linux machine, you can just ssh to saturn or venus and run my bde shell proc: ~lechner/bde2alpha_rl/sandbox/bdecheckout/bde/executables/bde. This is a shell procedure that calls alpha/bde.exe or i386_linux/bde.exe depending on $HOSTTYPE. You can also ssh to saturn from mercury, the linux host, to run bde on saturn from an xterm (not vt100) client. Although bde runs on Linux (with usual bugs) I have not tested genv12 there - I used pr_util files generated then hand-edited on saturn or venus. If you are running on a remote platform you can rebuild chgen for other applications (e.g. the hominid) after copying the $CASE/gen/ver_12/sjaganat/srcMain tree. You can't build or use bde. If you have a linux/X11 machine, I recommend that you copy the entire tree ~lechner/bde2alpha_rl/sandbox/bdecheckout/bde (you can delete bde/exec*/alpha) and then rebuild the bde executable without rerunning chgen. (Use the already generated bde/pr_util sources in bde/pr_util). (0) edit configure.h to include or not the BDELOG and GENLOG flags. (1) run xmkmf -a in bde root, (2) run make there (make sure bde/schema/94sbde_schema.sch is not as recent as bde/pr_util/*.c, otherwise make tries to run genv12 and overwrite dwerase your pr*.c files.) (3) run linklog.csh or linknolog.csh (depending on configure.h) to relink if make links with cxx and reports unresolvbed symbols. I RUN bde with a platform-independent command because I made bde/executables/i386_linux and bde/executables/alpha eacn contain their own exectutable bde.exe. The command bde/executables/bde adapts to the host platform. In $CASE/gen/ver_12/: saturn.cs.uml.edu(61)> lg sjaganat total 11 drwxr-xr-x 6 sjaganat bdelog 512 Jul 1 14:57 Test drwxr-xr-x 2 sjaganat bdelog 512 May 21 16:08 archives drwxr-xr-x 2 sjaganat bdelog 512 Dec 19 2001 docs drwxr-xr-x 3 sjaganat bdelog 512 Mar 20 2002 executables drwxr-xr-x 2 sjaganat bdelog 1536 Jun 29 13:57 gen12bkup drwxr-xr-x 2 sjaganat bdelog 2560 Jul 3 17:35 src drwxr-xr-x 2 sjaganat bdelog 1536 Jul 3 10:40 srcMain ============================================ Rev 020702 by RJL: ------------------- Sathya in 02s592 finished revising chgen/src (in genv12/sjaganat/src) (pr_log.c is TBD 020705). Bde rebuilt with this version of genv12 (with hand-edited pr_log.c) inludes replay as well as logging, and can replay the ringPath hominid navigation case study from 02s522 (using mylog.txt with mylogDB1.dat). [Caution: Multi-graph file log and replay must be done with care, to avoid mismatched HA-row pkeys. For violations of this, see tests of mylogeb.txt, mylogebDB1.dat in ~lechner/bde2alpha_rl/sandbox/bde/test.] Here are the diff sizes, from genv11/chgen/src and from ./srcMain: (srcMain is obsolete: src adds a few ansi std C function declaration prototypes). ------------------------------- saturn.cs.uml.edu(156)> pwd /usr/proj3/case/gen/ver_12/sjaganat saturn.cs.uml.edu(157)> diff src ../../ver_11/chgen/src | wc 2162 10706 104517 saturn.cs.uml.edu(158)> diff src srcMain | wc 195 939 8835 saturn.cs.uml.edu(159)> lg total 11 drwxr-xr-x 6 sjaganat bdelog 512 Jul 1 14:57 Test drwxr-xr-x 2 sjaganat bdelog 512 May 21 16:08 archives drwxr-xr-x 2 sjaganat bdelog 512 Dec 19 2001 docs drwxr-xr-x 3 sjaganat bdelog 512 Mar 20 14:27 executables drwxr-xr-x 2 sjaganat bdelog 1536 Jun 29 13:57 gen12bkup drwxr-xr-x 2 sjaganat bdelog 2560 Jul 2 14:34 src drwxr-xr-x 2 sjaganat bdelog 1536 Mar 5 18:49 srcMain ------------------------------ ========================================================== Rev. 011018 by RJL: ------------------------------- Updated group to bdelog, ready for sjaganat's project in 01s522, which will add changes that RJL manually edited into ~lechner/fac5/bde2alpha_rjl/bde/new_pr_util.2k0902. $CASE/gen/ver_12 will be an incremental enhancement to the current chgen version in genmerge/genv11/chgen/src/gen*.c . and will be checked into the main branch of chgen in CVS. Immediate Goal: enable chgen to generate unix/g++ code that is compilable and free of warnings from any .sch file.. Long-range goal: make chgen architecture more modular. better encapsulated, and closer to gencpp so an effective comparison can be made. Note on: gencpp vs. chgen: --------------------------- In 2kf522, the gencpp project by kmiu/mottesen modified ntansala's gencpp with similar but not identical fixes to make gencpp generated code pr_*.c and schema.h portable to two platforms:: VC++/Wintel and g++/unixAlpha. Their gencpp generated pr_*.c code which depended on -DUSE_STL to either use external STL containers or use earlier intrusive parent-child linked lists. Unfortunately the code changes for external vs. internal lists are too large to effectively compare chgen vs. gencpp architecture. MOttesen also began building genjava (schema parser first) in /usr/proj3/case/2kf522/mottesen/genjava (01s591 course) with intrusive threaded lists for parent-child relations, ----------------------------- RJL 011018 --------------------------------- 1999 version: This file contains proposed goals for BYoo's project. Directory gen/ver_12 was created for zlu byoo and yxu to complete their respective projects in 99s523. However, there work is still under their directories below. ZLu is studying the OLCArch XXcurr->tableSet/Getfield macros vs the pr_set_typ(XXcurr,table,field,value) macros for genlog/replay. See $CASE/99s523/zlu. BYoo is workng on partitioning chgen output source and header files into table-type-specific files. See 99s523/byoo. Both tasks are relevant to making chgen into gencpp which creates class declarations, containers and methods from global struct declarations, tables and functions. For Yicheng Xu's dbde/bdeReplay, see $CASE/99s523/yxu. ====================================== Goals for BYoo genPartition project: --------------------- Reverse the control hierarchy in the pr_* and schema.h modules generated by $CASE/gen/ver_11 repository code so that the order in which table-specialized functions are generated is sorted by table first then function name. The collective main switch(table_type) will have small cases for each table type, that call the table-specific methods earlier in the file. The next step is to split the old files by table-type into multiple files, one per table type, with only the switch(tabletype) blocks remaining in schema.c and pr*.c. RJL email late May suggested the first code splitting step could be done one gen-created pr_*.c file at a time. (At least two should be done in 99su.) After all files have their case block code split out and retests succeed, then code can be moved to table-specific files with table_type XX prefixed to the name XX_ops.c or XX_schema.h Reference: genv7 and pr_util structure chart diagrams. (needs updating but is still a good guide). THese diagrams in $CASE/gen/ver_7.5orless/ver_7/doc/idraw are gzipped postscript subtype .idraw. The X11 idraw editor is on remus:/usr/local/bin/idraw but not on jupiter. Naming conventions: -------------------- (Any changes require my approval in advance) Add XX_schema.h and XX_ops.cc where XX is a table type. If table abbrev is 4 bytes not 2, then the same 4 chars must be in the prefix: XXXX_ops.cc and XXXX_schema.h. These chars are ALWAYS UPPER CASE not lower case. Schema violatinos of this should be ERROR messages, not warnings from GEN. ('schema' is generic - gen should tailor this name to agree exactly with the schemaname.sch file that gen parses before generating code for any test case.)