$CASE/gen/ver_12/aareadme - RJL 990514 rev. 5/19, 6/3 Rev. 011018 bo 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.)