$PH/COOL-GEN/gencpp/gencppComparison/aareadme - RJL050918 (was aareadme in ~lechner/02f522/gencpp : RJL 021003 (Replaces/updates aareadme from $CASE/gen/ver_8/src 94/4/12): ======================================== Update 050918- RJL This shows no diffs between src here and in $CASE/02f522/gencpp2kf/kmiu/gencpp_final_2000Dec (where I moved kmiu/mottesen gencpp project today). ------------------------------------ saturn.cs.uml.edu(1551)> pwd /tmp_mnt/nfs/galaxy/faculty/fac1/lechner/public_html/COOL-GEN/gencpp/gencppComparison saturn.cs.uml.edu(1552)> diff src $CASE/2kf522/gencpp2kf/kmiu/gencpp_final_2000Dec/src Only in /usr/proj3/case/2kf522/gencpp2kf/kmiu/gencpp_final_2000Dec/src: aareadme Only in src: gencppsrc021003.lg (output of ls -alstg) Only in src: gencppsrc021003bak.lg This shows <=179 refs to #if[n]def USE_STL to conditionally compile STL containers into the gencpp executable: -------------------- saturn.cs.uml.edu(1554)> grep USE_STL src/*.c | wc 179 743 12098 -------------------- This shows where the alpha executable was compiled with genv11. (An executable for mercury was not built yet.) saturn.cs.uml.edu(1564)> lg $PH/COOL-GEN/gencpp/gencppComparison/bin/alpha/genv11cpp -rwxr-xr-x 1 lechner fac 1374128 Oct 3 2002 /usr/cs/fac1/lechner/public_html/COOL-GEN/gencpp/gencppComparison/bin/alpha/genv11cpp gencpp should be recompiled for both platforms using genv13. The beginning of ~lechner/02f522/gencppTestStatus.021004 indicates that genv12 did not compile to compare with gencpp: i------------ saturn.cs.uml.edu(1697)> m ~/02f522/gencppTestStatus.021004 From lechner Fri Oct 4 03:13:00 2002 Subject: ~/02s522/gencpp TBD's: RJLRef: ~/02f522/gencppTestStatus.021004 The testgenv11 files are OK. The testgenv12 tree needs work -unresolved GENLOG symbols (wrong genv12.exe) ... -------------- (End of 050918 update) ============================================== Update 021003 RJL in ~/02f522/gencpp ---------------------- This is a testbed for gencpp in Exam1 takehome problem: Notice that a bootstrap process invokes genv11 to generate metaschema.h and pr*.c files. These are used by the gencpp application to access and interpret the metadata. We now have genv12 with logging. Genv12 also fixed bde porting problems and removes -Wall warnings from bde. So genv12 must be tested on the same metaschema.h. in the hope that most warnings will disappear. Then the gencpp/src Makefile can be rerun to build the application, Makefiles are the same EXCEPT -D USE_STL is added in */test_km. The 4 options are: genv11 vs.genv12, and -D USE_STL or not when compiling the application with pr* library from gencpp. Directories for testing these 4 cases under gencpp are: { genv11/{test_nt, test_km}, genv12/{test_nt, test_km} } This gencpp has evolved from ntansalarak's previous intrusive version, whic also generates refactored code for class declarations instead of tables f structs. This project is located in /usr/proj3/case/bdelog2ks/ntansala/gencpp Note: chgenv* runs in src and alters src and bin/alpha, so these must also be duplicated under genv11 and genv12. The qualifiers to use on the GENV1x command are -ansi -metafile and other options if desired. ----------- These commands set paths and options for chgen executables: ------------------------- alias GENV12 $CASE/gen/ver_12/sjaganat/executables/alpha/chgen12 -ansi -metafile alias GENV11 $CASE/99s523/genmerge/chgenv11/chgen/executables/alpha/chgen11 -ansi -metafile Before trying genv12, I ran make with genmerge/chgenv11... in gencpp/src directory. It succeeded after I did mkdir ../bin/alpha.: (I moved alpha/gencpp to alpha/genv12cpp.) Then I redid the builds with $GENV1 and $GENV12 in gencpp/{testv11,testv12} One disappointing fact: gencpp with STL is 4 times larger than gencpp witout STL! In test_nt and test_km, Makefiles are the same EXCEPT for -D USE_STL: -------- saturn.cs.uml.edu(35)> diff ../test_nt/Makefile ../test_km/Makefile 1c1,4 < ## Makefile in ~/02f522/gencpp copy of $GENCPP/test - RJL 021003 --- > ## Makefile in ~/02f522/gencpp/src: copy of $GENCPP/test - RJL 021003 > ## Must #define USE_STL to get 2kf522's KMiu+MOtt's STL implementation. > ## Otherwise, get NTansala's implementation. > ## Both should give same results on test case test_co_pr. 5c8 < g++ -Wall -c ${SRCS} --- > g++ -D USE_STL -Wall -c ${SRCS} 14c17 < g++ -Wall -o test_co_pr.exe ${OBJS} --- > g++ -D USE_STL -Wall -o test_co_pr.exe ${OBJS} saturn.cs.uml.edu(36)> ----------- Results are in gencpp/testgenv11/test_nt (Not using STL) and in gencpp/testgenv11/test_km (#define USE_STL) The testdata.out files are identical. g++ warnings are numerous but different depending on USE_STL. -------------------------------- saturn.cs.uml.edu(130)> pwd /usr/cs/fac1/lechner/02f522/gencpp/src saturn.cs.uml.edu(131)> make gcc -ansi -g -DDEBUG -DNEW_VERSION -c add_pc_cp_entries.c .... gcc -ansi -g -DDEBUG -DNEW_VERSION -c gen_ops.c gcc -ansi -g -o ../bin/alpha/gencpp add_pc_cp_entries.o change_file_exten.o chgen.o chgen_ global_vars.o chgen_release_date.o close_files.o gen_cc_files.o gen_defines.o gen_load_dat a.o gen_macros.o gen_path.o gen_pr_add.o gen_pr_delete.o gen_pr_dump.o gen_pr_free.o gen_p r_init.o gen_pr_load.o gen_pr_stats.o gen_pr_utils.o gen_rr_matrix.o gen_structures.o make _cptr.o make_pptr.o open_files.o parse_schema.o pr_delete.o pr_dump.o pr_free.o pr_load.o pr_stats.o read_next.o rr_insert.o store_into_matrix.o validate_schema.o write_rr_table.o gen_pr_log.o gen_ops.o /usr/bin/ld: Can't create output file (No such file or directory) collect2: ld returned 1 exit status *** Exit 1 Stop. saturn.cs.uml.edu(132)> pwd /usr/cs/fac1/lechner/02f522/gencpp/src saturn.cs.uml.edu(135)> mkdir ../bin/alpha saturn.cs.uml.edu(136)> make gcc -ansi -g -o ../bin/alpha/gencpp add_pc_cp_entries.o change_file_exten.o chgen.o chgen_ global_vars.o chgen_release_date.o close_files.o gen_cc_files.o gen_defines.o gen_load_dat a.o gen_macros.o gen_path.o gen_pr_add.o gen_pr_delete.o gen_pr_dump.o gen_pr_free.o gen_p r_init.o gen_pr_load.o gen_pr_stats.o gen_pr_utils.o gen_rr_matrix.o gen_structures.o make _cptr.o make_pptr.o open_files.o parse_schema.o pr_delete.o pr_dump.o pr_free.o pr_load.o pr_stats.o read_next.o rr_insert.o store_into_matrix.o validate_schema.o write_rr_table.o gen_pr_log.o gen_ops.o saturn.cs.uml.edu(137)> lg ../bin/alpha total 1344 -rwx--x--x 1 lechner fac 1374128 Oct 3 16:41 gencpp saturn.cs.uml.edu(138)> ----------------------------------- THen I created gencpp/testgenv12/{src, test_km, test_nt}. There I got corresponding results when gen*.c were compiled with genv12 as the metadatabase code (pr*.c) generator from metaschema.sch in testgenv12/src.